diff options
| author | Eric Astor <epastor@google.com> | 2020-01-09 14:01:55 -0500 |
|---|---|---|
| committer | Eric Astor <epastor@google.com> | 2020-01-09 14:55:03 -0500 |
| commit | 1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb (patch) | |
| tree | 10b597f4379943fee8e5d36e64ac774e0ce81504 /clang/test/CodeGen | |
| parent | 3408940f736955402b7676e3b8bab6906cc82637 (diff) | |
| download | bcm5719-llvm-1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb.tar.gz bcm5719-llvm-1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb.zip | |
[ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.
Summary:
Extend D71677 to apply to all branch-target operands, rather than special-casing call instructions.
Also add a regression test for llvm.org/PR44272, since this finishes fixing it.
Reviewers: thakis, rnk
Reviewed By: thakis
Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D72417
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/ms-inline-asm-64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm-64.c b/clang/test/CodeGen/ms-inline-asm-64.c index ce46b8821de..20e8228a04b 100644 --- a/clang/test/CodeGen/ms-inline-asm-64.c +++ b/clang/test/CodeGen/ms-inline-asm-64.c @@ -58,3 +58,17 @@ int t4() { // CHECK-SAME: mov [ebx + $$4], ecx // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(%struct.t3_type* %{{.*}}) } + +void bar() {} + +void t5() { + __asm { + call bar + jmp bar + } + // CHECK: t5 + // CHECK: call void asm sideeffect inteldialect + // CHECK-SAME: call qword ptr ${0:P} + // CHECK-SAME: jmp qword ptr ${1:P} + // CHECK-SAME: "*m,*m,~{dirflag},~{fpsr},~{flags}"(void (...)* bitcast (void ()* @bar to void (...)*), void (...)* bitcast (void ()* @bar to void (...)*)) +} |

