[PATCH v2] Support Intel MOVRS

Jan Beulich jbeulich@suse.com
Thu Jan 9 12:31:28 GMT 2025


On 09.01.2025 08:55, Haochen Jiang wrote:
> --- a/opcodes/i386-dis-evex-mod.h
> +++ b/opcodes/i386-dis-evex-mod.h
> @@ -8,6 +8,14 @@
>      { "movbeS",		{ Mv, Gv }, PREFIX_NP_OR_DATA },
>      { "%NEmovbeS",	{ Ev, Gv }, PREFIX_NP_OR_DATA },
>    },
> +  /* MOD_EVEX_MAP4_8A */
> +  {
> +    { "movrsB",	{ Gb, Mb }, NO_PREFIX },
> +  },
> +  /* MOD_EVEX_MAP4_8B */
> +  {
> +    { "movrsS",	{ Gv, Mv }, PREFIX_NP_OR_DATA },
> +  },

Since you use Mb and Mv here, why do you have a decode step through
mod_table[]?

> --- a/opcodes/i386-dis-evex-prefix.h
> +++ b/opcodes/i386-dis-evex-prefix.h
> @@ -580,6 +580,13 @@
>      { VEX_W_TABLE (EVEX_W_MAP5_6E_P_1) },
>      { "vmovwY",	{ XMScalar, Edw }, 0 },
>    },
> +  /* PREFIX_EVEX_MAP5_6F_M_0_X86_64 */
> +  {
> +    { Bad_Opcode },
> +    { "vmovrs%DQ",	{ XM, EXEvexXNoBcst }, 0 },
> +    { Bad_Opcode },
> +    { "vmovrs%BW",	{ XM, EXEvexXNoBcst }, 0 },
> +  },

Judging from e.g. the various vmovnt* forms you ought to be able to use Mx,
eliminating the need for decode through mod_table[] here as well.

> @@ -4615,6 +4627,18 @@ static const struct dis386 x86_64_table[][2] = {
>      { "movZ",		{ Td, Em }, 0 },
>    },
>  
> +  {
> +    /* X86_64_0F388A_M_0 */
> +    { Bad_Opcode },
> +    { "movrsB",		{ Gb, Mb }, PREFIX_OPCODE },
> +  },
> +
> +  {
> +    /* X86_64_0F388B_M_0 */
> +    { Bad_Opcode },
> +    { "movrsS",		{ Gv, Mv }, PREFIX_OPCODE },
> +  },

Same here then but explicitly not ...

> @@ -8392,6 +8418,11 @@ static const struct dis386 mod_table[][2] = {
>      { "prefetcht2",	{ Mb }, 0 },
>      { "nopQ",		{ Ev }, 0 },
>    },
> +  {
> +    /* MOD_0F18_REG_4 */
> +    { "prefetchrst2",	{ Mb }, 0 },
> +    { "nopQ",		{ Ev }, 0 },
> +  },

... here.

Jan


More information about the Binutils mailing list