Changeset 9367


Ignore:
Timestamp:
May 6, 2008, 5:03:53 PM (11 years ago)
Author:
rme
Message:

Replace instances of #.(mixup-hash-code <some-constant>) with regular
function call. (Avoids getting bignum hash codes when cross-compiling
from 64-bit host to 32-bit target.)

sxhash: use target::target-most-positive-fixnum

immediate-p for x8632 (same as for ppc32)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/l0-hash.lisp

    r6918 r9367  
    201201    (declare (fixnum typecode))
    202202    (or (= typecode target::subtag-macptr)
    203         #+ppc32-target
    204         (and (>= typecode ppc32::min-numeric-subtag)
    205              (<= typecode ppc32::max-numeric-subtag))
     203        #+(or ppc32-target x8632-target)
     204        (and (>= typecode target::min-numeric-subtag)
     205             (<= typecode target::max-numeric-subtag))
    206206        #+64-bit-target
    207207        (or (= typecode target::subtag-bignum)
     
    260260       (the fixnum (%ilsl 50
    261261                          (logand (1- (ash 1 (- 8 3))) fixnum))))))
    262 
    263262
    264263(defun rotate-hash-code (fixnum)
     
    15151514      (when (<= (decf limit) 0)
    15161515        (setq hash (the fixnum (+ (the fixnum (rotate-hash-code hash))
    1517                                   #.(mixup-hash-code 11))))
     1516                                  (the fixnum (mixup-hash-code 11)))))
    15181517        (return)))
    15191518    (values hash addressp)))
     
    15381537                     (+ (the fixnum (rotate-hash-code hash))
    15391538                        (the fixnum
    1540                              (mixup-hash-code (array-dimension key i))))))))     
     1539                             (mixup-hash-code (array-dimension key i))))))))
    15411540      (dotimes (i size)
    15421541        (declare (fixnum i))
     
    15471546        (when (<= (decf limit) 0)
    15481547          (setq hash (the fixnum (+ (the fixnum (rotate-hash-code hash))
    1549                                     #.(mixup-hash-code 11))))
     1548                                    (the fixnum (mixup-hash-code 11)))))
    15501549          (return))
    15511550        (incf offset))
     
    15541553(defun %%equalphash-aux (limit key)
    15551554  (if (<= limit 0)
    1556     #.(mixup-hash-code 11)
    1557     (if (null key) #.(mixup-hash-code 17)
     1555    (mixup-hash-code 11)
     1556    (if (null key) (mixup-hash-code 17)
    15581557        (cond ((consp key)
    15591558               (let ((hash 0)
     
    16061605(defun sxhash (s-expr)
    16071606  "Computes a hash code for S-EXPR and returns it as an integer."
    1608   (logand (sxhash-aux s-expr 7 17) most-positive-fixnum))
     1607  (logand (sxhash-aux s-expr 7 17) target::target-most-positive-fixnum))
    16091608
    16101609(defun sxhash-aux (expr counter key)
     
    16271626
    16281627
    1629 #+ppc32-target
     1628#+(or ppc32-target x8632-target)
    16301629(defun immediate-p (thing)
    16311630  (let* ((tag (lisptag thing)))
    16321631    (declare (fixnum tag))
    1633     (or (= tag ppc32::tag-fixnum)
    1634         (= tag ppc32::tag-imm))))
     1632    (or (= tag target::tag-fixnum)
     1633        (= tag target::tag-imm))))
    16351634
    16361635#+ppc64-target
Note: See TracChangeset for help on using the changeset viewer.