[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/07: First step towards emitting new instructions: "j"
From: |
Andy Wingo |
Subject: |
[Guile-commits] 05/07: First step towards emitting new instructions: "j" instead of "br" |
Date: |
Thu, 26 Oct 2017 10:07:17 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 3d848f22f8b33c31bcf65ba173c20f329a5c2b9e
Author: Andy Wingo <address@hidden>
Date: Wed Oct 25 16:45:45 2017 +0200
First step towards emitting new instructions: "j" instead of "br"
* module/language/cps/compile-bytecode.scm (compile-function): Emit "j"
instructions instead of "br".
---
module/language/cps/compile-bytecode.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/module/language/cps/compile-bytecode.scm
b/module/language/cps/compile-bytecode.scm
index c283eb6..352436e 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -289,7 +289,7 @@
(proc-slot (lookup-call-proc-slot label allocation)))
(emit-prompt asm (from-sp (slot tag)) escape? proc-slot
receive-args)
- (emit-br asm k)
+ (emit-j asm k)
(emit-label asm receive-args)
(unless (and rest (zero? nreq))
(emit-receive-values asm proc-slot (->bool rest) nreq))
@@ -302,7 +302,7 @@
((src . dst) (emit-fmov asm dst src)))
(lookup-parallel-moves handler allocation))
(emit-reset-frame asm frame-size)
- (emit-br asm (forward-label khandler-body))))))
+ (emit-j asm (forward-label khandler-body))))))
(($ $primcall 'cache-current-module! (sym scope))
(emit-cache-current-module! asm (from-sp (slot sym)) (constant
scope)))
(($ $primcall 'free-set! (closure idx value))
@@ -403,7 +403,7 @@
(else
(let ((invert? (not (prefer-true?))))
(op asm (from-sp (slot sym)) invert? (if invert? kf kt))
- (emit-br asm (if invert? kt kf))))))
+ (emit-j asm (if invert? kt kf))))))
(define (binary op a b)
(cond
((eq? kt next-label)
@@ -414,7 +414,7 @@
(let ((invert? (not (prefer-true?))))
(op asm (from-sp (slot a)) (from-sp (slot b)) invert?
(if invert? kf kt))
- (emit-br asm (if invert? kt kf))))))
+ (emit-j asm (if invert? kt kf))))))
(match exp
(($ $values (sym)) (unary emit-br-if-true sym))
(($ $primcall 'null? (a)) (unary emit-br-if-null a))
@@ -505,7 +505,7 @@
(fallthrough? (= forwarded-k (skip-elided-conts (1+ label)))))
(define (maybe-emit-jump)
(unless fallthrough?
- (emit-br asm forwarded-k)))
+ (emit-j asm forwarded-k)))
(match (intmap-ref cps k)
(($ $ktail)
(compile-tail label exp))
@@ -534,7 +534,7 @@
(fallthrough? (and fallthrough?
(= kargs (skip-elided-conts (1+ k))))))
(unless fallthrough?
- (emit-br asm kargs)))))))
+ (emit-j asm kargs)))))))
(define (compile-cont label cont)
(match cont
@@ -561,7 +561,7 @@
;; contified into another clause.
(let ((body (forward-label body)))
(unless (= body (skip-elided-conts (1+ label)))
- (emit-br asm body)))))
+ (emit-j asm body)))))
(($ $kargs names vars ($ $continue k src exp))
(emit-label asm label)
(for-each (lambda (name var)
- [Guile-commits] branch master updated (214e887 -> cd947a1), Andy Wingo, 2017/10/26
- [Guile-commits] 04/07: Add assembler and disassembler support for new instructions, Andy Wingo, 2017/10/26
- [Guile-commits] 03/07: Add (system base types internal)., Andy Wingo, 2017/10/26
- [Guile-commits] 01/07: Add support for C16_C16 instruction words, Andy Wingo, 2017/10/26
- [Guile-commits] 02/07: Add new-style test and branch instructions, Andy Wingo, 2017/10/26
- [Guile-commits] 07/07: Model all special immediates under one type bit (with range), Andy Wingo, 2017/10/26
- [Guile-commits] 05/07: First step towards emitting new instructions: "j" instead of "br",
Andy Wingo <=
- [Guile-commits] 06/07: Type inference distinguishes &fixnum and &bignum types, Andy Wingo, 2017/10/26