1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Fix fixnum min/max for assembler

* module/system/vm/assembler.scm (immediate-bits): I am a complete and
  total idiot and got the fixnum mins and maxes swapped.
This commit is contained in:
Andy Wingo 2016-09-06 12:05:21 +02:00
parent 3425290a7b
commit 73efa8fb06

View file

@ -948,10 +948,10 @@ immediate, and @code{#f} otherwise."
;; Object is an immediate if it is a fixnum on the target. ;; Object is an immediate if it is a fixnum on the target.
(call-with-values (lambda () (call-with-values (lambda ()
(case (asm-word-size asm) (case (asm-word-size asm)
((4) (values #x1fffffff ((4) (values (- #x20000000)
(- #x20000000))) #x1fffffff))
((8) (values #x1fffffffFFFFFFFF ((8) (values (- #x2000000000000000)
(- #x2000000000000000))) #x1fffffffFFFFFFFF))
(else (error "unexpected word size")))) (else (error "unexpected word size"))))
(lambda (fixnum-min fixnum-max) (lambda (fixnum-min fixnum-max)
(and (<= fixnum-min x fixnum-max) (and (<= fixnum-min x fixnum-max)