News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Bug in x64 with the S type indicator

Started by Yuri, February 07, 2012, 09:44:32 AM

Previous topic - Next topic

Yuri

The S type indicator seems to be ignored in x64 if used as the scale value.

#if x64
    S=8
#else
    S=4
#endif

CODE SECTION

Start:
    mov rax,2
    lea rdx,[rax*S+4]
    invoke msvcrt:printf, "S = %d; rdx = %d", S, rdx
    #if ! x64
        add esp,0Ch
    #endif
    ret


Results in my tests:

x86 S = 4; rdx = 12
x64 S = 8; rdx = 6

wjr

Thanks. Correct, any defined symbol including S is ignored with only direct numerical scale values being processed in x64. I also see that 32-bit processing assembles without error if the symbol is not defined or defined as a string.

I have forwarded fixes for these to Jeremy to be incorporated into the upcoming GoAsm Version 0.57.

This version will also have a similar P type indicator (default 4) as mentioned previously here:
http://www.masm32.com/board/index.php?topic=13127.0

Yuri

Thanks, Wayne. Yes, to have a separate type switch for pointers will be more convenient than one S for all purposes. :thumbu