Hi
Coming back to VARARG, I noticed that floating point arguments passed as VARARG are stored in GP-Registers and not, as I would expect, in XMM regs. Is that the intended way it should work?
.xmm
option casemap:none
option dotname
option frame:auto
option win64:8
option stackbase:rsp
.code
Test1 proc Arg1:QWORD, Args:VARARG
mov rax, Arg1
ret
Test1 endp
start proc
invoke Test1, 102.54, REAL4 ptr 1.234, REAL8 ptr 1.234
ret
start endp
end start
Test1 proc Arg1:QWORD, Args:VARARG
mov qword ptr [Arg1],rcx
mov qword ptr [Args],rdx
mov qword ptr [rsp+18h],r8
mov qword ptr [rsp+20h],r9
mov rax, Arg1
mov rax,qword ptr [Arg1]
ret
ret
Test1 endp
The disassembly looks like
start proc
sub rsp,28h
invoke Test1, 102.54, REAL4 ptr 1.234, REAL8 ptr 1.234
mov r8,3FF3BE76C8B43958h
mov edx,3F9DF3B6h
mov rcx,42CD147Bh
call Test1 (0811000h)
ret
add rsp,28h
ret
I'm not sure why the callee is saving all regs into the homing area. Has it something to do with the VARARG feature?
Biterider