mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
Add unboxed floating point comparison instructions.
* libguile/vm-engine.c (BR_F64_ARITHMETIC): New preprocessor macro. (br_if_f64_ee, br_if_f64_lt, br_if_f64_le, br_if_f64_gt, br_if_f64_ge): New VM instructions. * doc/ref/vm.texi ("Unboxed Floating-Point Arithmetic"): Document them. * module/language/cps/compile-bytecode.scm (compile-function): Emit f64 comparison instructions. * module/language/cps/effects-analysis.scm: Define effects for f64 primcalls. * module/language/cps/primitives.scm (*branching-primcall-arities*): Add arities for f64 primcalls. * module/language/cps/specialize-numbers.scm (specialize-f64-comparison): New procedure. (specialize-operations): Specialize f64 comparisons. * module/system/vm/assembler.scm (emit-br-if-f64-=, emit-br-if-f64-<) (emit-br-if-f64-<=, emit-br-if-f64->, emit-br-if-f64->=): Export. * module/system/vm/disassembler.scm (code-annotation): Add annotations for f64 comparison instructions.
This commit is contained in:
parent
63bf6ffa0d
commit
35a9059250
9 changed files with 145 additions and 21 deletions
|
@ -446,7 +446,12 @@
|
|||
(($ $primcall 'u64-=-scm (a b)) (binary emit-br-if-u64-=-scm a b))
|
||||
(($ $primcall 'u64->=-scm (a b)) (binary emit-br-if-u64->=-scm a b))
|
||||
(($ $primcall 'u64->-scm (a b)) (binary emit-br-if-u64->-scm a b))
|
||||
(($ $primcall 'logtest (a b)) (binary emit-br-if-logtest a b))))
|
||||
(($ $primcall 'logtest (a b)) (binary emit-br-if-logtest a b))
|
||||
(($ $primcall 'f64-< (a b)) (binary emit-br-if-f64-< a b))
|
||||
(($ $primcall 'f64-<= (a b)) (binary emit-br-if-f64-<= a b))
|
||||
(($ $primcall 'f64-= (a b)) (binary emit-br-if-f64-= a b))
|
||||
(($ $primcall 'f64->= (a b)) (binary emit-br-if-f64->= a b))
|
||||
(($ $primcall 'f64-> (a b)) (binary emit-br-if-f64-> a b))))
|
||||
|
||||
(define (compile-trunc label k exp nreq rest-var)
|
||||
(define (do-call proc args emit-call)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue