mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 02:00:26 +02:00
Add instructions to branch on u64 comparisons
* libguile/vm-engine.c (BR_U64_ARITHMETIC): New helper. (br-if-u64-=, br-if-u64-<, br-if-u64->=): New instructions. * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/effects-analysis.scm: * module/language/cps/primitives.scm (*branching-primcall-arities*): * module/language/cps/type-fold.scm: * module/language/cps/types.scm (u64-=, infer-u64-comparison-ranges): (define-u64-comparison-inferrer, u64-<, u64-<=, u64->=, u64->): * module/system/vm/assembler.scm: * module/system/vm/disassembler.scm (code-annotation): (compute-labels): Compiler and toolchain support for the new instructions.
This commit is contained in:
parent
87cc8b0f97
commit
07607f66b8
8 changed files with 110 additions and 5 deletions
|
@ -373,6 +373,11 @@
|
|||
(($ $primcall '= (a b)) (binary emit-br-if-= a b))
|
||||
(($ $primcall '>= (a b)) (binary emit-br-if-<= b a))
|
||||
(($ $primcall '> (a b)) (binary emit-br-if-< b a))
|
||||
(($ $primcall 'u64-< (a b)) (binary emit-br-if-u64-< a b))
|
||||
(($ $primcall 'u64-<= (a b)) (binary emit-br-if-u64-<= a b))
|
||||
(($ $primcall 'u64-= (a b)) (binary emit-br-if-u64-= a b))
|
||||
(($ $primcall 'u64->= (a b)) (binary emit-br-if-u64-<= b a))
|
||||
(($ $primcall 'u64-> (a b)) (binary emit-br-if-u64-< b a))
|
||||
(($ $primcall 'logtest (a b)) (binary emit-br-if-logtest a b))))
|
||||
|
||||
(define (compile-trunc label k exp nreq rest-var)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue