aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-11-05 18:36:49 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-11-05 18:36:49 -0500
commitf95b90019459a5b519fecf7c1a6411d1570be3a3 (patch)
tree258e1f51ce0915c5e9d0ed221111e2a4683d1e76
parent5ca582cfa036ef5fa9f15c34435c0f79b2b556ce (diff)
downloadgcc-f95b90019459a5b519fecf7c1a6411d1570be3a3.zip
gcc-f95b90019459a5b519fecf7c1a6411d1570be3a3.tar.gz
gcc-f95b90019459a5b519fecf7c1a6411d1570be3a3.tar.bz2
(cmpxf): Don't call force_const_mem, it looses for PIC;
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. From-SVN: r10563
-rw-r--r--gcc/config/m68k/m68k.md135
1 files changed, 30 insertions, 105 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 8068356..8c115bc 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -6454,24 +6454,10 @@
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"
"*
{
@@ -6617,30 +6603,17 @@
"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")
@@ -6651,10 +6624,10 @@
"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"
"*
{
@@ -6663,36 +6636,23 @@
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")
@@ -6700,7 +6660,7 @@
(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"
"*
{
@@ -6709,44 +6669,31 @@
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"
"*
{
@@ -6755,44 +6702,31 @@
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"
"*
{
@@ -6803,13 +6737,13 @@
(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;
@@ -6841,7 +6775,7 @@
(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"
"*
{
@@ -6852,13 +6786,13 @@
(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;
@@ -6890,7 +6824,7 @@
(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"
"*
{
@@ -6903,10 +6837,7 @@
[(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")
@@ -6936,10 +6867,7 @@
[(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")
@@ -6969,7 +6897,4 @@
[(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")