Author Topic: Re: X64 ABI, REAL8 passed in xmmreg?  (Read 463 times)

mineiro

  • Member
  • ****
  • Posts: 725
Re: X64 ABI, REAL8 passed in xmmreg?
« on: April 12, 2021, 06:14:32 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

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: X64 ABI, REAL8 passed in xmmreg?
« Reply #1 on: April 12, 2021, 09:10:23 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.