[Bug c/121235] Local register variable constraints aren't respected in extended asm
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 24 18:03:27 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121235
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In fact my fixed up code is how it is written in the documentation even.
int t1 = …;
register int *p1 asm ("r0") = …;
register int *p2 asm ("r1") = t1;
register int *result asm ("r0");
asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2));
Notice the use of p1/p2 in the inline-asm rather than t1.
More information about the Gcc-bugs
mailing list