64 bit winabi register preservation rules apply to gdi as well?
Is it possible to have a loop with one or more xmm regs hold data and trust gdi calls keep them preserved,so i can use them in a loop?
But in 32bit i need to preserve registers myself before call ?
They apply to everything. Registers are registers.
http://masm32.com/board/index.php?topic=783.0 (http://masm32.com/board/index.php?topic=783.0)
Don't know if this might help Magnus but I came across that thread during my wanderings about the forum and remember this one. :biggrin:
Hi daydreamer!
Quote from: daydreamer on October 07, 2022, 08:50:36 PM
Is it possible to have a loop with one or more xmm regs hold data and trust gdi calls keep them preserved,so i can use them in a loop?
In theory, any procedure that follow x64 ABI must preserve xmm6 through xmm15. And GDI must not be an exception.
But that give me the idea :thumbsup:
Now I added pseudo push/pop of XMM registers:
freg_push xmm6
· · ·
freg_pop xmm6
Test is with ML64 (and removing xmm6 preservation :biggrin:).
Regards, HSE.
great Hector :thumbsup:
now I understand it better,thanks Zedd,Hutch,Hector