Changeset 15521


Ignore:
Timestamp:
Dec 3, 2012, 10:48:41 PM (7 years ago)
Author:
gb
Message:

Do STRIP-TAG-TO-FIXNUM the same way on all platforms: clear the
argument's tag bits (making it an even fixnum) and then logically
shift right 1 bit.

Location:
trunk/source/level-0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/ARM/arm-hash.lisp

    r15093 r15521  
    113113;;; Strip the tag bits to turn x into a fixnum
    114114(defarmlapfunction strip-tag-to-fixnum ((x arg_z))
    115   (bic arg_z x (:$ arm::fixnummask))
     115  (bic arg_z x (:$ arm::fulltagmask))
     116  (mov arg_z (:lsr arg_z (:$ (- arm::ntagbits arm::nfixnumtagbits))))
    116117  (bx lr))
    117118
  • trunk/source/level-0/PPC/ppc-hash.lisp

    r13067 r15521  
    162162;;; Strip the tag bits to turn x into a fixnum
    163163(defppclapfunction strip-tag-to-fixnum ((x arg_z))
    164   (unbox-fixnum imm0 x)
    165   (box-fixnum arg_z imm0)
     164  (clrrri arg_z x target::ntagbits)
     165  (srri arg_z arg_z (- target::ntagbits target::fixnumshift))
    166166  (blr))
    167167
  • trunk/source/level-0/X86/X8632/x8632-hash.lisp

    r13447 r15521  
    122122;;; Strip the tag bits to turn x into a fixnum
    123123(defx8632lapfunction strip-tag-to-fixnum ((x arg_z))
    124   (andb ($ (lognot x8632::fixnummask)) (%b x))
     124  (andl ($ (lognot target::fulltagmask)) (% x))
     125  (shrl ($ (- target::ntagbits target::fixnumshift)) (% arg_z))
    125126  (single-value-return))
    126127
  • trunk/source/level-0/X86/x86-hash.lisp

    r15264 r15521  
    125125;;; Strip the tag bits to turn x into a fixnum
    126126(defx86lapfunction strip-tag-to-fixnum ((x arg_z))
    127   (movq (% x) (% imm0))
    128   (shlq ($ x8664::ntagbits) (% imm0))
    129   (box-fixnum imm0 arg_z)
     127  (andq ($ (lognot target::fulltagmask)) (% x))
     128  (shrq ($ (- target::ntagbits target::fixnumshift)) (% arg_z))
    130129  (single-value-return))
    131130
Note: See TracChangeset for help on using the changeset viewer.