Which XMM are safe to erase in asm{} blocks?

ponce via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 8 00:16:29 PDT 2015


On Wednesday, 8 July 2015 at 05:22:34 UTC, ketmar wrote:
> On Tue, 07 Jul 2015 12:33:38 +0000, ponce wrote:
>
>> Is this secret knowledge?
>
> yes. ;-)
>
> i believe that there are not so many people doing asm in D, and 
> many of them using "write and forget" technique (i.e. write and 
> don't touch if it works). so you need someone with good 
> knowledge of backend to answer this question, and such people 
> are rare here. ;-)
>
> so i thing that your best bet is to investigate that by 
> yourself, and write an article about it.

I would if I had time ;)

It looks that using XMM0 to XMM5 doesn't blow.

It would also help to know if the compiler insert spilling code 
if the asm code when some register is used that should not be 
modified by law. C++ compilers do that and it's both a 
performance hit and a safety net.


More information about the Digitalmars-d-learn mailing list