Commit f95b9001 by Richard Kenner

(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
parent 5ca582cf
...@@ -6454,24 +6454,10 @@ ...@@ -6454,24 +6454,10 @@
return \"ftst%.x %0\"; return \"ftst%.x %0\";
}") }")
(define_insn "cmpxf"
(define_expand "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) [(set (cc0)
(compare (match_operand:XF 0 "nonimmediate_operand" "f,mG") (compare (match_operand:XF 0 "nonimmediate_operand" "f,m")
(match_operand:XF 1 "nonimmediate_operand" "fmG,f")))] (match_operand:XF 1 "nonimmediate_operand" "fm,f")))]
"TARGET_68881" "TARGET_68881"
"* "*
{ {
...@@ -6617,30 +6603,17 @@ ...@@ -6617,30 +6603,17 @@
"TARGET_68881" "TARGET_68881"
"fmove%.l %1,%0") "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 "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(plus:XF (float:XF (match_operand:SI 2 "general_operand" "dmi")) (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" "TARGET_68881"
"fadd%.l %2,%0") "fadd%.l %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(plus:XF (float:XF (match_operand:HI 2 "general_operand" "dmn")) (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" "TARGET_68881"
"fadd%.w %2,%0") "fadd%.w %2,%0")
...@@ -6651,10 +6624,10 @@ ...@@ -6651,10 +6624,10 @@
"TARGET_68881" "TARGET_68881"
"fadd%.b %2,%0") "fadd%.b %2,%0")
(define_insn "" (define_insn "addxf3"
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(plus:XF (match_operand:XF 1 "nonimmediate_operand" "%0") (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" "TARGET_68881"
"* "*
{ {
...@@ -6663,36 +6636,23 @@ ...@@ -6663,36 +6636,23 @@
return \"fadd%.x %f2,%0\"; 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 "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
"TARGET_68881" "TARGET_68881"
"fsub%.l %2,%0") "fsub%.l %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
"TARGET_68881" "TARGET_68881"
"fsub%.w %2,%0") "fsub%.w %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
"TARGET_68881" "TARGET_68881"
"fsub%.b %2,%0") "fsub%.b %2,%0")
...@@ -6700,7 +6660,7 @@ ...@@ -6700,7 +6660,7 @@
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(minus:XF (match_operand:XF 1 "nonimmediate_operand" "0") (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" "TARGET_68881"
"* "*
{ {
...@@ -6709,44 +6669,31 @@ ...@@ -6709,44 +6669,31 @@
return \"fsub%.x %f2,%0\"; 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 "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(mult:XF (float:XF (match_operand:SI 2 "general_operand" "dmi")) (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" "TARGET_68881"
"fmul%.l %2,%0") "fmul%.l %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(mult:XF (float:XF (match_operand:HI 2 "general_operand" "dmn")) (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" "TARGET_68881"
"fmul%.w %2,%0") "fmul%.w %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(mult:XF (float:XF (match_operand:QI 2 "general_operand" "dmn")) (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" "TARGET_68881"
"fmul%.b %2,%0") "fmul%.b %2,%0")
(define_insn "" (define_insn "mulxf3"
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(mult:XF (match_operand:XF 1 "nonimmediate_operand" "%0") (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" "TARGET_68881"
"* "*
{ {
...@@ -6755,44 +6702,31 @@ ...@@ -6755,44 +6702,31 @@
return \"fmul%.x %f2,%0\"; 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 "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:SI 2 "general_operand" "dmi"))))]
"TARGET_68881" "TARGET_68881"
"fdiv%.l %2,%0") "fdiv%.l %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:HI 2 "general_operand" "dmn"))))]
"TARGET_68881" "TARGET_68881"
"fdiv%.w %2,%0") "fdiv%.w %2,%0")
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "general_operand" "=f") [(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"))))] (float:XF (match_operand:QI 2 "general_operand" "dmn"))))]
"TARGET_68881" "TARGET_68881"
"fdiv%.b %2,%0") "fdiv%.b %2,%0")
(define_insn "" (define_insn "divxf3"
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(div:XF (match_operand:XF 1 "nonimmediate_operand" "0") (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" "TARGET_68881"
"* "*
{ {
...@@ -6803,13 +6737,13 @@ ...@@ -6803,13 +6737,13 @@
(define_expand "negxf2" (define_expand "negxf2"
[(set (match_operand:XF 0 "general_operand" "") [(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. /* ??? There isn't an FPA define_insn so we could handle it here too.
For now we don't (paranoia). */ For now we don't (paranoia). */
if (!TARGET_FPA && !TARGET_68881) if (!TARGET_68881)
{ {
rtx result; rtx result;
rtx target; rtx target;
...@@ -6841,7 +6775,7 @@ ...@@ -6841,7 +6775,7 @@
(define_insn "negxf2_68881" (define_insn "negxf2_68881"
[(set (match_operand:XF 0 "general_operand" "=f") [(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" "TARGET_68881"
"* "*
{ {
...@@ -6852,13 +6786,13 @@ ...@@ -6852,13 +6786,13 @@
(define_expand "absxf2" (define_expand "absxf2"
[(set (match_operand:XF 0 "general_operand" "") [(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. /* ??? There isn't an FPA define_insn so we could handle it here too.
For now we don't (paranoia). */ For now we don't (paranoia). */
if (!TARGET_FPA && !TARGET_68881) if (!TARGET_68881)
{ {
rtx result; rtx result;
rtx target; rtx target;
...@@ -6890,7 +6824,7 @@ ...@@ -6890,7 +6824,7 @@
(define_insn "absxf2_68881" (define_insn "absxf2_68881"
[(set (match_operand:XF 0 "general_operand" "=f") [(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" "TARGET_68881"
"* "*
{ {
...@@ -6903,10 +6837,7 @@ ...@@ -6903,10 +6837,7 @@
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(sqrt:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))] (sqrt:XF (match_operand:XF 1 "nonimmediate_operand" "fm")))]
"TARGET_68881" "TARGET_68881"
"* "fsqrt%.x %1,%0")
{
return \"fsqrt%.x %1,%0\";
}")
(define_insn "sinsf2" (define_insn "sinsf2"
[(set (match_operand:SF 0 "general_operand" "=f") [(set (match_operand:SF 0 "general_operand" "=f")
...@@ -6936,10 +6867,7 @@ ...@@ -6936,10 +6867,7 @@
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))] (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))]
"TARGET_68881 && flag_fast_math" "TARGET_68881 && flag_fast_math"
"* "fsin%.x %1,%0")
{
return \"fsin%.x %1,%0\";
}")
(define_insn "cossf2" (define_insn "cossf2"
[(set (match_operand:SF 0 "general_operand" "=f") [(set (match_operand:SF 0 "general_operand" "=f")
...@@ -6969,7 +6897,4 @@ ...@@ -6969,7 +6897,4 @@
[(set (match_operand:XF 0 "general_operand" "=f") [(set (match_operand:XF 0 "general_operand" "=f")
(unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))] (unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))]
"TARGET_68881 && flag_fast_math" "TARGET_68881 && flag_fast_math"
"* "fcos%.x %1,%0")
{
return \"fcos%.x %1,%0\";
}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment