diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-09-02 14:49:17 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-09-02 07:49:17 -0700 |
commit | 8127f74f22ffa61b0beb0e15c1edcb6c4a96d29e (patch) | |
tree | 429dba3df1233b77782298b7c98a242d483d96ce /gcc | |
parent | f0da48d27d1de0cd475908fe408d568315edb387 (diff) | |
download | gcc-8127f74f22ffa61b0beb0e15c1edcb6c4a96d29e.zip gcc-8127f74f22ffa61b0beb0e15c1edcb6c4a96d29e.tar.gz gcc-8127f74f22ffa61b0beb0e15c1edcb6c4a96d29e.tar.bz2 |
Fix miscompilation of MIPS cross assembler on sparc host.
* jump.c (jump_optimize): In if/then/else transformations, add
another call to modified_between_p for the jump insn.
From-SVN: r22187
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/jump.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81d164c..415830a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 2 14:47:36 1998 Jim Wilson <wilson@cygnus.com> + + * jump.c (jump_optimize): In if/then/else transformations, add + another call to modified_between_p for the jump insn. + Wed Sep 2 14:16:49 1998 Jeffrey A Law (law@cygnus.com) * fix-header.c (symlink): Treat like readlink. @@ -855,7 +855,11 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && ! reg_referenced_between_p (temp1, p, NEXT_INSN (temp3)) && ! reg_set_between_p (temp1, p, temp3) && (GET_CODE (SET_SRC (temp4)) == CONST_INT - || ! modified_between_p (SET_SRC (temp4), p, temp2))) + || ! modified_between_p (SET_SRC (temp4), p, temp2)) + /* Verify that registers used by the jump are not clobbered + by the instruction being moved. */ + && ! modified_between_p (PATTERN (temp), temp2, + NEXT_INSN (temp2))) { emit_insn_after_with_line_notes (PATTERN (temp2), p, temp2); delete_insn (temp2); @@ -953,6 +957,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) NEXT_INSN (temp2)) && ! reg_set_between_p (temp1, insert_after, temp) && ! modified_between_p (SET_SRC (temp4), insert_after, temp) + /* Verify that registers used by the jump are not clobbered + by the instruction being moved. */ + && ! modified_between_p (PATTERN (temp), temp3, + NEXT_INSN (temp3)) && invert_jump (temp, JUMP_LABEL (insn))) { emit_insn_after_with_line_notes (PATTERN (temp3), |