[PATCH] x86: Support BHI_CTRL instruction
Jan Beulich
jbeulich@suse.com
Tue Jun 2 08:26:47 GMT 2026
On 01.06.2026 08:24, Haochen Jiang wrote:
> The following patch aimed to add BHI_CTRL. The ISA has been published in a
> separate tech paper last year and still missing its assembler/disassembler
> support.
>
> One tricky thing is that it utilized part of the nops encoding and we need
> to keep the same behavior for the not touched one, i.e., repz nop. That is
> why I added a Fixup for now since I did not have a better idea for that.
> Discussions are welcomed on this.
Instead of this, add a decode step through prefix_table[]?
> --- a/opcodes/i386-opc.tbl
> +++ b/opcodes/i386-opc.tbl
> @@ -3630,3 +3630,9 @@ vmovrs<bw>, 0xf26f, AVX10_2&MOVRS&x64, Modrm|Masking|Map5|<bw:vexw>|Disp8ShiftVL
> vmovrs<dq>, 0xf36f, AVX10_2&MOVRS&x64, Modrm|Masking|Map5|<dq:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Xmmword|Ymmword|Zmmword|Unspecified|BaseIndex, RegXMM|RegYMM|RegZMM }
>
> // MOVRS instructions end.
> +
> +// BHI_CTRL insructions.
> +
> +ibhf, 0xf30f1ef8, BHI_CTRL, NoSuf|Size64, {}
So Size64 is here to have REX.W emitted. The whitepaper isn't clear about APX
at all, though: Would REX2.W also have the same effect? (Whichever way it is,
this then perhaps also wants covering in the testsuite.)
In any event, I don't think we want the i386-gen.c change; instead we want
x64&BHI_CTRL here: Aiui BHI_CTRL itself isn't 64-bit only, it's only this new
insn which is.
Jan
More information about the Binutils
mailing list