This syntax appears in actual code in the wild, and is valid according to gnu as.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not sure this is actually a good idea. The asm file in question seems
to me probably to have just been a typo. (Says %0 in one place, instead of
%g0 or 0.)
Unless there's more widespread usage of this, I think it might be better to
treat that "%0" usage as a bug, and just fix it, rather than adding support
for this confusing register-naming variant in llvm.
Solaris 'as' also doesn't accept that syntax.
$ echo "mov %0, %g1" > /tmp/test.s
$ as -o /tmp/test.o /tmp/test.s
as: "/tmp/test.s", line 1: error: statement syntax