Make this run on ucode without nonnegative-fixnum-length/mask.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 20 Apr 2019 19:30:40 +0000 (19:30 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 20 Apr 2019 19:30:40 +0000 (19:30 +0000)
src/runtime/microcode-tables.scm

index f71807ad8a7a95edb6ffc0f61c2fe241cd0d66e3..bfb4823103cf353a417ec64dc8ebda41736a59a0 100644 (file)
@@ -203,9 +203,14 @@ USA.
   (set! microcode-id/floating-exponent-max
         (microcode-identification-item 'flonum-exponent-max))
   (set! microcode-id/nonnegative-fixnum-length
-       (microcode-identification-item 'nonnegative-fixnum-length))
+       (or (microcode-identification-item 'nonnegative-fixnum-length #f)
+           (let loop ((i 1) (n 0))
+             (if (fix:fixnum? i)
+                 (loop (* i 2) (+ n 1))
+                 n))))
   (set! microcode-id/nonnegative-fixnum-mask
-       (microcode-identification-item 'nonnegative-fixnum-mask))
+       (or (microcode-identification-item 'nonnegative-fixnum-mask #f)
+           (fix:not (fix:lsh -1 microcode-id/nonnegative-fixnum-length))))
   (set! microcode-id/operating-system-name
        (microcode-identification-item 'os-name-string))
   (set! microcode-id/operating-system