[Openmcl-cvs-notifications] r15301 - in /trunk/source/level-0/X86: X8632/x8632-pred.lisp x86-pred.lisp

gb at clozure.com gb at clozure.com
Sat Apr 7 17:50:41 CDT 2012


Author: gb
Date: Sat Apr  7 17:50:41 2012
New Revision: 15301

Log:
EQL calls .SPbuiltin-eql on x86.

Modified:
    trunk/source/level-0/X86/X8632/x8632-pred.lisp
    trunk/source/level-0/X86/x86-pred.lisp

Modified: trunk/source/level-0/X86/X8632/x8632-pred.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-0/X86/X8632/x8632-pred.lisp (original)
+++ trunk/source/level-0/X86/X8632/x8632-pred.lisp Sat Apr  7 17:50:41 2012
@@ -21,102 +21,7 @@
   "Return T if OBJ1 and OBJ2 represent either the same object or
 numbers with the same type and value."
   (check-nargs 2)
-  @top
-  @tail
-  (cmpl (% x) (% y))
-  (je @win)
-  (movl (% x) (% imm0))
-  (andb ($ x8632::fulltagmask) (% al))
-  (movb (% arg_z.b) (% ah))
-  (andb ($ x8632::fulltagmask) (% ah))
-  (cmpb (% al) (% ah))
-  (jnz @lose)
-  (cmpb ($ x8632::fulltag-misc) (% al))
-  (jnz @lose)
-  (cmpb ($ x8632::fulltag-misc) (% ah))
-  (jnz @lose)
-  ;; Objects are both of tag-misc.  Headers must match exactly;
-  ;; dispatch on subtag.
-  (getvheader x imm0)
-  ;;(getvheader y imm1)
-  (cmpb ($ x8632::subtag-macptr) (% imm0.b))
-  (je @macptr)				; will need to check subtag of %y
-  (cmp (% imm0) (@ x8632::misc-header-offset (% y)))
-  (jne @lose)
-  (cmpb ($ x8632::subtag-bignum) (% imm0.b))
-  (je @bignum)
-  (cmpb ($ x8632::subtag-single-float) (% imm0.b))
-  (je @one-unboxed-word)
-  (cmpb ($ x8632::subtag-double-float) (% imm0.b))
-  (je @double-float)
-  (cmpb ($ x8632::subtag-complex) (% imm0.b))
-  (je @complex)
-  (cmpb ($ x8632::subtag-ratio) (% imm0.b))
-  (je @ratio)
-  @lose
-  (movl ($ (target-nil-value)) (% arg_z))
-  (single-value-return)
-  @double-float
-  ;; use UCOMISD here, maybe?
-  (movl (@ x8632::double-float.val-high (% x)) (% imm0))
-  (cmpl (% imm0) (@ x8632::double-float.val-high (% y)))
-  (jne @lose)
-  (movl (@ x8632::double-float.value (% x)) (% imm0))
-  (cmpl (% imm0) (@ x8632::double-float.value (% y)))
-  (jne @lose)
-  (movl ($ (target-t-value)) (% arg_z))
-  (single-value-return)
-  @macptr
-  (cmpb ($ x8632::subtag-macptr) (@ x8632::misc-subtag-offset (% y)))
-  (jne @lose)
-  @one-unboxed-word
-  (movl (@ x8632::misc-data-offset (% x)) (% imm0))
-  @test
-  (cmpl (% imm0) (@ x8632::misc-data-offset (% y)))
-  (movl ($ (target-t-value)) (%l imm0))
-  (lea (@ (- x8632::t-offset) (% imm0)) (% arg_z))
-  (cmovel (%l imm0) (%l arg_z))
-  (single-value-return)
-  @win
-  (movl ($ (target-t-value)) (% arg_z))
-  (single-value-return)
-  @ratio
-  @complex
-  ;; Have either a ratio or a complex.  In either case, corresponding
-  ;; elements of both objects must be EQL.  Recurse on the first
-  ;; elements.  If true, tail-call on the second, else fail.
-  (save-simple-frame)
-  (pushl (@ x8632::ratio.denom (% x)))  ; aka complex.imagpart
-  (pushl (@ x8632::ratio.denom (% y)))
-  (movl (@ x8632::ratio.numer (% x)) (% x))       ; aka complex.realpart
-  (movl (@ x8632::ratio.numer (% y)) (% y))       ; aka complex.realpart
-  (:talign 5)
-  (call @top)
-  (recover-fn)
-  (cmp-reg-to-nil arg_z)
-  (pop (% y))
-  (pop (% x))
-  (restore-simple-frame)
-  (jnz @tail)
-  ;; lose, again
-  (movl ($ (target-nil-value)) (% arg_z))
-  (single-value-return)
-  @bignum
-  ;; Way back when, we got x's header into imm0.  We know that y's
-  ;; header is identical.  Use the element-count from imm0 to control
-  ;; the loop.  There's no such thing as a 0-element bignum, so the
-  ;; loop must always execute at least once.
-  (header-length imm0 temp0)
-  (xor (% temp1) (% temp1))
-  @bignum-next
-  (movl (@ x8632::misc-data-offset (% x) (% temp1)) (% imm0))
-  (cmpl (@ x8632::misc-data-offset (% y) (% temp1)) (% imm0))
-  (jne @lose)
-  (addl ($ '1) (% temp1))
-  (sub ($ '1) (% temp0))
-  (jnz @bignum-next)
-  (movl ($ (target-t-value)) (% arg_z))
-  (single-value-return))
+  (jmp-subprim .SPbuiltin-eql))
 =

 (defx8632lapfunction equal ((x arg_y) (y arg_z))
   "Return T if X and Y are EQL or if they are structured components

Modified: trunk/source/level-0/X86/x86-pred.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-0/X86/x86-pred.lisp (original)
+++ trunk/source/level-0/X86/x86-pred.lisp Sat Apr  7 17:50:41 2012
@@ -27,82 +27,7 @@
   "Return T if OBJ1 and OBJ2 represent either the same object or
 numbers with the same type and value."
   (check-nargs 2)
-  @top
-  @tail
-  (cmpq (% x) (% y))
-  (je @win)
-  (extract-fulltag x imm0)
-  (extract-fulltag y imm1)
-  (cmpb (% imm0.b) (% imm1.b))
-  (jnz @lose)
-  (cmpb ($ x8664::fulltag-misc) (% imm0.b))
-  (jnz @lose)
-  (getvheader x imm0)
-  (getvheader y imm1)
-  (cmpb ($ x8664::subtag-macptr) (% imm0.b))
-  (je @macptr)                          ; will need to check %imm1.b
-  (cmpq (% imm0) (% imm1))
-  (jne @lose)
-  (cmpb ($ x8664::subtag-bignum) (% imm0.b))
-  (je @bignum)
-  (cmpb ($ x8664::subtag-double-float) (% imm0.b))
-  (je @double-float)
-  (cmpb ($ x8664::subtag-complex) (% imm0.b))
-  (je @complex)
-  (cmpb ($ x8664::subtag-ratio) (% imm0.b))
-  (je @ratio)
-  @lose
-  (movq ($ nil) (% arg_z))
-  (single-value-return)
-  @macptr
-  (cmpb ($ x8664::subtag-macptr) (% imm1.b))
-  (jne @lose)
-  @double-float
-  (movq  (@ x8664::misc-data-offset (% x)) (% imm0))
-  (movq  (@ x8664::misc-data-offset (% y)) (% imm1))
-  @test
-  (cmpq (% imm0) (% imm1))
-  (movl ($ (target-t-value)) (%l imm0))
-  (lea (@ (- x8664::t-offset) (% imm0)) (% arg_z))
-  (cmovel (%l imm0) (%l arg_z))
-  (single-value-return)
-  @win
-  (movq ($ t) (% arg_z))
-  (single-value-return)
-  @ratio
-  @complex
-  (save-simple-frame)
-  (pushq (@ x8664::ratio.denom (% x)))  ; aka complex.imagpart
-  (pushq (@ x8664::ratio.denom (% y)))
-  (movq (@ x8664::ratio.numer (% x)) (% x))       ; aka complex.realpart
-  (movq (@ x8664::ratio.numer (% y)) (% y))       ; aka complex.realpart
-  (:talign 3)
-  (call @top)
-  (recover-fn-from-rip)
-  (cmp-reg-to-nil arg_z)
-  (pop (% y))
-  (pop (% x))
-  (restore-simple-frame)
-  (jnz @tail)
-  ;; lose, again
-  (movq ($ nil) (% arg_z))
-  (single-value-return)
-  @bignum
-  ;; Way back when, we got x's header into imm0.  We know that y's
-  ;; header is identical.  Use the element-count from imm0 to control
-  ;; the loop.  There's no such thing as a 0-element bignum, so the
-  ;; loop must always execute at least once.
-  (header-length imm0 temp0)
-  (xorq (% imm1) (% imm1))
-  @bignum-next
-  (movl (@ x8664::misc-data-offset (% x) (% imm1)) (% imm0.l))
-  (cmpl (@ x8664::misc-data-offset (% y) (% imm1)) (% imm0.l))
-  (jne @lose)
-  (addq ($ 4) (% imm1))
-  (sub ($ '1) (% temp0))
-  (jnz @bignum-next)
-  (movq ($ t) (% arg_z))
-  (single-value-return))
+  (jmp-subprim .SPbuiltin-eql))
   =

 =

 =




More information about the Openmcl-cvs-notifications mailing list