This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: s390: SImode pointers vs LR
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Jeff Law <law at redhat dot com>, DJ Delorie <dj at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 02 Jun 2015 15:53:03 -0700
- Subject: Re: s390: SImode pointers vs LR
- Authentication-results: sourceware.org; auth=none
- References: <201505300057 dot t4U0vj16030907 at greed dot delorie dot com> <556C4EB9 dot 3080906 at linux dot vnet dot ibm dot com> <556C7510 dot 3030702 at redhat dot com> <556DCC72 dot 8090102 at linux dot vnet dot ibm dot com>
On 06/02/2015 08:32 AM, Andreas Krebbel wrote:
-(define_insn "*<shift><mode>3"
+(define_insn "*<shift><mode>3_reg"
[(set (match_operand:GPR 0 "register_operand" "=d")
(SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
- (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))]
+ (match_operand:SI 2 "register_operand" "a")))]
""
- "s<lr>l<g>\t%0,<1>%Y2"
+ "s<lr>l<g>\t%0,<1>%2"
+ [(set_attr "op_type" "RS<E>")
+ (set_attr "atype" "reg")])
+
+(define_insn "*<shift><mode>3_imm"
+ [(set (match_operand:GPR 0 "register_operand" "=d")
+ (SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
+ (match_operand 2 "immediate_operand" "J")))]
+ ""
+ "s<lr>l<g>\t%0,<1>%2"
+ [(set_attr "op_type" "RS<E>")
+ (set_attr "atype" "reg")])
These two ought not be split apart. They're simple alternatives. And why
SImode? You also shouldn't drop the mode on immediate operands.
r~
+
+(define_insn "*<shift><mode>3_immreg"
+ [(set (match_operand:GPR 0 "register_operand" "=d")
+ (SHIFT:GPR (match_operand:GPR 1 "register_operand" "<d0>")
+ (plus:SI
+ (match_operand:SI 2 "register_operand" "a")
+ (match_operand 3 "immediate_operand" "J"))))]
+ ""
+ "s<lr>l<g>\t%0,<1>%2(%3)"
[(set_attr "op_type" "RS<E>")
(set_attr "atype" "reg")])