The first stack argument will always be at [EBP+8]
when using a stack frame, but calling conventions can pass arguments in both registers (general purpose and SIMD) and on the stack.
This your example assume you use a standardized convention such as __stdcall
, __cdecl
but arguments in __fastcall
and VC++13's new __vectorcall
will be in general purpose and SIMD registers respectively (and the registers themselves differ based on ABI Sys-V vs MS).