I'm in the process of porting NASM code to MASM, and I'm stuck on a NASM empty macro with 2 parameters and register usage with the _m suffix.
example code:
;register defines %define arg0 rcx %define arg4 r12 %define tmp4 r14 %define len arg0 %define dest1 arg4 %define dest2 tmp4 %define PS 8 ;empty macro %macro SLDR 2 %endmacro %define SSTR SLDR ; example usage in code: SLDR len, len_m sub len, 16 SSTR len_m, len jl .return0 ;... SLDR dest1, dest1_m mov dest2, [dest1+PS] SSTR dest2_m, dest2 mov dest1, [dest1] SSTR dest1_m, dest1 I assume the _m parameters are macro generated names, but what register(s) do they represent (assuming they are not on the stack)?
.return0:label anywhere in your MCVE, we can assemble it and see what registers the normal instructions use. To see what if anythingdest2_mexpands to, you could make the macro non-empty, like using%warn, orxor %1, %2or something and look at the error messages. In this case,macros.asm:20: error: symbol 'len_m' not defined(godbolt.org/z/P38E676dc). I didn't think there was any magic with_mnames in NASM, and this confirms it.%1=rcxand%2=len_min the first use ofSLDRfor example.%warning, not%warnlen_mandarg0_m, along with usage of the SLDR and SSTR macros. Support for X86 32 bit was removed from Intel ISA-L erasure code . They should have either deleted the lines using SLDR and SSTR or commented them out with an explanation. I've ported one of the asm files gf_vect_dot_prod_sse.asm to Visual Studio | MASM and it's working. Some of the register renames are poor:x0forxmm0butxtmpaforxmm1?