Changeset 9269


Ignore:
Timestamp:
Apr 24, 2008, 7:49:46 PM (11 years ago)
Author:
rme
Message:

%compare-digits: more fiddling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-bignum.lisp

    r9178 r9269  
    509509    (single-value-return 4)))
    510510
     511;;; 0 if a[i] = b[i]; 1 if a[i] > b[i]; -1 if a[i] < b[i]
    511512(defx8632lapfunction %compare-digits ((a 4) #|(ra 0)|# (b arg_y) (i arg_z))
    512513  (movl (@ a (% esp)) (% temp0))
    513514  (movl (@ x8632::misc-data-offset (% temp0) (% i)) (% imm0))
    514   (xorl (% temp0) (% temp0))
    515   (movl ($ '1) (% temp1))
    516   (movl ($ '-1) (% arg_y))
    517   (cmpl (@ x8632::misc-data-offset (% b) (% i)) (% imm0))
    518   (cmovzl (% temp0) (% arg_z))
    519   (cmovgl (% temp1) (% arg_z))
    520   (cmovll (% arg_y) (% arg_z))
     515  (movl ($ '1) (% temp0))
     516  (movl ($ '-1) (% temp1))
     517  (subl (@ x8632::misc-data-offset (% b) (% i)) (% imm0))
     518  (cmovgl (% temp0) (% imm0))
     519  (cmovll (% temp1) (% imm0))
     520  (movl (% imm0) (% arg_z))
    521521  (single-value-return 3))
    522522
     
    706706;;; in two halves.  (cf. Knuth, 4.3.1, exercise 16)
    707707(defx8632lapfunction %floor-loop-quo ((x 8) (res 4) #|(ra 0)|# (yhi arg_y) (ylo arg_z))
    708   (int ($ 3))
    709708  (compose-digit yhi ylo imm0)
    710709  (movl (% imm0) (@ (% :rcontext) x8632::tcr.unboxed0))
Note: See TracChangeset for help on using the changeset viewer.