Author: coby Date: Thu Aug 24 01:47:26 2017 New Revision: 311640 URL: http://llvm.org/viewvc/llvm-project?rev=311640&view=rev Log: Fixups to FE tests affected by D36793
Differential Revision: https://reviews.llvm.org/D36794 Modified: cfe/trunk/test/CodeGen/mozilla-ms-inline-asm.c cfe/trunk/test/CodeGen/ms-inline-asm-64.c cfe/trunk/test/CodeGen/ms-inline-asm.c cfe/trunk/test/CodeGen/ms-inline-asm.cpp cfe/trunk/test/CodeGenCXX/ms-inline-asm-return.cpp cfe/trunk/test/Sema/ms-inline-asm.c Modified: cfe/trunk/test/CodeGen/mozilla-ms-inline-asm.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mozilla-ms-inline-asm.c?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/mozilla-ms-inline-asm.c (original) +++ cfe/trunk/test/CodeGen/mozilla-ms-inline-asm.c Thu Aug 24 01:47:26 2017 @@ -33,7 +33,7 @@ void invoke(void* that, unsigned methodI // CHECK-SAME: push ecx // CHECK-SAME: mov edx,[ecx] // CHECK-SAME: mov eax,$4 -// CHECK-SAME: call dword ptr[edx+eax*$$4] +// CHECK-SAME: call dword ptr[edx + eax * $$4] // CHECK-SAME: mov esp,ebp // CHECK-SAME: pop ebp // CHECK-SAME: ret Modified: cfe/trunk/test/CodeGen/ms-inline-asm-64.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm-64.c?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/ms-inline-asm-64.c (original) +++ cfe/trunk/test/CodeGen/ms-inline-asm-64.c Thu Aug 24 01:47:26 2017 @@ -34,8 +34,8 @@ int t3() { // CHECK: t3 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: lea ebx, $0 -// CHECK-SAME: mov eax, [ebx].0 -// CHECK-SAME: mov [ebx].4, ecx +// CHECK-SAME: mov eax, [ebx] +// CHECK-SAME: mov [ebx + $$4], ecx // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(%struct.t3_type* %{{.*}}) } @@ -54,7 +54,7 @@ int t4() { // CHECK: t4 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: lea ebx, $0 -// CHECK-SAME: mov eax, [ebx].0 -// CHECK-SAME: mov [ebx].4, ecx +// CHECK-SAME: mov eax, [ebx] +// CHECK-SAME: mov [ebx + $$4], ecx // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(%struct.t3_type* %{{.*}}) } Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/ms-inline-asm.c (original) +++ cfe/trunk/test/CodeGen/ms-inline-asm.c Thu Aug 24 01:47:26 2017 @@ -42,7 +42,7 @@ void t5(void) { void t6(void) { __asm int 0x2c // CHECK: t6 -// CHECK: call void asm sideeffect inteldialect "int $$0x2c", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "int $$44", "~{dirflag},~{fpsr},~{flags}"() } void t7() { @@ -61,7 +61,7 @@ void t7() { mov eax, ebx } // CHECK: t7 -// CHECK: call void asm sideeffect inteldialect "int $$0x2cU", "~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "int $$44", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "mov eax, ebx", "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -94,7 +94,7 @@ void t9() { // CHECK: t9 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: push ebx -// CHECK-SAME: mov ebx, $$0x07 +// CHECK-SAME: mov ebx, $$7 // CHECK-SAME: pop ebx // CHECK-SAME: "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() } @@ -229,7 +229,7 @@ void t20() { __asm mov eax, LENGTH _bar // CHECK: mov eax, $$2 __asm mov eax, [eax + LENGTH foo * 4] -// CHECK: mov eax, [eax + $$1 * $$4] +// CHECK: mov eax, [eax + $$4] __asm mov eax, TYPE foo // CHECK: mov eax, $$4 @@ -240,7 +240,7 @@ void t20() { __asm mov eax, TYPE _bar // CHECK: mov eax, $$1 __asm mov eax, [eax + TYPE foo * 4] -// CHECK: mov eax, [eax + $$4 * $$4] +// CHECK: mov eax, [eax + $$16] __asm mov eax, SIZE foo // CHECK: mov eax, $$4 @@ -249,7 +249,7 @@ void t20() { __asm mov eax, SIZE _foo // CHECK: mov eax, $$16 __asm mov eax, [eax + SIZE _foo * 4] -// CHECK: mov eax, [eax + $$16 * $$4] +// CHECK: mov eax, [eax + $$64] __asm mov eax, SIZE _bar // CHECK: mov eax, $$2 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() @@ -265,7 +265,7 @@ void t21() { // CHECK: t21 // CHECK: call void asm sideeffect inteldialect // CHECK-SAME: push ebx -// CHECK-SAME: mov ebx, $$07H +// CHECK-SAME: mov ebx, $$7 // CHECK-SAME: pop ebx // CHECK-SAME: "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"() } @@ -312,13 +312,13 @@ void t24() { void t25() { // CHECK: t25 __asm mov eax, 0ffffffffh -// CHECK: mov eax, $$0ffffffffh +// CHECK: mov eax, $$4294967295 __asm mov eax, 0fhU // CHECK: mov eax, $$15 __asm mov eax, 0a2h -// CHECK: mov eax, $$0a2h +// CHECK: mov eax, $$162 __asm mov eax, 10100010b -// CHECK: mov eax, $$10100010b +// CHECK: mov eax, $$162 __asm mov eax, 10100010BU // CHECK: mov eax, $$162 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() @@ -344,7 +344,7 @@ void t26() { void t27() { __asm mov eax, fs:[0h] // CHECK: t27 -// CHECK: call void asm sideeffect inteldialect "mov eax, fs:[$$0h]", "~{eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call void asm sideeffect inteldialect "mov eax, fs:[$$0]", "~{eax},~{dirflag},~{fpsr},~{flags}"() } void t28() { @@ -426,18 +426,18 @@ void t33() { void t34() { // CHECK: t34 __asm prefetchnta 64[eax] -// CHECK: prefetchnta $$64[eax] +// CHECK: prefetchnta [eax + $$64] __asm mov eax, dword ptr 4[eax] -// CHECK: mov eax, dword ptr $$4[eax] +// CHECK: mov eax, dword ptr [eax + $$4] // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() } void t35() { // CHECK: t35 __asm prefetchnta [eax + (200*64)] -// CHECK: prefetchnta [eax + ($$200*$$64)] +// CHECK: prefetchnta [eax + $$12800] __asm mov eax, dword ptr [eax + (200*64)] -// CHECK: mov eax, dword ptr [eax + ($$200*$$64)] +// CHECK: mov eax, dword ptr [eax + $$12800] // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -446,29 +446,29 @@ void t36() { int arr[4]; // Work around PR20368: These should be single line blocks __asm { mov eax, 4[arr] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4[arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 8[arr + 4 + 32*2 - 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$72$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$72]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 12[4 + arr] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$16$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$16]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4[4 + arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$12$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$12]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4[64 + arr + (2*32)] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$132$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$132]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4[64 + arr - 2*32] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [arr + 4 + 32*2 - 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$64$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$64]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [4 + arr] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [4 + arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [64 + arr + (2*32)] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$128$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$128]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, [64 + arr - 2*32] } // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) } @@ -501,21 +501,21 @@ void t38() { int arr[4]; // Work around PR20368: These should be single line blocks __asm { mov eax, 4+4[arr] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, (4+4)[arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$12$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$12]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 8*2[arr + 4 + 32*2 - 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$80$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$80]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 12+20[4 + arr] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$36$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$36]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4*16+4[4 + arr + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$76$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$76]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4*4[64 + arr + (2*32)] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$144$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$144]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 4*(4-2)[64 + arr - 2*32] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) __asm { mov eax, 32*(4-2)[arr - 2*32] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$0$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}}) } void cpuid() { @@ -544,23 +544,23 @@ typedef struct { void t39() { // CHECK-LABEL: define void @t39 __asm mov eax, [eax].A.b -// CHECK: mov eax, [eax].4 +// CHECK: mov eax, [eax + $$4] __asm mov eax, [eax] A.b -// CHECK: mov eax, [eax] .4 +// CHECK: mov eax, [eax + $$4] __asm mov eax, [eax] pA.b -// CHECK: mov eax, [eax] .4 +// CHECK: mov eax, [eax + $$4] __asm mov eax, fs:[0] A.b -// CHECK: mov eax, fs:[$$0] .4 +// CHECK: mov eax, fs:[$$4] __asm mov eax, [eax].B.b2.a -// CHECK: mov eax, [eax].4 +// CHECK: mov eax, [eax + $$4] __asm mov eax, [eax] B.b2.b -// CHECK: mov eax, [eax] .8 +// CHECK: mov eax, [eax + $$8] __asm mov eax, fs:[0] C.c2.b -// CHECK: mov eax, fs:[$$0] .8 +// CHECK: mov eax, fs:[$$8] __asm mov eax, [eax]C.c4.b2.b -// CHECK: mov eax, [eax].24 +// CHECK: mov eax, [eax + $$24] __asm mov eax, [eax]pC.c4.b2.b -// CHECK: mov eax, [eax].24 +// CHECK: mov eax, [eax + $$24] // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -604,29 +604,29 @@ void t43() { C strct; // Work around PR20368: These should be single line blocks __asm { mov eax, 4[strct.c1] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 4[strct.c3 + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 8[strct.c2.a + 4 + 32*2 - 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$72$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$72]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 12[4 + strct.c2.b] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$16$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$16]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 4[4 + strct.c4.b2.b + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$12$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$12]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 4[64 + strct.c1 + (2*32)] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$132$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$132]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, 4[64 + strct.c2.a - 2*32] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [strct.c4.b1 + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [strct.c4.b2.a + 4 + 32*2 - 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$64$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$64]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [4 + strct.c1] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$4]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [4 + strct.c2.b + 4] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$8]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [64 + strct.c3 + (2*32)] } -// CHECK: call void asm sideeffect inteldialect "mov eax, $$128$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) +// CHECK: call void asm sideeffect inteldialect "mov eax, $0[$$128]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) __asm { mov eax, [64 + strct.c4.b2.b - 2*32] } // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) } @@ -658,13 +658,13 @@ void t45() { void t46() { // CHECK-LABEL: define void @t46 __asm add eax, -128[eax] - // CHECK: call void asm sideeffect inteldialect "add eax, $$-128[eax]", "~{eax},~{flags},~{dirflag},~{fpsr},~{flags}"() + // CHECK: call void asm sideeffect inteldialect "add eax, [eax + $$-128]", "~{eax},~{flags},~{dirflag},~{fpsr},~{flags}"() } void dot_operator(){ -// CHECK-LABEL: define void @dot_operator + // CHECK-LABEL: define void @dot_operator __asm { mov eax, 3[ebx]A.b} -// CHECK: call void asm sideeffect inteldialect "mov eax, $$3[ebx].4", "~{eax},~{dirflag},~{fpsr},~{flags}" + // CHECK: call void asm sideeffect inteldialect "mov eax, [ebx + $$7]", "~{eax},~{dirflag},~{fpsr},~{flags}" } void call_clobber() { Modified: cfe/trunk/test/CodeGen/ms-inline-asm.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.cpp?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/ms-inline-asm.cpp (original) +++ cfe/trunk/test/CodeGen/ms-inline-asm.cpp Thu Aug 24 01:47:26 2017 @@ -130,7 +130,7 @@ void t7_struct() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z9t7_structv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -142,7 +142,7 @@ void t7_typedef() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z10t7_typedefv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -154,7 +154,7 @@ void t7_using() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z8t7_usingv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -188,7 +188,7 @@ void t9() { void g() { __asm mov eax, dword ptr [eax]this.b // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, dword ptr [eax].4 + // CHECK-SAME: mov eax, dword ptr [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } }; Modified: cfe/trunk/test/CodeGenCXX/ms-inline-asm-return.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/ms-inline-asm-return.cpp?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/CodeGenCXX/ms-inline-asm-return.cpp (original) +++ cfe/trunk/test/CodeGenCXX/ms-inline-asm-return.cpp Thu Aug 24 01:47:26 2017 @@ -70,7 +70,7 @@ FourChars f_s4() { } } // CHECK-LABEL: define i32 @f_s4() -// CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$0x01010101", "={eax},~{eax},{{.*}}" +// CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$16843009", "={eax},~{eax},{{.*}}" // CHECK: store i32 %[[r]], i32* %{{.*}} // CHECK: %[[r_i32:[^ ]*]] = load i32, i32* %{{.*}} // CHECK: ret i32 %[[r_i32]] @@ -85,7 +85,7 @@ EightChars f_s8() { } } // CHECK-LABEL: define i64 @f_s8() -// CHECK: %[[r:[^ ]*]] = call i64 asm sideeffect inteldialect "mov eax, $$01010101h\0A\09mov edx, $$01010101b", "=A,~{eax},{{.*}}" +// CHECK: %[[r:[^ ]*]] = call i64 asm sideeffect inteldialect "mov eax, $$16843009\0A\09mov edx, $$85", "=A,~{eax},{{.*}}" // CHECK: store i64 %[[r]], i64* %{{.*}} // CHECK: %[[r_i64:[^ ]*]] = load i64, i64* %{{.*}} // CHECK: ret i64 %[[r_i64]] Modified: cfe/trunk/test/Sema/ms-inline-asm.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms-inline-asm.c?rev=311640&r1=311639&r2=311640&view=diff ============================================================================== --- cfe/trunk/test/Sema/ms-inline-asm.c (original) +++ cfe/trunk/test/Sema/ms-inline-asm.c Thu Aug 24 01:47:26 2017 @@ -59,18 +59,13 @@ int t2(int *arr, int i) { mov eax, arr[1 + (2 * 5) - 3 + 1<<1]; } - // expected-error@+1 {{cannot use base register with variable reference}} - __asm { mov eax, arr[ebp + 1 + (2 * 5) - 3 + 1<<1] } - // expected-error@+1 {{cannot use index register with variable reference}} - __asm { mov eax, arr[esi * 4] } // expected-error@+1 {{cannot use more than one symbol in memory operand}} __asm { mov eax, arr[i] } // expected-error@+1 {{cannot use more than one symbol in memory operand}} __asm { mov eax, global[i] } - // FIXME: Why don't we diagnose this? - // expected-Xerror@+1 {{cannot reference multiple local variables in assembly operand}} - //__asm mov eax, [arr + i]; + // expected-error@+1 {{cannot use more than one symbol in memory operand}} + __asm mov eax, [arr + i]; return 0; } @@ -98,7 +93,7 @@ void t4() { __asm { mov eax, fs:[0] A.a } __asm { mov eax, fs:[0].A.a } __asm { mov eax, fs:[0].a } // expected-error {{Unable to lookup field reference!}} - __asm { mov eax, fs:[0]. A.a } // expected-error {{Unexpected token type!}} + __asm { mov eax, fs:[0]. A.a } // expected-error {{unexpected token in argument list}} } void test_operand_size() { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits