https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56479

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.7.2                       |14.1.0
   Last reconfirmed|2013-03-02 00:00:00         |2024-7-12
      Known to fail|                            |14.1.0

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Confirmed with v14.

For the time being, as a work-around you can assign the registers by hand using
local register variables, like so:

uint64_t asmfoo (uint32_t x, uint32_t y)
{
  uint64_t z;
  register uint32_t r16 __asm("16") = x;
  register uint32_t r20 __asm("20") = y;
  asm volatile (";; %0 %1 %2"
                : "=&r" (z)
                : "a" (r16), "a" (r20));
  return z;
}

Reply via email to