diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-26 08:07:30 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-26 08:07:30 +0000 |
commit | e07935484e1d4835d4da3aed7b9cf79e36ddeb49 (patch) | |
tree | cee22a62967ae8fca3b9a38854c928b8b19ca20a /gcc/reg-stack.c | |
parent | bca23cb7b229239882285ef126c3f766a932af85 (diff) | |
download | gcc-e07935484e1d4835d4da3aed7b9cf79e36ddeb49.tar.gz |
PR target/21716
* reg-stack.c (swap_rtx_condition): Don't crash if %ax user was not
found in the basic block and last insn in the basic block is not
INSN_P. Remove explicit unspec numbers that are no longer valid
from comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index a49d9e9a108..acf5f41d030 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1231,9 +1231,9 @@ swap_rtx_condition (rtx insn) pat = PATTERN (insn); } - /* See if this is, or ends in, a fnstsw, aka unspec 9. If so, we're - not doing anything with the cc value right now. We may be able to - search for one though. */ + /* See if this is, or ends in, a fnstsw. If so, we're not doing anything + with the cc value right now. We may be able to search for one + though. */ if (GET_CODE (pat) == SET && GET_CODE (SET_SRC (pat)) == UNSPEC @@ -1252,9 +1252,13 @@ swap_rtx_condition (rtx insn) return 0; } + /* We haven't found it. */ + if (insn == BB_END (current_block)) + return 0; + /* So we've found the insn using this value. If it is anything - other than sahf, aka unspec 10, or the value does not die - (meaning we'd have to search further), then we must give up. */ + other than sahf or the value does not die (meaning we'd have + to search further), then we must give up. */ pat = PATTERN (insn); if (GET_CODE (pat) != SET || GET_CODE (SET_SRC (pat)) != UNSPEC |