The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: HSE on June 25, 2019, 11:33:33 PM

Title: UASM32: VMOVD with EVEX disabled?
Post by: HSE on June 25, 2019, 11:33:33 PM
Hi habran and jhonsa!

Using OPTION EVEX:0 still macro LOADSS result in:CPU Disasm
Address   Hex dump          Command                                  Comments
013C132B  |.  A1 AC313C01   MOV EAX,DWORD PTR DS:[13C31AC]
013C1330  |.  C5F9:6EC8     VMOVD XMM1,EAX
013C1334  |.  A1 B0313C01   MOV EAX,DWORD PTR DS:[13C31B0]
013C1339  |.  C5F9:6EC0     VMOVD XMM0,EAX


Regards, HSE
Title: Re: UASM32: VMOVD with EVEX disabled?
Post by: habran on June 26, 2019, 10:08:51 AM
Hi HSE,
this is from UASM Extended Manual:
Quote
2.13) OPTION ARCH:{SSE|AVX}
This setting determines which instruction set should be used for any automatically generated code.
This includes prologue, epilogue, invoke as well as the built-in macro library.
For example the LOADSS built-in macro would be coded under SSE as :
mov eax,floatLiteral
movd xmmReg,eax
But under AVX it would use vmovd instead.
This setting is also available through command line switches –archSSE and –archAVX.
The default setting is to use the SSE instruction set.
The currently selected architected is also available through the built-in variable @Arch.
Title: Re: UASM32: VMOVD with EVEX disabled?
Post by: johnsa on June 26, 2019, 06:03:47 PM
If you're not specifying arch AVX, it should be using MOVD by default. That would be a bug in this case, please confirm.
Title: Re: UASM32: VMOVD with EVEX disabled?
Post by: johnsa on June 26, 2019, 06:28:29 PM
Just confirmed using AW's test piece, with option ARCH:SSE the correct MOVD is produced. ARCH:AVX is the default so without that option set you will use vmovd/q.