summaryrefslogtreecommitdiffstats
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-01 05:29:14 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-01 05:29:14 +0000
commit90e1e7afbdb35903ee5e011b8824708c03b998f3 (patch)
tree9b33000ba9e8cb51c596c7c89e8c48ae70621225 /gcc/rtlanal.c
parentdb9e2b98cab772c0cc7d86044f08c324d464f166 (diff)
downloadppe42-gcc-90e1e7afbdb35903ee5e011b8824708c03b998f3.tar.gz
ppe42-gcc-90e1e7afbdb35903ee5e011b8824708c03b998f3.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36683 138bc75d-0d04-0410-961f-82ee72b054a4
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 0d922c66c43..2e1ae1450e9 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;
OpenPOWER on IntegriCloud