diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2005-11-25 20:15:27 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2005-11-25 20:15:27 +0000 |
commit | 11e30dd8f23b75d788be0408437e3b6ed8e3b9d0 (patch) | |
tree | d0389a22d27e192ea7e0191376e61570262ecb32 /gcc/targhooks.c | |
parent | dacfe88f94bf5dc985411435e2e83d66a34efe99 (diff) | |
download | gcc-11e30dd8f23b75d788be0408437e3b6ed8e3b9d0.zip gcc-11e30dd8f23b75d788be0408437e3b6ed8e3b9d0.tar.gz gcc-11e30dd8f23b75d788be0408437e3b6ed8e3b9d0.tar.bz2 |
cris.md ("reload_out<mode>"): Mark operand 2 as earlyclobber.
* config/cris/cris.md ("reload_out<mode>"): Mark operand 2 as
earlyclobber.
* targhooks.c (default_secondary_reload): Don't require operand 2
for an input reload to be earlyclobber.
From-SVN: r107517
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 1d5a7fe..afeba1f 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -514,10 +514,15 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED, } scratch_constraint = insn_data[(int) icode].operand[2].constraint; - /* The scratch register's constraint must start with "=&". */ + /* The scratch register's constraint must start with "=&", + except for an input reload, where only "=" is necessary, + and where it might be beneficial to re-use registers from + the input. */ gcc_assert (scratch_constraint[0] == '=' - && scratch_constraint[1] == '&'); - scratch_constraint += 2; + && (in_p || scratch_constraint[1] == '&')); + scratch_constraint++; + if (*scratch_constraint == '&') + scratch_constraint++; scratch_letter = *scratch_constraint; scratch_class = (scratch_letter == 'r' ? GENERAL_REGS |