mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-05 09:44:10 +08:00
c4x-protos.h, [...]: Add new functions nonimmediate_src_operand and nonimmediate_lsrc_operand to...
* c4x-protos.h, c4x.h, c4x.c, c4x.md: Add new functions nonimmediate_src_operand and nonimmediate_lsrc_operand to disallow ZERO_EXTEND with CONST_INT or CONST_DOUBLE. From-SVN: r50266
This commit is contained in:
parent
d8d7c3c3e3
commit
65f2f288e4
@ -1,3 +1,9 @@
|
||||
2002-03-04 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
|
||||
|
||||
* c4x-protos.h, c4x.h, c4x.c, c4x.md: Add new functions
|
||||
nonimmediate_src_operand and nonimmediate_lsrc_operand to
|
||||
disallow ZERO_EXTEND with CONST_INT or CONST_DOUBLE.
|
||||
|
||||
2002-03-03 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* toplev.c (rest_of_decl_compilation): Revert last two changes.
|
||||
|
@ -157,6 +157,10 @@ extern int lsrc_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
extern int tsrc_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
extern int nonimmediate_src_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
extern int nonimmediate_lsrc_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
extern int addr_reg_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
extern int index_reg_operand PARAMS ((rtx, enum machine_mode));
|
||||
|
@ -3465,6 +3465,34 @@ tsrc_operand (op, mode)
|
||||
}
|
||||
|
||||
|
||||
/* Check src operand of two operand non immedidate instructions. */
|
||||
|
||||
int
|
||||
nonimmediate_src_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE)
|
||||
return 0;
|
||||
|
||||
return src_operand (op, mode);
|
||||
}
|
||||
|
||||
|
||||
/* Check logical src operand of two operand non immedidate instructions. */
|
||||
|
||||
int
|
||||
nonimmediate_lsrc_operand (op, mode)
|
||||
rtx op;
|
||||
enum machine_mode mode;
|
||||
{
|
||||
if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE)
|
||||
return 0;
|
||||
|
||||
return lsrc_operand (op, mode);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
reg_or_const_operand (op, mode)
|
||||
rtx op;
|
||||
|
@ -2288,6 +2288,8 @@ if (final_sequence != NULL_RTX) \
|
||||
{"src_hi_operand", {SUBREG, REG, MEM, CONST_DOUBLE}}, \
|
||||
{"lsrc_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \
|
||||
{"tsrc_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \
|
||||
{"nonimmediate_src_operand", {SUBREG, REG, MEM}}, \
|
||||
{"nonimmediate_lsrc_operand", {SUBREG, REG, MEM}}, \
|
||||
{"any_operand", {SUBREG, REG, MEM, CONST_INT, CONST_DOUBLE}}, \
|
||||
{"par_ind_operand", {MEM}}, \
|
||||
{"parallel_operand", {SUBREG, REG, MEM}}, \
|
||||
|
@ -2354,8 +2354,10 @@
|
||||
(truncate:QI
|
||||
(lshiftrt:HI
|
||||
(mult:HI
|
||||
(zero_extend:HI (match_operand:QI 1 "src_operand" ""))
|
||||
(zero_extend:HI (match_operand:QI 2 "lsrc_operand" "")))
|
||||
(zero_extend:HI (match_operand:QI 1
|
||||
"nonimmediate_src_operand" ""))
|
||||
(zero_extend:HI (match_operand:QI 2
|
||||
"nonimmediate_lsrc_operand" "")))
|
||||
(const_int 32))))
|
||||
(clobber (reg:CC_NOOV 21))])]
|
||||
""
|
||||
@ -2372,8 +2374,10 @@
|
||||
(truncate:QI
|
||||
(lshiftrt:HI
|
||||
(mult:HI
|
||||
(zero_extend:HI (match_operand:QI 1 "src_operand" "%0,rR,rS<>,0,rR,rS<>"))
|
||||
(zero_extend:HI (match_operand:QI 2 "lsrc_operand" "rLm,JR,rS<>,rLm,JR,rS<>")))
|
||||
(zero_extend:HI (match_operand:QI 1
|
||||
"nonimmediate_src_operand" "%0,rR,rS<>,0,rR,rS<>"))
|
||||
(zero_extend:HI (match_operand:QI 2
|
||||
"nonimmediate_lsrc_operand" "rm,R,rS<>,rm,R,rS<>")))
|
||||
(const_int 32))))
|
||||
(clobber (reg:CC_NOOV 21))]
|
||||
"! TARGET_C3X && valid_operands (MULT, operands, QImode)"
|
||||
@ -2392,8 +2396,10 @@
|
||||
(truncate:QI
|
||||
(lshiftrt:HI
|
||||
(mult:HI
|
||||
(zero_extend:HI (match_operand:QI 1 "src_operand" "0,rR,rS<>"))
|
||||
(zero_extend:HI (match_operand:QI 2 "lsrc_operand" "rLm,JR,rS<>")))
|
||||
(zero_extend:HI (match_operand:QI 1
|
||||
"nonimmediate_src_operand" "0,rR,rS<>"))
|
||||
(zero_extend:HI (match_operand:QI 2
|
||||
"nonimmediate_lsrc_operand" "rm,R,rS<>")))
|
||||
(const_int 32))))]
|
||||
"! TARGET_C3X && valid_operands (MULT, operands, QImode)"
|
||||
"@
|
||||
@ -6450,7 +6456,7 @@
|
||||
|
||||
(define_insn "zero_extendqihi2"
|
||||
[(set (match_operand:HI 0 "reg_operand" "=?dc")
|
||||
(zero_extend:HI (match_operand:QI 1 "src_operand" "rIm")))
|
||||
(zero_extend:HI (match_operand:QI 1 "nonimmediate_src_operand" "rm")))
|
||||
(clobber (reg:CC 21))]
|
||||
""
|
||||
"#"
|
||||
@ -6460,7 +6466,7 @@
|
||||
; the first set.
|
||||
(define_split
|
||||
[(set (match_operand:HI 0 "reg_operand" "")
|
||||
(zero_extend:HI (match_operand:QI 1 "src_operand" "")))
|
||||
(zero_extend:HI (match_operand:QI 1 "nonimmediate_src_operand" "")))
|
||||
(clobber (reg:CC 21))]
|
||||
"reload_completed"
|
||||
[(set (match_dup 2) (match_dup 1))
|
||||
|
Loading…
Reference in New Issue
Block a user