mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-26 00:59:40 +08:00
sh.c (gen_shl_and): Don't create a zero_extend if the operand is not an arith_reg_operand.
* sh.c (gen_shl_and): Don't create a zero_extend if the operand is not an arith_reg_operand. From-SVN: r59201
This commit is contained in:
parent
6ddb1bc19f
commit
d2b2c7cd3d
@ -1,3 +1,8 @@
|
||||
2002-11-17 Daniel Jacobowitz <drow@mvista.com>
|
||||
|
||||
* sh.c (gen_shl_and): Don't create a zero_extend if the operand
|
||||
is not an arith_reg_operand.
|
||||
|
||||
2002-11-17 Graham Stott <graham.stott@btinternet.com>
|
||||
|
||||
* real.c (real_to_decimal): Fix buffer overrun when buffer size
|
||||
|
@ -1823,11 +1823,16 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
|
||||
|
||||
if (first < 0)
|
||||
{
|
||||
enum machine_mode mode
|
||||
= ((mask << right) <= 0xff) ? QImode : HImode;
|
||||
rtx lowpart = gen_lowpart (mode, source);
|
||||
|
||||
if (no_new_pseudos && ! TARGET_SHMEDIA
|
||||
&& ! arith_reg_operand (lowpart, mode))
|
||||
return -1;
|
||||
emit_insn ((mask << right) <= 0xff
|
||||
? gen_zero_extendqisi2(dest,
|
||||
gen_lowpart (QImode, source))
|
||||
: gen_zero_extendhisi2(dest,
|
||||
gen_lowpart (HImode, source)));
|
||||
? gen_zero_extendqisi2(dest, lowpart)
|
||||
: gen_zero_extendhisi2(dest, lowpart));
|
||||
source = dest;
|
||||
}
|
||||
if (source != dest)
|
||||
@ -1846,9 +1851,18 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
|
||||
mask <<= first;
|
||||
}
|
||||
if (first >= 0)
|
||||
emit_insn (mask <= 0xff
|
||||
? gen_zero_extendqisi2(dest, gen_lowpart (QImode, dest))
|
||||
: gen_zero_extendhisi2(dest, gen_lowpart (HImode, dest)));
|
||||
{
|
||||
enum machine_mode mode = (mask <= 0xff) ? QImode : HImode;
|
||||
rtx lowpart = gen_lowpart (mode, dest);
|
||||
|
||||
if (no_new_pseudos && ! TARGET_SHMEDIA
|
||||
&& ! arith_reg_operand (lowpart, mode))
|
||||
return -1;
|
||||
emit_insn (mask <= 0xff
|
||||
? gen_zero_extendqisi2(dest, lowpart)
|
||||
: gen_zero_extendhisi2(dest, lowpart));
|
||||
}
|
||||
|
||||
if (total_shift > 0)
|
||||
{
|
||||
operands[2] = GEN_INT (total_shift);
|
||||
|
Loading…
Reference in New Issue
Block a user