[PATCH] D113096: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 08:38:48 PDT 2021
pengfei added a comment.
How about the GV is function pointer? I believe @xiangzhangllvm has lots of experience on it :)
================
Comment at: clang/test/CodeGen/ms-inline-asm-static-variable.c:8
+ // CHECK: @arr = internal global [10 x i32]
+ // CHECK: call void asm sideeffect inteldialect "mov dword ptr $0[edx * $$4],edx", "=*m,{{.*}}([10 x i32]* @arr)
+ __asm mov dword ptr arr[edx*4],edx
----------------
IIRC, we have limitation on the number. Can you check if it works when we have more than 10 global variables.
================
Comment at: clang/test/CodeGen/ms-inline-asm-variables.c:35
}
-
----------------
Unrelated change.
================
Comment at: llvm/test/CodeGen/X86/ms-inline-asm-array.ll:15-22
+!llvm.module.flags = !{!0, !1, !2}
+!llvm.ident = !{!3}
+
+!0 = !{i32 1, !"wchar_size", i32 4}
+!1 = !{i32 7, !"uwtable", i32 1}
+!2 = !{i32 7, !"frame-pointer", i32 2}
+!3 = !{!"clang"}
----------------
These seem unnecessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113096/new/
https://reviews.llvm.org/D113096
More information about the llvm-commits
mailing list