[RFC PATCH] x86: Ignore rounding for vcvt[, u]si2sd under r32 and vcvt[,u]dq2pd instead of reporting bad
Jan Beulich
jbeulich@suse.com
Tue Jan 14 14:33:41 GMT 2025
On 14.01.2025 09:35, Haochen Jiang wrote:
> --- a/opcodes/i386-dis-evex-w.h
> +++ b/opcodes/i386-dis-evex-w.h
> @@ -97,7 +97,7 @@
> },
> /* EVEX_W_0F7A_P_1 */
> {
> - { "vcvtudq2pd", { XM, EXEvexHalfBcstXmmq }, 0 },
> + { "vcvtudq2pd", { XM, EXEvexHalfBcstXmmq, EXxEVexRIG }, 0 },
> { "vcvtuqq2pd", { XM, EXx, EXxEVexR }, 0 },
> },
> /* EVEX_W_0F7A_P_2 */
> @@ -161,7 +161,7 @@
> },
> /* EVEX_W_0FE6_P_1 */
> {
> - { "%XEvcvtdq2pd", { XM, EXEvexHalfBcstXmmq }, 0 },
> + { "%XEvcvtdq2pd", { XM, EXEvexHalfBcstXmmq, EXxEVexRIG }, 0 },
> { "vcvtqq2pd", { XM, EXx, EXxEVexR }, 0 },
> },
> /* EVEX_W_0FE7 */
In both of these I think EXxEVexR64 can be used, eliminating the need
for ...
> --- a/opcodes/i386-dis.c
> +++ b/opcodes/i386-dis.c
> @@ -605,6 +605,7 @@ fetch_error (const instr_info *ins)
> #define EXxEVexR { OP_Rounding, evex_rounding_mode }
> #define EXxEVexR64 { OP_Rounding, evex_rounding_64_mode }
> #define EXxEVexS { OP_Rounding, evex_sae_mode }
> +#define EXxEVexRIG { OP_Rounding, evex_rounding_ignore_mode }
... this and ...
> @@ -765,6 +766,8 @@ enum
> evex_rounding_64_mode,
> /* Supress all exceptions. */
> evex_sae_mode,
> + /* Rounding allowed, but ignored. */
> + evex_rounding_ignore_mode,
... this. Re-using a mode we already have also feels slightly more safe,
considering the special casing we have in place, keyed to the handler
being OP_Rounding.
Jan
More information about the Binutils
mailing list