aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wehle <john@feith.com>1999-04-20 10:18:33 +0000
committerJohn Wehle <wehle@gcc.gnu.org>1999-04-20 10:18:33 +0000
commit296967fe64ee8b65d64c6b0f4143ced1f50ecc7d (patch)
treec66beb31756c33f451cb72266ed8b08d93587964
parent01f78a025e7e000b836ab9ff76ffc3b9958ba43e (diff)
downloadgcc-296967fe64ee8b65d64c6b0f4143ced1f50ecc7d.zip
gcc-296967fe64ee8b65d64c6b0f4143ced1f50ecc7d.tar.gz
gcc-296967fe64ee8b65d64c6b0f4143ced1f50ecc7d.tar.bz2
i386.c (output_move_double): Abort if a non-offsettable memory operand is encountered.
* i386.c (output_move_double): Abort if a non-offsettable memory operand is encountered. Delete unused code. (find_addr_reg): Remove. From-SVN: r26561
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c99
2 files changed, 18 insertions, 87 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5dc1f09..c31352a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Tue Apr 20 13:14:58 EDT 1999 John Wehle (john@feith.com)
+
+ * i386.c (output_move_double): Abort if a non-offsettable
+ memory operand is encountered. Delete unused code.
+ (find_addr_reg): Remove.
+
Mon Apr 19 21:13:02 1999 Craig Burley <craig@jcb-sc.com>
* tree.def (BLOCK): Fix typo in comment.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4faff7b..854be25 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -992,32 +992,6 @@ singlemove_string (operands)
}
}
-/* Return a REG that occurs in ADDR with coefficient 1.
- ADDR can be effectively incremented by incrementing REG. */
-
-static rtx
-find_addr_reg (addr)
- rtx addr;
-{
- while (GET_CODE (addr) == PLUS)
- {
- if (GET_CODE (XEXP (addr, 0)) == REG)
- addr = XEXP (addr, 0);
- else if (GET_CODE (XEXP (addr, 1)) == REG)
- addr = XEXP (addr, 1);
- else if (CONSTANT_P (XEXP (addr, 0)))
- addr = XEXP (addr, 1);
- else if (CONSTANT_P (XEXP (addr, 1)))
- addr = XEXP (addr, 0);
- else
- abort ();
- }
-
- if (GET_CODE (addr) == REG)
- return addr;
- abort ();
-}
-
/* Output an insn to add the constant N to the register X. */
static void
@@ -1055,7 +1029,6 @@ output_move_double (operands)
rtx latehalf[2];
rtx middlehalf[2];
rtx xops[2];
- rtx addreg0 = 0, addreg1 = 0;
int dest_overlapped_low = 0;
int size = GET_MODE_SIZE (GET_MODE (operands[0]));
@@ -1092,11 +1065,14 @@ output_move_double (operands)
else
optype1 = RNDOP;
- /* Check for the cases that the operand constraints are not
- supposed to allow to happen. Abort if we get one,
- because generating code for these cases is painful. */
+ /* Check for the cases that are not supposed to happen
+ either due to the operand constraints or the fact
+ that all memory operands on the x86 are offsettable.
+ Abort if we get one, because generating code for these
+ cases is painful. */
- if (optype0 == RNDOP || optype1 == RNDOP)
+ if (optype0 == RNDOP || optype1 == RNDOP
+ || optype0 == MEMOP || optype1 == MEMOP)
abort ();
/* If one operand is decrementing and one is incrementing
@@ -1131,15 +1107,6 @@ output_move_double (operands)
optype1 = OFFSOP;
}
- /* If an operand is an unoffsettable memory ref, find a register
- we can increment temporarily to make it refer to the second word. */
-
- if (optype0 == MEMOP)
- addreg0 = find_addr_reg (XEXP (operands[0], 0));
-
- if (optype1 == MEMOP)
- addreg1 = find_addr_reg (XEXP (operands[1], 0));
-
/* Ok, we can do one word at a time.
Normally we do the low-numbered word first,
but if either operand is autodecrementing then we
@@ -1236,8 +1203,7 @@ output_move_double (operands)
emit the move late-half first. Otherwise, compute the MEM address
into the upper part of N and use that as a pointer to the memory
operand. */
- if (optype0 == REGOP
- && (optype1 == OFFSOP || optype1 == MEMOP))
+ if (optype0 == REGOP && optype1 == OFFSOP)
{
if (reg_mentioned_p (operands[0], XEXP (operands[1], 0))
&& reg_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
@@ -1269,10 +1235,6 @@ output_move_double (operands)
|| reg_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
goto compadr;
- /* JRV says this can't happen: */
- if (addreg0 || addreg1)
- abort ();
-
/* Only the middle reg conflicts; simply put it last. */
output_asm_insn (singlemove_string (operands), operands);
output_asm_insn (singlemove_string (latehalf), latehalf);
@@ -1307,29 +1269,11 @@ output_move_double (operands)
|| REGNO (operands[0]) == REGNO (latehalf[1])))
|| dest_overlapped_low)
{
- /* Make any unoffsettable addresses point at high-numbered word. */
- if (addreg0)
- asm_add (size-4, addreg0);
- if (addreg1)
- asm_add (size-4, addreg1);
-
- /* Do that word. */
+ /* Do the high-numbered word. */
output_asm_insn (singlemove_string (latehalf), latehalf);
- /* Undo the adds we just did. */
- if (addreg0)
- asm_add (-4, addreg0);
- if (addreg1)
- asm_add (-4, addreg1);
-
if (size == 12)
- {
- output_asm_insn (singlemove_string (middlehalf), middlehalf);
- if (addreg0)
- asm_add (-4, addreg0);
- if (addreg1)
- asm_add (-4, addreg1);
- }
+ output_asm_insn (singlemove_string (middlehalf), middlehalf);
/* Do low-numbered word. */
return singlemove_string (operands);
@@ -1341,30 +1285,11 @@ output_move_double (operands)
/* Do the middle one of the three words for long double */
if (size == 12)
- {
- if (addreg0)
- asm_add (4, addreg0);
- if (addreg1)
- asm_add (4, addreg1);
-
- output_asm_insn (singlemove_string (middlehalf), middlehalf);
- }
-
- /* Make any unoffsettable addresses point at high-numbered word. */
- if (addreg0)
- asm_add (4, addreg0);
- if (addreg1)
- asm_add (4, addreg1);
+ output_asm_insn (singlemove_string (middlehalf), middlehalf);
- /* Do that word. */
+ /* Do the high-numbered word. */
output_asm_insn (singlemove_string (latehalf), latehalf);
- /* Undo the adds we just did. */
- if (addreg0)
- asm_add (4-size, addreg0);
- if (addreg1)
- asm_add (4-size, addreg1);
-
return "";
}