Changeset 10815


Ignore:
Timestamp:
Sep 21, 2008, 5:26:41 AM (11 years ago)
Author:
rme
Message:

FAST-MOD: The remainder in %edx will be fixnum-tagged, so skip the
mark-as-imm/mark-as-node dance.

File:
1 edited

Legend:

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

    r10731 r10815  
    66;;; This should stay in LAP so that it's fast
    77;;; Equivalent to cl:mod when both args are positive fixnums
    8 
    9 ;;; We have to use edx:eax for the dividend, so we can't avoid
    10 ;;; having to do the mark-as-imm/mark-as-node dance here.  This
    11 ;;; may have performance implications.
    128(defx8632lapfunction fast-mod ((number arg_y) (divisor arg_z))
    13   (mark-as-imm temp1)                   ;aka edx
    14   (let ((imm1 temp1))
    15     (xorl (% imm1) (% imm1))
    16     (mov (% number) (% imm0))
    17     (div (% divisor))
    18     (mov (% imm1) (% arg_z)))
    19   (mark-as-node temp1)
     9  (xorl (% edx) (% edx))                ;aka temp1
     10  (mov (% number) (% imm0))
     11  (div (% divisor))                     ;boxed remainder goes into edx/temp1
     12  (mov (% edx) (% arg_z))
    2013  (single-value-return))
    2114
Note: See TracChangeset for help on using the changeset viewer.