diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/mozilla-ms-inline-asm.c | 2 | ||||
| -rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/ms-inline-asm.cpp | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 9fd4a5fb17a..6c6400652a6 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1187,6 +1187,10 @@ static void rewriteInputConstraintReferences(unsigned FirstIn, if (NumDollars % 2 != 0 && Pos < AsmString.size()) { // We have an operand reference. size_t DigitStart = Pos; + if (AsmString[DigitStart] == '{') { + OS << '{'; + ++DigitStart; + } size_t DigitEnd = AsmString.find_first_not_of("0123456789", DigitStart); if (DigitEnd == std::string::npos) DigitEnd = AsmString.size(); diff --git a/clang/test/CodeGen/mozilla-ms-inline-asm.c b/clang/test/CodeGen/mozilla-ms-inline-asm.c index 0774c8cb304..210c7f2b9c8 100644 --- a/clang/test/CodeGen/mozilla-ms-inline-asm.c +++ b/clang/test/CodeGen/mozilla-ms-inline-asm.c @@ -27,7 +27,7 @@ void invoke(void* that, unsigned methodIndex, // CHECK-SAME: sub esp,eax // CHECK-SAME: mov ecx,esp // CHECK-SAME: push $0 -// CHECK-SAME: call dword ptr $2 +// CHECK-SAME: call dword ptr ${2:P} // CHECK-SAME: {{.*}}__MSASMLABEL_.${:uid}__noparams: // CHECK-SAME: mov ecx,$3 // CHECK-SAME: push ecx diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index 00d408f431c..0c9b35a6452 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -306,7 +306,7 @@ void t24_helper(void) {} void t24() { __asm call t24_helper // CHECK: t24 -// CHECK: call void asm sideeffect inteldialect "call dword ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(void ()* @t24_helper) +// CHECK: call void asm sideeffect inteldialect "call dword ptr ${0:P}", "*m,~{dirflag},~{fpsr},~{flags}"(void ()* @t24_helper) } void t25() { @@ -689,7 +689,7 @@ void dot_operator(){ void call_clobber() { __asm call t41 // CHECK-LABEL: define void @call_clobber - // CHECK: call void asm sideeffect inteldialect "call dword ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(void (i16)* @t41) + // CHECK: call void asm sideeffect inteldialect "call dword ptr ${0:P}", "*m,~{dirflag},~{fpsr},~{flags}"(void (i16)* @t41) } void xgetbv() { diff --git a/clang/test/CodeGen/ms-inline-asm.cpp b/clang/test/CodeGen/ms-inline-asm.cpp index 039cde9e10e..58796ed6378 100644 --- a/clang/test/CodeGen/ms-inline-asm.cpp +++ b/clang/test/CodeGen/ms-inline-asm.cpp @@ -109,7 +109,7 @@ void test5() { __asm mov x, eax // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: push $0 - // CHECK-SAME: call dword ptr $2 + // CHECK-SAME: call dword ptr ${2:P} // CHECK-SAME: mov $1, eax // CHECK-SAME: "=*m,=*m,*m,~{esp},~{dirflag},~{fpsr},~{flags}"(i32* %y, i32* %x, i32 (float)* @_ZN2T5IiE6createIfEEiT_) } |

