[PATCH, i386, MPX 1/X] Support of Intel MPX ISA. 2/2 New registers and instructions

Ilya Enkovich enkovich.gnu@gmail.com
Thu Oct 24 12:56:00 GMT 2013


2013/10/24 Uros Bizjak <ubizjak@gmail.com>:
> On Thu, Oct 24, 2013 at 12:06 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> On 01 Oct 20:00, Uros Bizjak wrote:
>>>
>>> This is OK for mainline, on the condition that target independent part
>>> is approved and committed first.
>>>
>>> Thanks,
>>> Uros.
>>
>> Thanks for review!
>>
>> Attached is a version to be committed.  The only difference from the previous one is BOUND_MODE renamed to POINTER_BOUNDS_MODE due to changes in target independent part.  ChangeLog was not modified.
>
> I think you missed a couple of length -> length_nobnd updates:
>
> @@ -11635,7 +11680,12 @@
>    [(simple_return)
>     (unspec [(const_int 0)] UNSPEC_REP)]
>    "reload_completed"
> -  "rep%; ret"
> +{
> +  if (ix86_bnd_prefixed_insn_p (insn))
> +    return "%!ret";
> +
> +  return "rep%; ret";
> +}
>    [(set_attr "length" "2")
>     (set_attr "atom_unit" "jeu")
>     (set_attr "length_immediate" "0")
>

There is no reason for length_nobnd because instruction length is
always 2. Difference is in prefix used for MPX and non-MPX code.

> and possibly here:
>
> @@ -11186,7 +11231,7 @@
>  (define_insn "*indirect_jump"
>    [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rw"))]
>    ""
> -  "jmp\t%A0"
> +  "%!jmp\t%A0"
>    [(set_attr "type" "ibr")
>     (set_attr "length_immediate" "0")])
>
> @@ -11235,7 +11280,7 @@
>    [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rw"))
>     (use (label_ref (match_operand 1)))]
>    ""
> -  "jmp\t%A0"
> +  "%!jmp\t%A0"
>    [(set_attr "type" "ibr")
>     (set_attr "length_immediate" "0")])

For these cases 'prefix_rep' attribute makes the work due to 'ibr'
type. Generic length should work fine.

Thanks,
Ilya

>
> Uros.



More information about the Gcc-patches mailing list