News:

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

Main Menu

Re: X64 ABI, REAL8 passed in xmmreg?

Started by mineiro, April 12, 2021, 06:14:32 AM

Previous topic - Next topic

mineiro

Quote from: jj2007 on April 11, 2021, 10:41:16 AM
From my tests it seems that xmm2 and xmm3 are ignored by printf().
In linux it's necessary to set rax register with how many xmm registers are being used with printf. Maybe a try in windows.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

jj2007

Quote from: mineiro on April 12, 2021, 06:14:32 AM
Quote from: jj2007 on April 11, 2021, 10:41:16 AM
From my tests it seems that xmm2 and xmm3 are ignored by printf().
In linux it's necessary to set rax register with how many xmm registers are being used with printf. Maybe a try in windows.

Further tests show that compilers set (in compliance with the Windows ABI) the reg64 args, e.g. movsd rdx, xmm1. CRT printf uses rdx, r8, r9 internally but ignores the xmm regs.