Home > OS >  Does stdcall use SSE registers? And does he restore them?
Does stdcall use SSE registers? And does he restore them?

Time:03-25

I am interested in whether stdcall uses SSE registers on x86, and if so, will it restore them, like ESI, EDI, EBP, EBX?

CodePudding user response:

No.

As you mentioned, the Windows x86-32 ABI specifies that EAX, EDX, and ECX are available as "scratch" registers inside of the function (clobbered); all of the other general-purpose integer registers are preserved (i.e., EBX, ESI, EDI, EBP, and EIP). This doesn't apply to SSE registers; only to general-purpose integer registers. All of the SSE registers are considered to be clobbered.

  • Related