Commit d2b2c7cd by Daniel Jacobowitz Committed by Daniel Jacobowitz

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
parent 6ddb1bc1
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment