This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: s390: SImode pointers vs LR
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>, Jeff Law <law at redhat dot com>, DJ Delorie <dj at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 03 Jun 2015 09:15:24 +0200
- 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> <556E33CF dot 4060209 at redhat dot com>
On 06/03/2015 12:53 AM, Richard Henderson wrote:
> 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.
Right. That was just a quick copy and paste hack to check if it works.
> And why SImode?
Other modes would work as well since the instruction only uses the lower 6 bits anyway. But what's
wrong with SImode?
Bye,
-Andreas-