C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Return Value Optimisation whenever you need it (guaranteed elision)

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Sun, 16 Jul 2023 22:35:41 +0100
On Sun, Jul 16, 2023 at 10:22 PM Frederick Virchanza Gotham wrote:
>
> So my original code seems to work on every operating system and CPU
> architecture except for aarch64. But I have a working solution for
> aarch64 also.


Obviously I'm now writing code that branches as follows:

      #if defined(__aarch64__) || defined(_M_ARM64)
          // Pass address in X8 register
     #else
          // Pass address as first parameter (move all others down one)
      #endif

Give me a day or two and I'll have a universal solution.

Received on 2023-07-16 21:35:50