diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-12 01:08:33 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-12 01:08:33 +0000 |
commit | 37ed48c7a8887c4278c09303bacb1532140a9cc3 (patch) | |
tree | 7a87f8b19e23ea4b3626c8884af1c2249355ac3d /gcc/config/cris | |
parent | 0dfc45b5614725c49ee4d16ad5cd04dde5fb1912 (diff) | |
download | gcc-37ed48c7a8887c4278c09303bacb1532140a9cc3.tar.gz |
PR regression/19898.
* config/cris/cris.c (cris_notice_update_cc): When testing if insn
changes cc_status, use apply modified_in_p to part of cc_status
and insn, not cris_reg_overlap_mentioned_p on SET_DEST of insn
body.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94914 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/cris')
-rw-r--r-- | gcc/config/cris/cris.c | 50 |
1 files changed, 12 insertions, 38 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 5fc6804af72..a01fe1ec4d2 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -1834,13 +1834,11 @@ cris_notice_update_cc (rtx exp, rtx insn) if (GET_CODE (exp) == SET) { if (cc_status.value1 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value1)) + && modified_in_p (cc_status.value1, insn)) cc_status.value1 = 0; if (cc_status.value2 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value2)) + && modified_in_p (cc_status.value2, insn)) cc_status.value2 = 0; } return; @@ -1970,14 +1968,12 @@ cris_notice_update_cc (rtx exp, rtx insn) { /* There's no CC0 change when clearing a register or memory. Just check for overlap. */ - if ((cc_status.value1 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value1))) + if (cc_status.value1 + && modified_in_p (cc_status.value1, insn)) cc_status.value1 = 0; - if ((cc_status.value2 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value2))) + if (cc_status.value2 + && modified_in_p (cc_status.value2, insn)) cc_status.value2 = 0; return; @@ -2009,14 +2005,12 @@ cris_notice_update_cc (rtx exp, rtx insn) { /* When SET to MEM, then CC is not changed (except for overlap). */ - if ((cc_status.value1 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value1))) + if (cc_status.value1 + && modified_in_p (cc_status.value1, insn)) cc_status.value1 = 0; - if ((cc_status.value2 - && cris_reg_overlap_mentioned_p (SET_DEST (exp), - cc_status.value2))) + if (cc_status.value2 + && modified_in_p (cc_status.value2, insn)) cc_status.value2 = 0; return; @@ -2053,31 +2047,11 @@ cris_notice_update_cc (rtx exp, rtx insn) /* For "move.S rz,[rx=ry+o]" and "clear.S [rx=ry+o]", say flags are not changed, except for overlap. */ if (cc_status.value1 - && cris_reg_overlap_mentioned_p (XEXP - (XVECEXP - (exp, 0, 0), 0), - cc_status.value1)) - cc_status.value1 = 0; - - if (cc_status.value1 - && cris_reg_overlap_mentioned_p (XEXP - (XVECEXP - (exp, 0, 1), 0), - cc_status.value1)) + && modified_in_p (cc_status.value1, insn)) cc_status.value1 = 0; if (cc_status.value2 - && cris_reg_overlap_mentioned_p (XEXP - (XVECEXP - (exp, 0, 0), 0), - cc_status.value2)) - cc_status.value2 = 0; - - if (cc_status.value2 - && cris_reg_overlap_mentioned_p (XEXP - (XVECEXP - (exp, 0, 1), 0), - cc_status.value2)) + && modified_in_p (cc_status.value2, insn)) cc_status.value2 = 0; return; |