OSDN Git Service

(cmpxf): Don't call force_const_mem, it looses for PIC;
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 5 Nov 1995 23:36:49 +0000 (23:36 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 5 Nov 1995 23:36:49 +0000 (23:36 +0000)
get predicates right instead.  Get rid of separate DEFINE_EXPAND.
(addxf3, subxf3, mulxf3, divxf3): Likewise.
(All XFmode patterns): Delete `F' and `G' constraints.
(absxf2): Delete spurious condition on TARGET_FPA.
(negxf2): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10563 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/m68k/m68k.md

index 8068356..8c115bc 100644 (file)
   return \"ftst%.x %0\";
 }")
 
-
-(define_expand "cmpxf"
+(define_insn "cmpxf"
   [(set (cc0)
-       (compare (match_operand:XF 0 "general_operand" "f,mG")
-                (match_operand:XF 1 "general_operand" "fmG,f")))]
-  "TARGET_68881"
-  "
-{
-  if (CONSTANT_P (operands[0]))
-      operands[0] = force_const_mem (XFmode, operands[0]);
-  if (CONSTANT_P (operands[1]))
-      operands[1] = force_const_mem (XFmode, operands[1]);
-}")
-
-(define_insn ""
-  [(set (cc0)
-       (compare (match_operand:XF 0 "nonimmediate_operand" "f,mG")
-                (match_operand:XF 1 "nonimmediate_operand" "fmG,f")))]
+       (compare (match_operand:XF 0 "nonimmediate_operand" "f,m")
+                (match_operand:XF 1 "nonimmediate_operand" "fm,f")))]
   "TARGET_68881"
   "*
 {
   "TARGET_68881"
   "fmove%.l %1,%0")
 
-(define_expand "addxf3"
-  [(set (match_operand:XF 0 "general_operand" "")
-       (plus:XF (match_operand:XF 1 "general_operand" "")
-                (match_operand:XF 2 "general_operand" "")))]
-  "TARGET_68881"
-  "
-{
-  if (CONSTANT_P (operands[1]))
-    operands[1] = force_const_mem (XFmode, operands[1]);
-  if (CONSTANT_P (operands[2]))
-    operands[2] = force_const_mem (XFmode, operands[2]);
-}")
-
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (plus:XF (float:XF (match_operand:SI 2 "general_operand" "dmi"))
-                (match_operand:XF 1 "general_operand" "0")))]
+                (match_operand:XF 1 "nonimmediate_operand" "0")))]
   "TARGET_68881"
   "fadd%.l %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (plus:XF (float:XF (match_operand:HI 2 "general_operand" "dmn"))
-                (match_operand:XF 1 "general_operand" "0")))]
+                (match_operand:XF 1 "nonimmediate_operand" "0")))]
   "TARGET_68881"
   "fadd%.w %2,%0")
 
   "TARGET_68881"
   "fadd%.b %2,%0")
 
-(define_insn ""
+(define_insn "addxf3"
   [(set (match_operand:XF 0 "general_operand" "=f")
        (plus:XF (match_operand:XF 1 "nonimmediate_operand" "%0")
-                (match_operand:XF 2 "nonimmediate_operand" "fmG")))]
+                (match_operand:XF 2 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
   return \"fadd%.x %f2,%0\";
 }")
 
-(define_expand "subxf3"
-  [(set (match_operand:XF 0 "general_operand" "")
-       (minus:XF (match_operand:XF 1 "general_operand" "")
-                (match_operand:XF 2 "general_operand" "")))]
-  "TARGET_68881"
-  "
-{
-  if (CONSTANT_P (operands[1]))
-    operands[1] = force_const_mem (XFmode, operands[1]);
-  if (CONSTANT_P (operands[2]))
-    operands[2] = force_const_mem (XFmode, operands[2]);
-}")
-
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (minus:XF (match_operand:XF 1 "general_operand" "0")
+       (minus:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                  (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
   "TARGET_68881"
   "fsub%.l %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (minus:XF (match_operand:XF 1 "general_operand" "0")
+       (minus:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                  (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
   "TARGET_68881"
   "fsub%.w %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (minus:XF (match_operand:XF 1 "general_operand" "0")
+       (minus:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                  (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
   "TARGET_68881"
   "fsub%.b %2,%0")
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (minus:XF (match_operand:XF 1 "nonimmediate_operand" "0")
-                (match_operand:XF 2 "nonimmediate_operand" "fmG")))]
+                (match_operand:XF 2 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
   return \"fsub%.x %f2,%0\";
 }")
 
-(define_expand "mulxf3"
-  [(set (match_operand:XF 0 "general_operand" "")
-       (mult:XF (match_operand:XF 1 "general_operand" "")
-               (match_operand:XF 2 "general_operand" "")))]
-  "TARGET_68881"
-  "
-{
-  if (CONSTANT_P (operands[1]))
-    operands[1] = force_const_mem (XFmode, operands[1]);
-  if (CONSTANT_P (operands[2]))
-    operands[2] = force_const_mem (XFmode, operands[2]);
-}")
-
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (mult:XF (float:XF (match_operand:SI 2 "general_operand" "dmi"))
-                (match_operand:XF 1 "general_operand" "0")))]
+                (match_operand:XF 1 "nonimmediate_operand" "0")))]
   "TARGET_68881"
   "fmul%.l %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (mult:XF (float:XF (match_operand:HI 2 "general_operand" "dmn"))
-                (match_operand:XF 1 "general_operand" "0")))]
+                (match_operand:XF 1 "nonimmediate_operand" "0")))]
   "TARGET_68881"
   "fmul%.w %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
        (mult:XF (float:XF (match_operand:QI 2 "general_operand" "dmn"))
-                (match_operand:XF 1 "general_operand" "0")))]
+                (match_operand:XF 1 "nonimmediate_operand" "0")))]
   "TARGET_68881"
   "fmul%.b %2,%0")
 
-(define_insn ""
+(define_insn "mulxf3"
   [(set (match_operand:XF 0 "general_operand" "=f")
        (mult:XF (match_operand:XF 1 "nonimmediate_operand" "%0")
-               (match_operand:XF 2 "nonimmediate_operand" "fmG")))]
+                (match_operand:XF 2 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
   return \"fmul%.x %f2,%0\";
 }")
 
-(define_expand "divxf3"
-  [(set (match_operand:XF 0 "general_operand" "")
-       (div:XF (match_operand:XF 1 "general_operand" "")
-               (match_operand:XF 2 "general_operand" "")))]
-  "TARGET_68881"
-  "
-{
-  if (CONSTANT_P (operands[1]))
-    operands[1] = force_const_mem (XFmode, operands[1]);
-  if (CONSTANT_P (operands[2]))
-    operands[2] = force_const_mem (XFmode, operands[2]);
-}")
-
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (div:XF (match_operand:XF 1 "general_operand" "0")
+       (div:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
   "TARGET_68881"
   "fdiv%.l %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (div:XF (match_operand:XF 1 "general_operand" "0")
+       (div:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
   "TARGET_68881"
   "fdiv%.w %2,%0")
 
 (define_insn ""
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (div:XF (match_operand:XF 1 "general_operand" "0")
+       (div:XF (match_operand:XF 1 "nonimmediate_operand" "0")
                (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
   "TARGET_68881"
   "fdiv%.b %2,%0")
 
-(define_insn ""
+(define_insn "divxf3"
   [(set (match_operand:XF 0 "general_operand" "=f")
        (div:XF (match_operand:XF 1 "nonimmediate_operand" "0")
-               (match_operand:XF 2 "nonimmediate_operand" "fmG")))]
+               (match_operand:XF 2 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
 
 (define_expand "negxf2"
   [(set (match_operand:XF 0 "general_operand" "")
-       (neg:XF (match_operand:XF 1 "general_operand" "")))]
+       (neg:XF (match_operand:XF 1 "nonimmediate_operand" "")))]
   ""
   "
 {
   /* ??? There isn't an FPA define_insn so we could handle it here too.
      For now we don't (paranoia).  */
-  if (!TARGET_FPA && !TARGET_68881)
+  if (!TARGET_68881)
     {
       rtx result;
       rtx target;
 
 (define_insn "negxf2_68881"
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (neg:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))]
+       (neg:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
 
 (define_expand "absxf2"
   [(set (match_operand:XF 0 "general_operand" "")
-       (abs:XF (match_operand:XF 1 "general_operand" "")))]
+       (abs:XF (match_operand:XF 1 "nonimmediate_operand" "")))]
   ""
   "
 {
   /* ??? There isn't an FPA define_insn so we could handle it here too.
      For now we don't (paranoia).  */
-  if (!TARGET_FPA && !TARGET_68881)
+  if (!TARGET_68881)
     {
       rtx result;
       rtx target;
 
 (define_insn "absxf2_68881"
   [(set (match_operand:XF 0 "general_operand" "=f")
-       (abs:XF (match_operand:XF 1 "nonimmediate_operand" "fmF")))]
+       (abs:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
   "*
 {
   [(set (match_operand:XF 0 "general_operand" "=f")
        (sqrt:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))]
   "TARGET_68881"
-  "*
-{
-    return \"fsqrt%.x %1,%0\";
-}")
+  "fsqrt%.x %1,%0")
 
 (define_insn "sinsf2"
   [(set (match_operand:SF 0 "general_operand" "=f")
   [(set (match_operand:XF 0 "general_operand" "=f")
        (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))]
   "TARGET_68881 && flag_fast_math"
-  "*
-{
-    return \"fsin%.x %1,%0\";
-}")
+  "fsin%.x %1,%0")
 
 (define_insn "cossf2"
   [(set (match_operand:SF 0 "general_operand" "=f")
   [(set (match_operand:XF 0 "general_operand" "=f")
        (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))]
   "TARGET_68881 && flag_fast_math"
-  "*
-{
-    return \"fcos%.x %1,%0\";
-}")
+  "fcos%.x %1,%0")