Commit f6968f59 by Michael Meissner

Fix last change; fix large stack frames and int->double conversion

From-SVN: r12944
parent 2eaa1d7e
...@@ -3741,18 +3741,20 @@ ...@@ -3741,18 +3741,20 @@
"* "*
{ {
rtx indx; rtx indx;
HOST_WIDE_INT offset = rs6000_fpmem_offset;
if (rs6000_fpmem_offset > 32760) if (rs6000_fpmem_offset > 32760)
indx = operands[1]; {
indx = operands[1];
offset &= 0xffff;
}
else if (frame_pointer_needed) else if (frame_pointer_needed)
indx = frame_pointer_rtx; indx = frame_pointer_rtx;
else else
indx = stack_pointer_rtx; indx = stack_pointer_rtx;
operands[2] = gen_rtx (MEM, SImode, operands[2] = gen_rtx (MEM, SImode,
gen_rtx (PLUS, Pmode, gen_rtx (PLUS, Pmode, indx, GEN_INT (offset)));
indx,
GEN_INT (rs6000_fpmem_offset)));
return \"lfd %0,%2\"; return \"lfd %0,%2\";
}" }"
...@@ -5583,7 +5585,14 @@ ...@@ -5583,7 +5585,14 @@
{ {
operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
split_double (operands[1], &operands[4], &operands[5]);
#ifdef HOST_WORDS_BIG_ENDIAN
operands[4] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
operands[5] = GEN_INT (CONST_DOUBLE_HIGH (operands[1]));
#else
operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1]));
operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
#endif
}") }")
(define_split (define_split
...@@ -5595,15 +5604,18 @@ ...@@ -5595,15 +5604,18 @@
(set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))]
" "
{ {
rtx high_rtx, low_rtx;
HOST_WIDE_INT high; HOST_WIDE_INT high;
HOST_WIDE_INT low; HOST_WIDE_INT low;
rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
rtx low_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); rtx low_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
split_double (operands[1], &high_rtx, &low_rtx); #ifdef HOST_WORDS_BIG_ENDIAN
high = INTVAL (high_rtx); high = CONST_DOUBLE_LOW (operands[1]);
low = INTVAL (low_rtx); low = CONST_DOUBLE_HIGH (operands[1]);
#else
high = CONST_DOUBLE_HIGH (operands[1]);
low = CONST_DOUBLE_LOW (operands[1]);
#endif
if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000)
|| (low & 0xffff) == 0) || (low & 0xffff) == 0)
...@@ -5634,13 +5646,8 @@ ...@@ -5634,13 +5646,8 @@
(set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))]
" "
{ {
rtx high_rtx, low_rtx; HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]);
HOST_WIDE_INT high; HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]);
HOST_WIDE_INT low;
split_double (operands[1], &high_rtx, &low_rtx);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
...@@ -5802,10 +5809,8 @@ ...@@ -5802,10 +5809,8 @@
if (GET_CODE (operands[1]) == CONST_DOUBLE) if (GET_CODE (operands[1]) == CONST_DOUBLE)
{ {
rtx high_rtx, low_rtx; low = CONST_DOUBLE_LOW (operands[1]);
split_double (operands[1], &high_rtx, &low_rtx); high = CONST_DOUBLE_HIGH (operands[1]);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
} }
else else
#if HOST_BITS_PER_WIDE_INT == 32 #if HOST_BITS_PER_WIDE_INT == 32
...@@ -5943,7 +5948,8 @@ ...@@ -5943,7 +5948,8 @@
{ {
operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
split_double (operands[1], &operands[4], &operands[5]); operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1]));
operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
}") }")
(define_split (define_split
...@@ -5955,26 +5961,10 @@ ...@@ -5955,26 +5961,10 @@
(set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))]
" "
{ {
rtx high_rtx, low_rtx; HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]);
HOST_WIDE_INT high; HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]);
HOST_WIDE_INT low; rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
rtx high_reg, low_reg; rtx low_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
if (WORDS_BIG_ENDIAN)
{
high_reg = gen_rtx (SUBREG, SImode, operands[0], 0);
low_reg = gen_rtx (SUBREG, SImode, operands[0], 1);
split_double (operands[1], &high_rtx, &low_rtx);
}
else
{
high_reg = gen_rtx (SUBREG, SImode, operands[0], 1);
low_reg = gen_rtx (SUBREG, SImode, operands[0], 0);
split_double (operands[1], &low_rtx, &high_rtx);
}
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000)
|| (low & 0xffff) == 0) || (low & 0xffff) == 0)
...@@ -6005,23 +5995,8 @@ ...@@ -6005,23 +5995,8 @@
(set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))]
" "
{ {
rtx high_rtx, low_rtx; HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]);
HOST_WIDE_INT high; HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]);
HOST_WIDE_INT low;
rtx high_reg, low_reg;
if (WORDS_BIG_ENDIAN)
{
high_reg = gen_rtx (SUBREG, SImode, operands[0], 0);
low_reg = gen_rtx (SUBREG, SImode, operands[0], 1);
split_double (operands[1], &high_rtx, &low_rtx);
}
else
{
high_reg = gen_rtx (SUBREG, SImode, operands[0], 1);
low_reg = gen_rtx (SUBREG, SImode, operands[0], 0);
split_double (operands[1], &low_rtx, &high_rtx);
}
operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0);
operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0);
...@@ -6083,10 +6058,8 @@ ...@@ -6083,10 +6058,8 @@
if (GET_CODE (operands[1]) == CONST_DOUBLE) if (GET_CODE (operands[1]) == CONST_DOUBLE)
{ {
rtx high_rtx, low_rtx; low = CONST_DOUBLE_LOW (operands[1]);
split_double (operands[1], &high_rtx, &low_rtx); high = CONST_DOUBLE_HIGH (operands[1]);
high = INTVAL (high_rtx);
low = INTVAL (low_rtx);
} }
else else
#if HOST_BITS_PER_WIDE_INT == 32 #if HOST_BITS_PER_WIDE_INT == 32
......
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