CMUCL commit: src/compiler/x86 (float-sse2.lisp insts.lisp)

Raymond Toy rtoy at common-lisp.net
Wed Aug 11 23:29:49 CEST 2010


    Date: Wednesday, August 11, 2010 @ 17:29:49
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/compiler/x86

Modified: float-sse2.lisp insts.lisp

insts.lisp:
o Add UCOMISS and UCOMISD instructions.

float-sse2.lisp:
o Use UCOMISS and UCOMISD in the =/single-float and =/double-float
  vops to match what we do on x87.  This won't signal invalid
  operation if one of the operands is NaN.
o Rename some vops to match the vop naming convention.


-----------------+
 float-sse2.lisp |   14 +++++++-------
 insts.lisp      |    4 +++-
 2 files changed, 10 insertions(+), 8 deletions(-)


Index: src/compiler/x86/float-sse2.lisp
diff -u src/compiler/x86/float-sse2.lisp:1.17 src/compiler/x86/float-sse2.lisp:1.18
--- src/compiler/x86/float-sse2.lisp:1.17	Fri Aug  6 05:41:41 2010
+++ src/compiler/x86/float-sse2.lisp	Wed Aug 11 17:29:49 2010
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group at cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.17 2010-08-06 09:41:41 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.18 2010-08-11 21:29:49 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -879,7 +879,7 @@
   (:vop-var vop)
   (:generator 3
     (note-this-location vop :internal-error)
-    (inst comiss x y)
+    (inst ucomiss x y)
     ;; if PF&CF, there was a NaN involved => not equal
     ;; otherwise, ZF => equal
     (cond (not-p
@@ -897,7 +897,7 @@
   (:vop-var vop)
   (:generator 3
     (note-this-location vop :internal-error)
-    (inst comisd x y)
+    (inst ucomisd x y)
     (cond (not-p
            (inst jmp :p target)
            (inst jmp :ne target))
@@ -907,7 +907,7 @@
              (inst jmp :e target)
              (emit-label not-lab))))))
 
-(define-vop (<double-float double-float-compare)
+(define-vop (</double-float double-float-compare)
   (:translate <)
   (:info target not-p)
   (:generator 3
@@ -921,7 +921,7 @@
              (inst jmp :c target)
              (emit-label not-lab))))))
 
-(define-vop (<single-float single-float-compare)
+(define-vop (</single-float single-float-compare)
   (:translate <)
   (:info target not-p)
   (:generator 3
@@ -935,7 +935,7 @@
              (inst jmp :c target)
              (emit-label not-lab))))))
 
-(define-vop (>double-float double-float-compare)
+(define-vop (>/double-float double-float-compare)
   (:translate >)
   (:info target not-p)
   (:generator 3
@@ -949,7 +949,7 @@
              (inst jmp :a target)
              (emit-label not-lab))))))
 
-(define-vop (>single-float single-float-compare)
+(define-vop (>/single-float single-float-compare)
   (:translate >)
   (:info target not-p)
   (:generator 3
Index: src/compiler/x86/insts.lisp
diff -u src/compiler/x86/insts.lisp:1.36 src/compiler/x86/insts.lisp:1.37
--- src/compiler/x86/insts.lisp:1.36	Fri Aug  6 15:01:42 2010
+++ src/compiler/x86/insts.lisp	Wed Aug 11 17:29:49 2010
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group at cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/compiler/x86/insts.lisp,v 1.36 2010-08-06 19:01:42 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/compiler/x86/insts.lisp,v 1.37 2010-08-11 21:29:49 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -3140,6 +3140,8 @@
   ;; comparison
   (define-regular-sse-inst comisd   #x66 #x2f)
   (define-regular-sse-inst comiss   nil  #x2f)
+  (define-regular-sse-inst ucomisd   #x66 #x2e)
+  (define-regular-sse-inst ucomiss   nil  #x2e)
   ;; arithmetic
   (define-regular-sse-inst addsd    #xf2 #x58)
   (define-regular-sse-inst addpd    #x66 #x58 t)



More information about the cmucl-commit mailing list