[llvm] [clang] [lldb] [libcxx] [compiler-rt] [libc] [mlir] [flang] [clang-tools-extra] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 13 23:51:32 PST 2024


================
@@ -130,3 +130,7 @@ void pr40890(void) {
   __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeeeeeef));
 #endif
 }
+
+void test_W(int i) {
+  asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}}
----------------
phoebewang wrote:

Use `__asm__` for consistency?

https://github.com/llvm/llvm-project/pull/77886


More information about the cfe-commits mailing list