[PATCH v2] x86: Ignore rounding for vcvt[,u]si2sd under r32 and vcvt[,u]dq2pd instead of reporting bad

Jiang, Haochen haochen.jiang@intel.com
Thu Jan 16 03:19:27 GMT 2025


> From: Christian Ludloff <ludloff@gmail.com>
> Sent: Thursday, January 16, 2025 11:00 AM
> >  vcvtdq2pd, 0xF3E6, AVX512VL,
> >
> Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|N
> oSuf, {
> > RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } -vcvtdq2pd,
> 0xF3E6,
> > AVX512VL,
> >
> Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|N
> oSuf, {
> > RegXMM|Dword|Unspecified|BaseIndex, RegYMM }
> > +vcvtdq2pd, 0xF3E6, AVX512VL,
> >
> +Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|
> NoSuf|S
> > +taticRounding|SAE, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM }
> >  vcvtudq2pd, 0xF37A, AVX512VL,
> >
> Modrm|EVex128|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=3|N
> oSuf, {
> > RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM } -vcvtudq2pd,
> > 0xF37A, AVX512VL,
> >
> Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|N
> oSuf, {
> > RegXMM|Dword|Unspecified|BaseIndex, RegYMM }
> > +vcvtudq2pd, 0xF37A, AVX512VL,
> >
> +Modrm|EVex256|Masking|Space0F|VexW0|Broadcast|Disp8MemShift=4|
> NoSuf|S
> > +taticRounding|SAE, { RegXMM|Dword|Unspecified|BaseIndex, RegYMM }
> 
> Where is the notion that the 256-bit variant of {er}, encoded with U=0,
> requires AVX10.2?
> 
> (Is it in some central place elsewhere? Sorry, I'm not familiar enough with the
> codebase.)
> 

This is a little tricky here. When we enabled ymm rounding for AVX10.2, instead of
doing tons of changes or additions for entries in this file, we handle them mostly in
build_evex_prefix and check_VecOperands for the U bit and rounding check. Then
we will only need to add rounding indicators for ymm/zmm separated insn entries.
Basically in Binutils, AVX10.2 impiles AVX10.1 and AVX10.1 impiles AVX512*
(except for Xeon Phi and VP2INTERSECT). That is why adding rounding here in an
AVX512VL entry will enable ymm rounding for AVX10.2. When ymm rounding is
used in inst, we will do one more check whether AVX10.2 is there. If it is not
there, we will report error.

The commit adding AVX10.2 ymm rounding:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=85e370a3d63f88386e98b435f43fa63e9e54130b

Thx,
Haochen


More information about the Binutils mailing list