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

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 14 00:54:41 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}}
----------------
MaskRay wrote:

The codegen tests  `asm("// %p0 %p1 %p2" :: "Ws"(&var), "Ws"(&arr[3]), "Ws"(test_Ws));` (and a struct test I am adding) provide positive tests:)

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


More information about the cfe-commits mailing list