From 6865fa1714987f4dfbfd57dd40e9b1c490dcef9b Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 20 Apr 2019 19:30:40 +0000 Subject: [PATCH] Make this run on ucode without nonnegative-fixnum-length/mask. --- src/runtime/microcode-tables.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime/microcode-tables.scm b/src/runtime/microcode-tables.scm index f71807ad8..bfb482310 100644 --- a/src/runtime/microcode-tables.scm +++ b/src/runtime/microcode-tables.scm @@ -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 -- 2.25.1