[Development] Passing QSize, QPoint, QTime and other small structs by value

Thiago Macieira thiago.macieira at intel.com
Fri Apr 7 17:45:33 CEST 2017

Em sexta-feira, 7 de abril de 2017, às 08:31:07 PDT, Ch'Gans escreveu:
> > x86 doesn't pass in registers anyway. The best you'd get is the elements
> > of
> > the struct pushed on the stack, instead of pushed elsewhere on the stack
> > and an address to the stack pushed on the stack.
> What about FPU registers? Qt API always pass 'qreal' by value...

We're not talking about primitives. We're talking about structs that are very 
small and trivial. See for yourself:


Direct primitive passing is fine:


Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list