From 7fcde17284f5b18b18d858bbbc81898f58f3c296 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 21 Aug 2012 17:01:26 +0000 Subject: [PATCH] [ms-inline asm] Remove this test case and the associated special case code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162288 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaStmtAsm.cpp | 6 ------ test/CodeGen/ms-inline-asm.c | 28 +++++++++++----------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp index 591a91c7e5..a09bdc75bd 100644 --- a/lib/Sema/SemaStmtAsm.cpp +++ b/lib/Sema/SemaStmtAsm.cpp @@ -421,12 +421,6 @@ static void patchMSAsmStrings(Sema &SemaRef, bool &IsSimple, break; } - // FIXME: Why are we missing this segment register? - if (Name == "fs") { - Asm += Name; - break; - } - // Lookup the identifier. // TODO: Someone with more experience with clang should verify this the // proper way of doing a symbol lookup. diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index c140d60551..7680e3efa9 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -47,50 +47,44 @@ void t6(void) { // CHECK: call void asm sideeffect "int 0x2c", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect } -void* t7(void) { - __asm mov eax, fs:[0x10] -// CHECK: t7 -// CHECK: call void asm sideeffect "mov eax, fs:[0x10]", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect -} - -void t8() { +void t7() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} -// CHECK: t8 +// CHECK: t7 // CHECK: call void asm sideeffect "int 0x2c", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect } -int t9() { +int t8() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; -// CHECK: t9 +// CHECK: t8 // CHECK: call void asm sideeffect "int 3", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: call void asm sideeffect "int 4", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: ret i32 10 } -void t10() { +void t9() { __asm { push ebx mov ebx, 0x07 pop ebx } -// CHECK: t10 +// CHECK: t9 // CHECK: call void asm sideeffect "push ebx\0Amov ebx, 0x07\0Apop ebx", "~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect } -unsigned t11(void) { +unsigned t10(void) { unsigned i = 1, j; __asm { mov eax, i mov j, eax } return j; -// CHECK: t11 +// CHECK: t10 // CHECK: [[I:%[a-zA-Z0-9]+]] = alloca i32, align 4 // CHECK: [[J:%[a-zA-Z0-9]+]] = alloca i32, align 4 // CHECK: store i32 1, i32* [[I]], align 4 @@ -99,12 +93,12 @@ unsigned t11(void) { // CHECK: ret i32 [[RET]] } -void t12(void) { +void t11(void) { __asm EVEN __asm ALIGN } -void t13(void) { +void t12(void) { __asm { _emit 0x4A _emit 0x43 @@ -112,7 +106,7 @@ void t13(void) { } } -void t14(void) { +void t13(void) { unsigned arr[10]; __asm LENGTH arr ; sizeof(arr)/sizeof(arr[0]) __asm SIZE arr ; sizeof(arr)