[PATCH] fixuns_trunc[sd]fdi2 for sparc64

Andrey Petrov petrov@netbsd.org
Fri Feb 7 18:56:00 GMT 2003


This patch adds fixuns_truncsfdi2 and fixuns_truncdfdi2.
It lets avoid quad-float promotion in those conversions.

It's for 3.2 branch, bootstrapped and regtested on sparc64--netbsd.

--
	Andrey Petrov


Index: sparc.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
retrieving revision 1.148.2.15.4.1
diff -c -3 -p -r1.148.2.15.4.1 sparc.md
*** sparc.md    2 Oct 2002 03:47:05 -0000       1.148.2.15.4.1
--- sparc.md    7 Feb 2003 18:32:24 -0000
***************
*** 5236,5244 ****
--- 5236,5260 ----
    [(set_attr "type" "fp")
     (set_attr "fptype" "double")])
  
+ (define_insn "fixuns_truncsfdi2"
+   [(set (match_operand:DI 0 "register_operand" "=e")
+       (fix:DI (unsigned_fix:SF (match_operand:SF 1 "register_operand" "f"))))]
+   "TARGET_V9 && TARGET_FPU"
+   "fstox\\t%1, %0"
+   [(set_attr "type" "fp")
+    (set_attr "fptype" "double")])
+ 
  (define_insn "fix_truncdfdi2"
    [(set (match_operand:DI 0 "register_operand" "=e")
        (fix:DI (fix:DF (match_operand:DF 1 "register_operand" "e"))))]
+   "TARGET_V9 && TARGET_FPU"
+   "fdtox\\t%1, %0"
+   [(set_attr "type" "fp")
+    (set_attr "fptype" "double")])
+ 
+ (define_insn "fixuns_truncdfdi2"
+   [(set (match_operand:DI 0 "register_operand" "=e")
+       (fix:DI (unsigned_fix:DF (match_operand:DF 1 "register_operand" "e"))))]
    "TARGET_V9 && TARGET_FPU"
    "fdtox\\t%1, %0"
    [(set_attr "type" "fp")



More information about the Gcc-patches mailing list