News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

What is best alternative?

Started by daydreamer, January 17, 2021, 08:08:18 PM

Previous topic - Next topic

felipe

Quote from: daydreamer on January 20, 2021, 05:13:17 AM
why do my compiler choose R9D(32bit) to use in a loop?

Probably because the r9 register is one of the volatile on function call registers (as ecx in 32 bit abi), so the compiler won't use a non-volatile register in loops... :icon_idea:

felipe

of course this in the context of the windows 64 bit abi, as mentioned by hutch...

hutch--

felipe is correct here, if you get the register list in the masm 64 bit reference section, transient registers are used differently from system or fixed registers and it works in much the same way as the Intel 32 bit ABI, some registers are reserved by the OS and the others are transient.

Win64 is a lot easier to use as you have a lot more registers and rarely need locals to make up for registers so the OS has enough to make the OS faster while leaving more transient registers available.

daydreamer

Quote from: hutch-- on January 20, 2021, 10:55:09 AM
felipe is correct here, if you get the register list in the masm 64 bit reference section, transient registers are used differently from system or fixed registers and it works in much the same way as the Intel 32 bit ABI, some registers are reserved by the OS and the others are transient.
thanks Hutch
so 32bit use free registers used to change X and Y first avoids 3push/3pops,its push,push,push,push,call bitblt or other imagedrawing call,question if fixed point 16:16 shift to get only integer part

64bit use the right 4 registers to change X,xlow and Y,ylow and shift and call bitblt,few cycles faster!!!
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding