diff options
author | Ian Lance Taylor <ian@wasabisystems.com> | 2004-01-29 18:40:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2004-01-29 18:40:01 +0000 |
commit | 7e3aa041969a8c7c75d7b8b3e453718912aad67d (patch) | |
tree | dca50254554c2e8af32a5a53fb4774a4422e3a98 | |
parent | ef9899279063069a80a2d2c280aa6ea5b40d9f85 (diff) | |
download | gcc-7e3aa041969a8c7c75d7b8b3e453718912aad67d.zip gcc-7e3aa041969a8c7c75d7b8b3e453718912aad67d.tar.gz gcc-7e3aa041969a8c7c75d7b8b3e453718912aad67d.tar.bz2 |
re PR inline-asm/6162 (i386 asm reloader ice in reload_cse_simplify_operands)
PR inline-asm/6162
* reload.c (find_reloads): Only support one pair of commutative
operands.
From-SVN: r76886
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/reload.c | 17 |
2 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4493b21..2f8c480 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-01-28 Ian Lance Taylor <ian@wasabisystems.com> + + PR inline-asm/6162 + * reload.c (find_reloads): Only support one pair of commutative + operands. + 2004-01-29 Roger Sayle <roger@eyesopen.com> PR java/13824 diff --git a/gcc/reload.c b/gcc/reload.c index 548aa7e..c1f2af9 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2605,7 +2605,17 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, if (i == noperands - 1) abort (); - commutative = i; + /* We currently only support one commutative pair of + operands. Some existing asm code currently uses more + than one pair. Previously, that would usually work, + but sometimes it would crash the compiler. We + continue supporting that case as well as we can by + silently ignoring all but the first pair. In the + future we may handle it correctly. */ + if (commutative < 0) + commutative = i; + else if (!this_insn_is_asm) + abort (); } else if (ISDIGIT (c)) { @@ -2979,9 +2989,8 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, break; case '%': - /* The last operand should not be marked commutative. */ - if (i != noperands - 1) - commutative = i; + /* We only support one commutative marker, the first + one. We already set commutative above. */ break; case '?': |