From 1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Thu, 9 Jan 2020 14:01:55 -0500 Subject: [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 --- clang/test/CodeGen/ms-inline-asm-64.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'clang/test/CodeGen') 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 (...)*)) +} -- cgit v1.2.3