[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/08: Remove disassembler support for old-style jump in
From: |
Andy Wingo |
Subject: |
[Guile-commits] 05/08: Remove disassembler support for old-style jump instructions |
Date: |
Mon, 30 Oct 2017 07:35:34 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 9d62724c08588f4e7af3ee427eab67258d07c586
Author: Andy Wingo <address@hidden>
Date: Mon Oct 30 10:43:23 2017 +0100
Remove disassembler support for old-style jump instructions
* module/system/vm/disassembler.scm (code-annotation, compute-labels)
(instruction-has-fallthrough?, define-jump-parser): Remove
disassembler support for old-style jump instructions.
---
module/system/vm/disassembler.scm | 40 ++-------------------------------------
1 file changed, 2 insertions(+), 38 deletions(-)
diff --git a/module/system/vm/disassembler.scm
b/module/system/vm/disassembler.scm
index 9c34594..5183b2d 100644
--- a/module/system/vm/disassembler.scm
+++ b/module/system/vm/disassembler.scm
@@ -206,38 +206,12 @@ address of that offset."
(dereference-pointer (make-pointer addr)))))
(match code
- (((or 'br
- 'br-if-nargs-ne 'br-if-nargs-lt 'br-if-nargs-gt
- 'br-if-true 'br-if-null 'br-if-nil 'br-if-pair 'br-if-struct
- 'br-if-char 'br-if-eq 'br-if-eqv
- 'br-if-= 'br-if-< 'br-if-<= 'br-if-> 'br-if->=
- 'br-if-u64-= 'br-if-u64-< 'br-if-u64-<=
- 'br-if-u64-<-scm 'br-if-u64-<=-scm 'br-if-u64-=-scm
- 'br-if-u64->-scm 'br-if-u64->=-scm
- 'br-if-f64-= 'br-if-f64-< 'br-if-f64-<=
- 'br-if-f64-> 'br-if-f64->=
- 'br-if-logtest) _ ... target)
- (list "-> ~A" (vector-ref labels (- (+ offset target) start))))
(((or 'j 'je 'jl 'jge 'jne 'jnl 'jnge) target)
(list "-> ~A" (vector-ref labels (- (+ offset target) start))))
(('immediate-tag=? _ mask tag)
(assoc-ref immediate-tag-annotations (list mask tag)))
(('heap-tag=? _ mask tag)
(assoc-ref heap-tag-annotations (list mask tag)))
- (('br-if-tc7 slot invert? tc7 target)
- (list "~A -> ~A"
- (let ((tag (case tc7
- ((5) "symbol?")
- ((7) "variable?")
- ((13) "vector?")
- ((15) "string?")
- ((53) "keyword?")
- ((#x3d) "syntax?")
- ((77) "bytevector?")
- ((95) "bitvector?")
- (else (number->string tc7)))))
- (if invert? (string-append "not " tag) tag))
- (vector-ref labels (- (+ offset target) start))))
(('prompt tag escape-only? proc-slot handler)
;; The H is for handler.
(list "H -> ~A" (vector-ref labels (- (+ offset handler) start))))
@@ -320,15 +294,7 @@ address of that offset."
(match elt
((inst arg ...)
(case inst
- ((br
- br-if-nargs-ne br-if-nargs-lt br-if-nargs-gt
- br-if-true br-if-null br-if-nil br-if-pair br-if-struct
- br-if-char br-if-tc7 br-if-eq br-if-eqv
- br-if-= br-if-< br-if-<= br-if-> br-if->= br-if-logtest
- br-if-u64-= br-if-u64-< br-if-u64-<=
- br-if-u64-<-scm br-if-u64-<=-scm br-if-u64-=-scm
- br-if-u64->-scm br-if-u64->=-scm
- j je jl jge jne jnl jnge)
+ ((j je jl jge jne jnl jnge)
(match arg
((_ ... target)
(add-label! (+ offset target) "L"))))
@@ -549,7 +515,6 @@ address of that offset."
return-values
subr-call foreign-call continuation-call
tail-apply
- br
j))
(let ((opcode (logand (bytevector-u32-native-ref code pos) #xff)))
(not (bitvector-ref non-fallthrough-set opcode))))
@@ -559,8 +524,7 @@ address of that offset."
(syntax-case x ()
((_ name opcode kind word0 word* ...)
(let ((symname (syntax->datum #'name)))
- (if (or (memq symname '(br prompt j je jl jge jne jnl jnge))
- (string-prefix? "br-" (symbol->string symname)))
+ (if (memq symname '(prompt j je jl jge jne jnl jnge))
(let ((offset (* 4 (length #'(word* ...)))))
#`(vector-set!
jump-parsers
- [Guile-commits] branch master updated (d1c69b5 -> 4267a8b), Andy Wingo, 2017/10/30
- [Guile-commits] 03/08: Fix argument type of arguments<=? instruction, Andy Wingo, 2017/10/30
- [Guile-commits] 02/08: Remove assembler exports for old-style predicates and branches, Andy Wingo, 2017/10/30
- [Guile-commits] 07/08: RTL test uses new instructions, Andy Wingo, 2017/10/30
- [Guile-commits] 04/08: Emit new instructions in function preludes, Andy Wingo, 2017/10/30
- [Guile-commits] 06/08: Simplify special immediate predicate inferrer., Andy Wingo, 2017/10/30
- [Guile-commits] 01/08: Lower logtest branches to instead be 'zero? logand', Andy Wingo, 2017/10/30
- [Guile-commits] 05/08: Remove disassembler support for old-style jump instructions,
Andy Wingo <=
- [Guile-commits] 08/08: Remove old branching instructions from VM, Andy Wingo, 2017/10/30