This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 6/9] S/390: Get rid of Y constraint in tabort.
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Feb 2016 15:27:59 +0100
- Subject: Re: [PATCH 6/9] S/390: Get rid of Y constraint in tabort.
- Authentication-results: sourceware.org; auth=none
- References: <20160201133633 dot D452E20D1 at oc7340732750 dot ibm dot com>
On 02/01/2016 02:36 PM, Ulrich Weigand wrote:
> Andreas Krebbel wrote:
>
>> (define_insn "*tabort_1"
>> - [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "Y")]
>> + [(unspec_volatile [(match_operand:SI 0 "addrreg_or_constint_operand" "a,n")]
>> UNSPECV_TABORT)]
>> "TARGET_HTM && operands != NULL"
>> - "tabort\t%Y0"
>> + "@
>> + tabort\t0(%0)
>> + tabort\t%0"
>> + [(set_attr "op_type" "S")])
>> +
>> +(define_insn "*tabort_1_plus"
>> + [(unspec_volatile [(plus:SI (match_operand:SI 0 "register_operand" "a")
>> + (match_operand:SI 1 "const_int_operand" "J"))]
>> + UNSPECV_TABORT)]
>> + "TARGET_HTM && operands != NULL"
>> + "tabort\t%1(%0)"
>
> This seems dangerous: const_int_operand may match a constant that does
> not fit into the "J" constraint, which would lead to an abort in reload.
Right. The insn condition should make sure it fits already when matching the insn.
> What is the semantics for the abort code anyway? It is supposed to be
> automatically truncated or not?
Not to my knowledge. There seem to be a full 64 bit slot in the transaction diagnostic buffer where
this value will be copied to.
-Andreas-