FW: [PATCH 3/8] Add tests for APX GPR32 with extend evex prefix

Cui, Lili lili.cui@intel.com
Wed Oct 18 02:32:10 GMT 2023


> >>> --- a/gas/testsuite/gas/i386/x86-64-inval-movbe.s
> >>> +++ b/gas/testsuite/gas/i386/x86-64-inval-movbe.s
> >>> @@ -1,5 +1,6 @@
> >>>  # Check illegal movbe in 64bit mode.
> >>>  	.text
> >>> +	.arch .noapx_f
> >>>  foo:
> >>>  	movbe	(%rcx),%bl
> >>>  	movbe	%ecx,%ebx
> >>
> >> I don't understand the need for this addition (and hence for the need
> >> to change the test's expecations). Like was mentioned on the original
> >> AVX10 series, tests like this shall not need modification, or else it
> >> indicates people's code also may need ".arch .noapx_f" additions,
> >> which I'm sure you agree may not be required. Finally, if testcase
> >> expecations like the above would be needed anywhere, please
> >> generalize them such that a similar mere addition of a line doesn't
> >> require the entire test to be touched. Here this means that while for
> >> the diagnostics you of course want exact line number matches, for the
> >> actual listing line numbers don't don't need matching individually.
> >>
> >
> > Agree with you, but movbe is special, movbe didn't support reg to reg
> before, but APX enable it. so I added .arch .noapx_f for this invalid test.
> 
> To be honest I didn't really notice this difference so far. That's somewhat ugly,
> because people mistakenly using a reg->reg form would suddenly get an EVEX
> encoding rather than an error. This will need some further thought; please
> mention the "anomaly" explicitly in the description of the respective patch.
> 
SPEC:
Note: The promoted versions of MOVBE will be extended to include the “MOVBE reg1,
reg2” form (namely, the ModRM.Mod = 3 case) for both opcodes 0xF0 and 0xF1. This
extension makes the promotion of BSWAP for NDD support unnecessary.

I'll add a description of movbe to the patch 2/8 changelog. 

// Move after swapping the bytes
 movbe, 0x0f38f0, Movbe, D|Modrm|CheckOperandSize|No_bSuf|No_sSuf, { Word|Dword|Qword|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
+movbe, 0x60, Movbe|APX_F, D|Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVex128|EVexMap4, { Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }

Thanks,
Lili.


More information about the Binutils mailing list