aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorGeoff Keating <geoffk@cygnus.com>2000-10-01 05:29:14 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2000-10-01 05:29:14 +0000
commite35b957951be95eb8c5caa2c3bd7635827b4b370 (patch)
tree9b33000ba9e8cb51c596c7c89e8c48ae70621225 /gcc/rtlanal.c
parent9256db1dea11f28654770cdfd450c95c3cc53a0f (diff)
downloadgcc-e35b957951be95eb8c5caa2c3bd7635827b4b370.zip
gcc-e35b957951be95eb8c5caa2c3bd7635827b4b370.tar.gz
gcc-e35b957951be95eb8c5caa2c3bd7635827b4b370.tar.bz2
rs6000.md (movsi_to_cr): Remove the USE.
* config/rs6000/rs6000.md (movsi_to_cr): Remove the USE. Calculate the mask value from the individual SET operations. (return_internal_si): Move the USE after the RETURN. (return_internal_di): Likewise. (return_and_restore_fpregs_si): Likewise. (return_and_restore_fpregs_di): Likewise. (return_eh_si): Likewise. (return_eh_di): Likewise. * config/rs6000/rs6000.c (mtcrf_operation): Don't look for, or check, the USE. (rs6000_emit_prologue): Don't emit the USE for movsi_to_cr. Don't generate a PARALLEL around a single operation movsi_to_cr. Generate the RETURN first in any PARALLELs. * rtlanal.c (single_set_1): Use fatal_insn to display the invalid insn. Check for more cases when a USE or CLOBBER occurs before a SET. * Makefile.in: Update dependencies for rtlanal.o. From-SVN: r36683
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c58
1 files changed, 33 insertions, 25 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 0d922c6..2e1ae14 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
+#include "toplev.h"
#include "rtl.h"
static int rtx_addr_can_trap_p PARAMS ((rtx));
@@ -878,7 +879,7 @@ single_set_1 (insn)
/* Instruction should not consist only from USEs and CLOBBERS,
since then gcc is allowed to remove it entirely. In case
something else is present, it should be first in the pattern. */
- abort();
+ fatal_insn ("USE or CLOBBER before SET:", insn);
#endif
case SET:
break;
@@ -895,34 +896,41 @@ single_set_1 (insn)
for (i = XVECLEN (pat, 0) - 1; i > 1; i--)
if (GET_CODE (XVECEXP (pat, 0, i)) != USE
&& GET_CODE (XVECEXP (pat, 0, i)) != CLOBBER)
- abort();
+ fatal_insn ("USE or CLOBBER before SET:", insn);
#endif
return set;
case SET:
- /* Multiple set insns - we are off the critical path now. */
- for (i = XVECLEN (pat, 0) - 1; i > 0; i--)
- {
- sub = XVECEXP (pat, 0, i);
- switch GET_CODE (sub)
- {
- case USE:
- case CLOBBER:
- break;
-
- case SET:
- if (!set
- || (find_reg_note (insn, REG_UNUSED, SET_DEST (set))
- && side_effects_p (set)))
- set = sub;
- else if (! find_reg_note (insn, REG_UNUSED, SET_DEST (sub))
- || side_effects_p (sub))
- return NULL_RTX;
- break;
+ {
+ int seen_clobber = 0;
- default:
- return NULL_RTX;
- }
- }
+ /* Multiple set insns - we are off the critical path now. */
+ for (i = 1; i < XVECLEN (pat, 0); i++)
+ {
+ sub = XVECEXP (pat, 0, i);
+ switch GET_CODE (sub)
+ {
+ case USE:
+ case CLOBBER:
+ seen_clobber = 1;
+ break;
+
+ case SET:
+ if (seen_clobber)
+ fatal_insn ("USE or CLOBBER before SET:", insn);
+ if (!set
+ || (find_reg_note (insn, REG_UNUSED, SET_DEST (set))
+ && side_effects_p (set)))
+ set = sub;
+ else if (! find_reg_note (insn, REG_UNUSED, SET_DEST (sub))
+ || side_effects_p (sub))
+ return NULL_RTX;
+ break;
+
+ default:
+ return NULL_RTX;
+ }
+ }
+ }
return set;
default:
return NULL_RTX;