[cfe-commits] r162288 - in /cfe/trunk: lib/Sema/SemaStmtAsm.cpp test/CodeGen/ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Tue Aug 21 10:01:26 PDT 2012


Author: mcrosier
Date: Tue Aug 21 12:01:26 2012
New Revision: 162288

URL: http://llvm.org/viewvc/llvm-project?rev=162288&view=rev
Log:
[ms-inline asm] Remove this test case and the associated special case code.

Modified:
    cfe/trunk/lib/Sema/SemaStmtAsm.cpp
    cfe/trunk/test/CodeGen/ms-inline-asm.c

Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAsm.cpp?rev=162288&r1=162287&r2=162288&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAsm.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAsm.cpp Tue Aug 21 12:01:26 2012
@@ -421,12 +421,6 @@
         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.

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=162288&r1=162287&r2=162288&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Tue Aug 21 12:01:26 2012
@@ -47,50 +47,44 @@
 // 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 @@
 // 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 t14(void) {
+void t13(void) {
   unsigned arr[10];
   __asm LENGTH arr ; sizeof(arr)/sizeof(arr[0])
   __asm SIZE arr   ; sizeof(arr)





More information about the cfe-commits mailing list