Changeset 7942


Ignore:
Timestamp:
Dec 26, 2007, 7:51:43 AM (12 years ago)
Author:
gb
Message:

%STRING-HASH: like %PNAME-HASH, but with a (possibly non-zero)
offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-0/X86/x86-symbol.lisp

    r5389 r7942  
    142142    @done
    143143    (single-value-return)))
     144
     145(defx86lapfunction %string-hash ((start arg_x) (str arg_y) (len arg_z))
     146  (let ((accum imm0)
     147        (offset imm1))
     148    (unbox-fixnum start offset)
     149    (xorq (% accum) (% accum))
     150    (cmpq ($ 0) (% len))
     151    (jz.pn @done)
     152    @loop8
     153    (roll ($ 5) (%l accum))
     154    (xorl (@ x8664::misc-data-offset (% str) (% offset) 4) (%l accum))
     155    (addq ($ 1) (% offset))   
     156    (subq ($ '1) (% len))
     157    (jnz @loop8)
     158    (shlq ($ 5) (% accum))
     159    (shrq ($ (- 5 x8664::fixnumshift)) (% accum))
     160    (movq (% accum) (% arg_z))
     161    @done
     162    (single-value-return)))
Note: See TracChangeset for help on using the changeset viewer.