Commit c4338b47 by Richard Kenner

(everywhere): Correct range is -0x1fffffff to 0x20000000, others have to be loaded with movd.

(everywhere): Correct range is -0x1fffffff to 0x20000000, others have to be
loaded with movd.
Shortcircuit with TARGET_32532 as early as possible.
(movsi): Use movd to load unknown symbol values. to allow

From-SVN: r8561
parent 989b3e72
...@@ -318,6 +318,8 @@ ...@@ -318,6 +318,8 @@
"" ""
"* "*
{ {
extern int flag_pic; \
if (FP_REG_P (operands[0])) if (FP_REG_P (operands[0]))
{ {
if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 8) if (GET_CODE (operands[1]) == REG && REGNO (operands[1]) < 8)
...@@ -344,16 +346,25 @@ ...@@ -344,16 +346,25 @@
{ {
if (i <= 7 && i >= -8) if (i <= 7 && i >= -8)
return \"movqd %1,%0\"; return \"movqd %1,%0\";
if (i < 0x4000 && i >= -0x4000) if (i <= 0x1fffffff && i >= -0x20000000)
#if defined (GNX_V3) || defined (UTEK_ASM) #if defined (GNX_V3) || defined (UTEK_ASM)
return \"addr %c1,%0\"; return \"addr %c1,%0\";
#else #else
return \"addr @%c1,%0\"; return \"addr @%c1,%0\";
#endif #endif
return \"movd %$%1,%0\";
} }
else else
return output_move_dconst(i, \"%$%1,%0\"); return output_move_dconst(i, \"%$%1,%0\");
} }
else if (GET_CODE (operands[1]) == CONST && ! flag_pic)
{
/* Must contain symbols so we don`t know how big it is. In
* that case addr might lead to overflow. For PIC symbolic
* address loads always have to be done with addr.
*/
return \"movd %$%1,%0\";
}
else if (GET_CODE (operands[1]) == REG) else if (GET_CODE (operands[1]) == REG)
{ {
if (REGNO (operands[1]) < 16) if (REGNO (operands[1]) < 16)
...@@ -867,8 +878,8 @@ ...@@ -867,8 +878,8 @@
if (i <= 7 && i >= -8) if (i <= 7 && i >= -8)
return \"addqd %2,%0\"; return \"addqd %2,%0\";
else if (GET_CODE (operands[0]) == REG else if (! TARGET_32532 && GET_CODE (operands[0]) == REG
&& i < 0x4000 && i >= -0x4000 && ! TARGET_32532) && i <= 0x1fffffff && i >= -0x20000000)
return \"addr %c2(%0),%0\"; return \"addr %c2(%0),%0\";
} }
return \"addd %2,%0\"; return \"addd %2,%0\";
...@@ -953,8 +964,8 @@ ...@@ -953,8 +964,8 @@
"GET_CODE (operands[0]) == CONST_INT" "GET_CODE (operands[0]) == CONST_INT"
"* "*
{ {
if (GET_CODE(operands[0]) == CONST_INT && INTVAL(operands[0]) < 64 if (! TARGET_32532 && GET_CODE(operands[0]) == CONST_INT
&& INTVAL(operands[0]) > -64 && ! TARGET_32532) && INTVAL(operands[0]) < 64 && INTVAL(operands[0]) > -64)
return \"adjspb %$%0\"; return \"adjspb %$%0\";
return \"adjspd %$%0\"; return \"adjspd %$%0\";
}") }")
...@@ -1443,7 +1454,7 @@ ...@@ -1443,7 +1454,7 @@
{ {
if (INTVAL (operands[2]) == 1) if (INTVAL (operands[2]) == 1)
return \"addw %0,%0\"; return \"addw %0,%0\";
else if (INTVAL (operands[2]) == 2 && !TARGET_32532) else if (! TARGET_32532 && INTVAL (operands[2]) == 2)
return \"addw %0,%0\;addw %0,%0\"; return \"addw %0,%0\;addw %0,%0\";
} }
if (TARGET_32532) if (TARGET_32532)
...@@ -1462,7 +1473,7 @@ ...@@ -1462,7 +1473,7 @@
{ {
if (INTVAL (operands[2]) == 1) if (INTVAL (operands[2]) == 1)
return \"addb %0,%0\"; return \"addb %0,%0\";
else if (INTVAL (operands[2]) == 2 && !TARGET_32532) else if (! TARGET_32532 && INTVAL (operands[2]) == 2)
return \"addb %0,%0\;addb %0,%0\"; return \"addb %0,%0\;addb %0,%0\";
} }
if (TARGET_32532) if (TARGET_32532)
......
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