Changeset 10330


Ignore:
Timestamp:
Aug 4, 2008, 10:34:24 PM (11 years ago)
Author:
rme
Message:

%STRING-HASH for x8632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/X86/X8632/x8632-symbol.lisp

    r8001 r10330  
    109109    (single-value-return)))
    110110
     111(defx8632lapfunction %string-hash ((start 4) #|(ra 0)|# (str arg_y) (len arg_z))
     112  (let ((accum imm0)
     113        (offset temp0))
     114    (movl (@ start (% esp)) (% offset))
     115    (xorl (% accum) (% accum))
     116    (testl (% len) (% len))
     117    (jz @done)
     118    @loop8
     119    (roll ($ 5) (%l accum))
     120    (xorl (@ x8632::misc-data-offset (% str) (% offset)) (%l accum))
     121    (addl ($ '1) (% offset))
     122    (subl ($ '1) (% len))
     123    (jnz @loop8)
     124    (shll ($ 5) (% accum))
     125    (shrl ($ (- 5 x8632::fixnumshift)) (% accum))
     126    (movl (% accum) (% arg_z))
     127    @done
     128    (single-value-return 3)))
Note: See TracChangeset for help on using the changeset viewer.