[Openmcl-cvs-notifications] r15347 - in /trunk/source/compiler/X86: X8632/x8632-vinsns.lisp X8664/x8664-vinsns.lisp

gb at clozure.com gb at clozure.com
Sat Apr 28 05:43:24 CDT 2012


Author: gb
Date: Sat Apr 28 05:43:24 2012
New Revision: 15347

Log:
Remove unused FIXNUM-SUBTRACT-FROM vinsn.
In FIXNUM-SUB2, avoid copies/use of temp reg unless necessary.

Modified:
    trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
    trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

Modified: trunk/source/compiler/X86/X8632/x8632-vinsns.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/compiler/X86/X8632/x8632-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8632/x8632-vinsns.lisp Sat Apr 28 05:43:24 2=
012
@@ -1053,11 +1053,6 @@
   (call (:@ spno))
   (movl (:$self 0) (:% x8632::fn)))
 =

-(define-x8632-vinsn fixnum-subtract-from (((dest t)
-                                           (y t))
-                                          ((y t)
-                                           (x t)))
-  (subl (:%l y) (:%l x)))
 =

 (define-x8632-vinsn %ilognot (((dest :imm)
                                (src :imm))
@@ -1295,9 +1290,16 @@
                                   ((x :imm)
                                    (y :imm))
                                   ((temp :imm)))
-  (movl (:%l x) (:%l temp))
-  (subl (:%l y) (:%l temp))
-  (movl (:%l temp) (:%l dest)))
+  ((:pred =3D (:apply %hard-regspec-value x) (:apply %hard-regspec-value d=
est))
+   (subl (:%l y) (:%l dest)))
+  ((:not (:pred =3D (:apply %hard-regspec-value x) (:apply %hard-regspec-v=
alue dest)))
+   ((:pred =3D (:apply %hard-regspec-value y) (:apply %hard-regspec-value =
dest)) =

+    (movl (:%l x) (:%l temp))
+    (subl (:%l y) (:%l temp))
+    (movl (:%l temp) (:%l dest)))
+   ((:not (:pred =3D (:apply %hard-regspec-value y) (:apply %hard-regspec-=
value dest)))
+    (movl (:%l x) (:%l dest))
+    (subl (:%l y) (:%l dest)))))
 =

 (define-x8632-vinsn fixnum-add3 (((dest :imm))
                                  ((x :imm)

Modified: trunk/source/compiler/X86/X8664/x8664-vinsns.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/compiler/X86/X8664/x8664-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8664/x8664-vinsns.lisp Sat Apr 28 05:43:24 2=
012
@@ -1200,11 +1200,6 @@
   (call (:@ spno))
   (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)))
 =

-(define-x8664-vinsn fixnum-subtract-from (((dest t)
-                                           (y t))
-                                          ((y t)
-                                           (x t)))
-  (subq (:%q y) (:%q x)))
 =

 (define-x8664-vinsn %logand-c (((dest t)
                                 (val t))
@@ -1428,9 +1423,16 @@
                                   ((x :imm)
                                    (y :imm))
                                   ((temp :imm)))
-  (movq (:%q x) (:%q temp))
-  (subq (:%q y) (:%q temp))
-  (movq (:%q temp) (:%q dest)))
+  ((:pred =3D (:apply %hard-regspec-value x) (:apply %hard-regspec-value d=
est))
+   (subq (:%q y) (:%q dest)))
+  ((:not (:pred =3D (:apply %hard-regspec-value x) (:apply %hard-regspec-v=
alue dest)))
+   ((:pred =3D (:apply %hard-regspec-value y) (:apply %hard-regspec-value =
dest)) =

+    (movq (:%q x) (:%q temp))
+    (subq (:%q y) (:%q temp))
+    (movq (:%q temp) (:%q dest)))
+   ((:not (:pred =3D (:apply %hard-regspec-value y) (:apply %hard-regspec-=
value dest)))
+    (movq (:%q x) (:%q dest))
+    (subq (:%q y) (:%q dest)))))
 =

 =

 =




More information about the Openmcl-cvs-notifications mailing list