luismarques added inline comments.
================
Comment at: clang/test/Sema/inline-asm-validate-riscv.c:27-28
+ register long x10 asm("x10");
+ asm volatile("" :: "r"(x10) : "x10"); // expected-error {{conflicts with asm
clobber list}}
+ asm volatile("" :: "r"(x10) : "a0"); // expected-error {{conflicts with asm
clobber list}}
+ asm volatile("" : "=r"(x10) :: "x10"); // expected-error {{conflicts with
asm clobber list}}
----------------
I don't really understand the point of erroring-out in these two cases where
the register is an input and is also clobbered. In fact, I've run into a case
where that would be useful and accurately reflected the situation. But GCC's
documentation explicitly prohibits that. I'm not sure if there's a fundamental
reason for that, or if it's just an implementation quirk.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108624/new/
https://reviews.llvm.org/D108624
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits