Changeset 15775


Ignore:
Timestamp:
Mar 14, 2013, 11:05:56 PM (6 years ago)
Author:
gb
Message:

STRIP-TAG-TO-FIXNUM: if arg is a fixnum, return it.
Fixes ticket:1069 in the trunk.

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

Legend:

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

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

    r15521 r15775  
    162162;;; Strip the tag bits to turn x into a fixnum
    163163(defppclapfunction strip-tag-to-fixnum ((x arg_z))
     164  (clrlri. imm0 arg_z (- target::nbits-in-word target::fixnumshift))
     165  (beq @done)
    164166  (clrrri arg_z x target::ntagbits)
    165167  (srri arg_z arg_z (- target::ntagbits target::fixnumshift))
     168  @done
    166169  (blr))
    167170
  • trunk/source/level-0/X86/X8632/x8632-hash.lisp

    r15521 r15775  
    122122;;; Strip the tag bits to turn x into a fixnum
    123123(defx8632lapfunction strip-tag-to-fixnum ((x arg_z))
     124  (testb ($ target::fixnummask) (%b x))
     125  (jz @done)
    124126  (andl ($ (lognot target::fulltagmask)) (% x))
    125127  (shrl ($ (- target::ntagbits target::fixnumshift)) (% arg_z))
     128  @done
    126129  (single-value-return))
    127130
  • trunk/source/level-0/X86/x86-hash.lisp

    r15521 r15775  
    125125;;; Strip the tag bits to turn x into a fixnum
    126126(defx86lapfunction strip-tag-to-fixnum ((x arg_z))
     127  (testb ($ target::fixnummask) (%b arg_z))
     128  (jz @done)
    127129  (andq ($ (lognot target::fulltagmask)) (% x))
    128130  (shrq ($ (- target::ntagbits target::fixnumshift)) (% arg_z))
     131  @done
    129132  (single-value-return))
    130133
Note: See TracChangeset for help on using the changeset viewer.