sh.c (gen_shl_and): Revert previous patch.

* config/sh/sh.c (gen_shl_and): Revert previous patch.
        * config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
        reload_completed.

From-SVN: r59269
This commit is contained in:
Daniel Jacobowitz 2002-11-19 18:27:01 +00:00 committed by Daniel Jacobowitz
parent 9675a91e9b
commit 85af47b9e6
3 changed files with 15 additions and 23 deletions

View File

@ -1,3 +1,9 @@
2002-11-19 Daniel Jacobowitz <drow@mvista.com>
* config/sh/sh.c (gen_shl_and): Revert previous patch.
* config/sh/sh.md (ashrdi3+1, ashrdi3+2): Predicate on
reload_completed.
2002-11-19 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (print_operand): Update the use of

View File

@ -1823,16 +1823,11 @@ 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, lowpart)
: gen_zero_extendhisi2(dest, lowpart));
? gen_zero_extendqisi2(dest,
gen_lowpart (QImode, source))
: gen_zero_extendhisi2(dest,
gen_lowpart (HImode, source)));
source = dest;
}
if (source != dest)
@ -1851,18 +1846,9 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
mask <<= first;
}
if (first >= 0)
{
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));
}
emit_insn (mask <= 0xff
? gen_zero_extendqisi2(dest, gen_lowpart (QImode, dest))
: gen_zero_extendhisi2(dest, gen_lowpart (HImode, dest)));
if (total_shift > 0)
{
operands[2] = GEN_INT (total_shift);

View File

@ -2694,7 +2694,7 @@
(and:SI (ashift:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "const_int_operand" ""))
(match_operand:SI 3 "const_int_operand" "")))]
"TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
"TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
[(use (reg:SI R0_REG))]
"if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
DONE;")
@ -2705,7 +2705,7 @@
(match_operand:SI 2 "const_int_operand" ""))
(match_operand:SI 3 "const_int_operand" "")))
(clobber (reg:SI T_REG))]
"TARGET_SH1 && (unsigned)INTVAL (operands[2]) < 32"
"TARGET_SH1 && reload_completed && (unsigned)INTVAL (operands[2]) < 32"
[(use (reg:SI R0_REG))]
"if (gen_shl_and (operands[0], operands[2], operands[3], operands[1])) FAIL;
DONE;")