[PATCH v2] x86: Support ZHAOXIN GMI instructions
Jan Beulich
jbeulich@suse.com
Tue Oct 15 05:53:16 GMT 2024
On 15.10.2024 05:02, Jiang, Haochen wrote:
>> From: mayshao-oc <mayshao-oc@zhaoxin.com>
>> Sent: Tuesday, October 15, 2024 9:19 AM
>>
> @@ -13086,6 +13118,21 @@ OP_0f07 (instr_info *ins, int bytemode, int sizeflag)
> return OP_E (ins, bytemode, sizeflag);
> }
>
> +/* montmul instruction need display repz and skip modrm */
> +
> +static bool
> +MONTMUL_Fixup (instr_info *ins, int bytemode, int sizeflag)
> +{
> + (void) bytemode;
> + (void) sizeflag;
>
> What are these two lines for?
ATTRIBUTE_UNUSED wants using instead.
> And you will need MODRM_CHECK;
> and modrm.mod invalid check. You could take OP_Skip_MODRM
> as reference.
I think OP_Skip_MODRM() simply wants invoking from here. That'll
deal with ...
> + /* The 0xf3 prefix should be displayed as "repz" for montmul. */
> + if (ins->prefixes & PREFIX_REPZ)
> + ins->all_prefixes[ins->last_repz_prefix] = 0xf3;
> + ins->codep++;
> + ins->has_skipped_modrm = true;
> + return true;
> +}
... part of the omissions: Right now both modrm.mod and modrm.rm
aren't being checked here.
> Also, in gas/NEWS, could you put the entry at the very beginning?
I don't think the placement there matters much, as long as it's in the
correct section.
Jan
More information about the Binutils
mailing list