For some reason GoAsm ignores the USES directive in x86 mode if I put x64 register names in it.
"USES rbx,rdi,rsi" — works OK in x64 mode but is ingored in x86. The registers are not preserved.
"USES ebx,edi,esi" — seems to work in both.
Can anyone confirm this, or maybe I am doing something wrong and don't see that ... ::)
You're not doing anything wrong Yuri, this is a bug in compatibility mode. For now this workaround works fine:
TestFrame FRAME param
#IFDEF X64
uses rbx,rdi,rsi
#ELSE
uses ebx,edi,esi
#ENDIF
ret
ENDF
I guess we can just write "USES ebx,edi,esi". The GoAsm manual states that pushes are equivalent for both versions of a register. This is probably unlikely to change. But of course your solution is more precise.
Hi Yuri
Thanks for the bug report.
Currently Wayne and Edgar are helping to maintain the "Go" source and to deal with bugs and enhancements.
Your bug has been identified, and a fix will be incorporated in GoAsm Version 0.57 which will be released very shortly.
Great news, Jeremy. :thumbu Thank you, guys, for maintaining this excellent project.