diff options
author | John Wehle <john@feith.com> | 1999-04-07 10:25:42 +0000 |
---|---|---|
committer | John Wehle <wehle@gcc.gnu.org> | 1999-04-07 10:25:42 +0000 |
commit | 61a1397b0635f1d301dd9a7f4ff5adac9010acb1 (patch) | |
tree | 1a75201b8af820760064d2a467424c75f1936b66 | |
parent | 1530be84fcd15570f9885c29a8cc94880ecd6d57 (diff) | |
download | gcc-61a1397b0635f1d301dd9a7f4ff5adac9010acb1.zip gcc-61a1397b0635f1d301dd9a7f4ff5adac9010acb1.tar.gz gcc-61a1397b0635f1d301dd9a7f4ff5adac9010acb1.tar.bz2 |
i386.c (output_move_memory): Remove.
* i386.c (output_move_memory): Remove.
* i386.h: Likewise.
* i386.md (movsi, movhi, movstricthi, movqi, movstrictqi,
movsf, movdf, movxf, movdi): Check no_new_pseudos instead
of (reload_in_progress | reload_completed).
From-SVN: r26258
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 119 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 18 |
4 files changed, 18 insertions, 129 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e13b8ee..8160081 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Wed Apr 7 13:16:22 EDT 1999 John Wehle (john@feith.com) + + * i386.c (output_move_memory): Remove. + * i386.h: Likewise. + + * i386.md (movsi, movhi, movstricthi, movqi, movstrictqi, + movsf, movdf, movxf, movdi): Check no_new_pseudos instead + of (reload_in_progress | reload_completed). + Wed Apr 7 03:16:45 1999 Richard Henderson <rth@cygnus.com> * alpha.c (reg_no_subreg_operand): New function. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 81a024a2..adec5a2 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1480,125 +1480,6 @@ output_move_pushmem (operands, insn, length, tmp_start, n_operands) return ""; } -/* Output the appropriate code to move data between two memory locations */ - -char * -output_move_memory (operands, insn, length, tmp_start, n_operands) - rtx operands[]; - rtx insn; - int length; - int tmp_start; - int n_operands; -{ - struct - { - char *load; - char *store; - rtx xops[3]; - } tmp_info[MAX_TMPS]; - - rtx dest = operands[0]; - rtx src = operands[1]; - rtx qi_tmp = NULL_RTX; - int max_tmps = 0; - int offset = 0; - int i, num_tmps; - rtx xops[3]; - - if (GET_CODE (dest) == MEM - && GET_CODE (XEXP (dest, 0)) == PRE_INC - && XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx) - return output_move_pushmem (operands, insn, length, tmp_start, n_operands); - - if (! offsettable_memref_p (src)) - fatal_insn ("Source is not offsettable", insn); - - if (! offsettable_memref_p (dest)) - fatal_insn ("Destination is not offsettable", insn); - - /* Figure out which temporary registers we have available */ - for (i = tmp_start; i < n_operands; i++) - { - if (GET_CODE (operands[i]) == REG) - { - if ((length & 1) != 0 && qi_tmp == 0 && QI_REG_P (operands[i])) - qi_tmp = operands[i]; - - if (reg_overlap_mentioned_p (operands[i], dest)) - fatal_insn ("Temporary register overlaps the destination", insn); - - if (reg_overlap_mentioned_p (operands[i], src)) - fatal_insn ("Temporary register overlaps the source", insn); - - tmp_info[max_tmps++].xops[2] = operands[i]; - if (max_tmps == MAX_TMPS) - break; - } - } - - if (max_tmps == 0) - fatal_insn ("No scratch registers were found to do memory->memory moves", - insn); - - if ((length & 1) != 0) - { - if (qi_tmp == 0) - fatal_insn ("No byte register found when moving odd # of bytes.", - insn); - } - - while (length > 1) - { - for (num_tmps = 0; num_tmps < max_tmps; num_tmps++) - { - if (length >= 4) - { - tmp_info[num_tmps].load = AS2(mov%L0,%1,%2); - tmp_info[num_tmps].store = AS2(mov%L0,%2,%0); - tmp_info[num_tmps].xops[0] - = adj_offsettable_operand (dest, offset); - tmp_info[num_tmps].xops[1] - = adj_offsettable_operand (src, offset); - - offset += 4; - length -= 4; - } - - else if (length >= 2) - { - tmp_info[num_tmps].load = AS2(mov%W0,%1,%2); - tmp_info[num_tmps].store = AS2(mov%W0,%2,%0); - tmp_info[num_tmps].xops[0] - = adj_offsettable_operand (dest, offset); - tmp_info[num_tmps].xops[1] - = adj_offsettable_operand (src, offset); - - offset += 2; - length -= 2; - } - else - break; - } - - for (i = 0; i < num_tmps; i++) - output_asm_insn (tmp_info[i].load, tmp_info[i].xops); - - for (i = 0; i < num_tmps; i++) - output_asm_insn (tmp_info[i].store, tmp_info[i].xops); - } - - if (length == 1) - { - xops[0] = adj_offsettable_operand (dest, offset); - xops[1] = adj_offsettable_operand (src, offset); - xops[2] = qi_tmp; - output_asm_insn (AS2(mov%B0,%1,%2), xops); - output_asm_insn (AS2(mov%B0,%2,%0), xops); - } - - return ""; -} - int standard_80387_constant_p (x) rtx x; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index e3d6f18..994d157 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2717,7 +2717,6 @@ extern void output_op_from_reg (); extern void output_to_reg (); extern char *singlemove_string (); extern char *output_move_double (); -extern char *output_move_memory (); extern char *output_move_pushmem (); extern int standard_80387_constant_p (); extern char *output_move_const_single (); diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index c0d52cf..df87d5c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -926,7 +926,7 @@ /* Don't generate memory->memory moves, go through a register */ else if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1032,7 +1032,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1096,7 +1096,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1166,7 +1166,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1228,7 +1228,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1314,7 +1314,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1436,7 +1436,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1559,7 +1559,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { @@ -1657,7 +1657,7 @@ { /* Don't generate memory->memory moves, go through a register */ if (TARGET_MOVE - && (reload_in_progress | reload_completed) == 0 + && no_new_pseudos == 0 && GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) { |