[PATCH 1/5] x86: templatize SIMD FP arithmetic templates

Jan Beulich jbeulich@suse.com
Tue Oct 8 06:58:05 GMT 2024
On 08.10.2024 08:34, Jiang, Haochen wrote:
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Friday, September 6, 2024 6:25 PM
>>
>> --- a/opcodes/i386-opc.tbl
>> +++ b/opcodes/i386-opc.tbl
>> @@ -1176,10 +1176,17 @@ pxor<MMX>, 0x<MMX:pfx>0fef, <MMX:cpu>,
>> M
>>      $avx:0xf30f53:0xf30f52:AVX:VexLIG|VexW0|Src1VVVV|SSE2AVX, +
>>
>> $apx:0x660f384d:0x660f384f:AVX512F:EVexLIG|VexW0|Src1VVVV|Disp8M
>> emShift=2|SSE2AVX, +
>>      $sse:0xf30f53:0xf30f52:SSE:::>
>> +<fop:opc:sr:ne, +
>> +    add:58:StaticRounding:ne, +
>> +    sub:5c:StaticRounding:ne, +
>> +    mul:59:StaticRounding:ne, +
>> +    div:5e:StaticRounding:ne, +
>> +    min:5d::, +
>> +    max:5f::>
> 
> When I am trying to use this, it seems to me that for mnemonics, we could not
> use <fop:ne> since each string in <> in mnemonics will be treated as a new template
> name, or simply, will be treated as the index for template expansion.

If so, this sounds like a bug in i386-gen's template expansion logic then.
Template introduction is easily distinguishable from template argument use
after all, by checking for presence / absence of the colon.

> Maybe need to further split add/sub/mul/div and min/max if we want to use them
> for AVX10.2 BF16 insts.

I'd like to avoid this, if possible.

Jan


More information about the Binutils mailing list