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

Ch'Gans chgans at gna.org
Fri Apr 7 17:31:07 CEST 2017


On 8 April 2017 at 03:21, Thiago Macieira <thiago.macieira at intel.com> wrote:
> Em sexta-feira, 7 de abril de 2017, às 06:02:55 PDT, Lars Knoll escreveu:
>> Those rules sound about right. We can do this nowadays, as x86 will become
>> rather irrelevant for Qt 6 (where passing structs by reference would
>> probably be better in most cases due to the limited amount of available
>> registers).
>
> 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...

Chris

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list