Mac OS assembler compatibility.

I haven't bothered changing the ARM code because we don't need to build
that with Mac OS' assembler.

Change-Id: I2f7465de86d6ee5d767be409d8ea20731c91a8a1
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 7d47e1f..33a4fb0 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -189,8 +189,7 @@
 	src/runtime_support.cc \
 	src/utf.cc \
 	src/utils.cc \
-	src/zip_archive.cc \
-	src/runtime_support_asm.S
+	src/zip_archive.cc
 
 LIBART_TARGET_SRC_FILES := \
 	$(LIBART_COMMON_SRC_FILES) \
@@ -199,7 +198,8 @@
 	src/monitor_android.cc \
 	src/runtime_android.cc \
 	src/thread_android.cc \
-	src/thread_arm.cc
+	src/thread_arm.cc \
+	src/runtime_support_arm.S
 
 LIBART_HOST_SRC_FILES := \
 	$(LIBART_COMMON_SRC_FILES) \
@@ -207,7 +207,8 @@
 	src/monitor_linux.cc \
 	src/runtime_linux.cc \
 	src/thread_linux.cc \
-	src/thread_x86.cc
+	src/thread_x86.cc \
+	src/runtime_support_x86.S
 
 LIBARTTEST_COMMON_SRC_FILES := \
 	src/base64.cc \
diff --git a/src/runtime_support_asm.S b/src/runtime_support_arm.S
similarity index 96%
rename from src/runtime_support_asm.S
rename to src/runtime_support_arm.S
index 305e732..38337a3 100644
--- a/src/runtime_support_asm.S
+++ b/src/runtime_support_arm.S
@@ -1,7 +1,5 @@
 #include "asm_support.h"
 
-#if defined(__arm__)
-
     .balign 4
 
     /* Deliver the given exception */
@@ -652,39 +650,3 @@
     movpl   r0, r1, lsr ip              @  if r2 >= 32, r0<-r1 >>> (r2-32)
     mov     r1, r1, lsr r2              @  r1<- r1 >>> r2
     bx      lr
-
-#endif
-
-#if defined(__i386__)
-
-    .global art_deliver_exception_from_code
-    .extern artDeliverExceptionFromCode
-    /*
-     * Called by managed code, saves callee saves and then calls artThrowException
-     * that will place a mock Method* at the bottom of the stack.
-     * EAX holds the exception.
-     */
-art_deliver_exception_from_code:
-    // Create frame
-    pushl %edi  // Save callee saves
-    pushl %esi
-    pushl %ebp
-    pushl %ebx
-    pushl $0
-    pushl $0
-    pushl $0   // Will be clobbered to be Method*
-    mov %esp, %ecx
-    // Outgoing argument set up
-    pushl $0  // Alignment padding
-    pushl %ecx                        // pass SP
-    pushl %fs:THREAD_SELF_OFFSET      // pass fs:offsetof(Thread,self_)
-    pushl %eax                        // pass Throwable*
-    call artDeliverExceptionFromCode  // artDeliverExceptionFromCode(Throwable*, Thread*, SP)
-    int3
-
-    // TODO
-    .global art_proxy_invoke_handler
-art_proxy_invoke_handler:
-    int3
-
-#endif
diff --git a/src/runtime_support_x86.S b/src/runtime_support_x86.S
new file mode 100644
index 0000000..cd2625d
--- /dev/null
+++ b/src/runtime_support_x86.S
@@ -0,0 +1,30 @@
+#include "asm_support.h"
+
+    .globl art_deliver_exception_from_code
+    /*
+     * Called by managed code, saves callee saves and then calls artThrowException
+     * that will place a mock Method* at the bottom of the stack.
+     * EAX holds the exception.
+     */
+art_deliver_exception_from_code:
+    // Create frame
+    pushl %edi  // Save callee saves
+    pushl %esi
+    pushl %ebp
+    pushl %ebx
+    pushl $0
+    pushl $0
+    pushl $0   // Will be clobbered to be Method*
+    mov %esp, %ecx
+    // Outgoing argument set up
+    pushl $0  // Alignment padding
+    pushl %ecx                        // pass SP
+    pushl %fs:THREAD_SELF_OFFSET      // pass fs:offsetof(Thread,self_)
+    pushl %eax                        // pass Throwable*
+    call artDeliverExceptionFromCode  // artDeliverExceptionFromCode(Throwable*, Thread*, SP)
+    int3
+
+    // TODO
+    .globl art_proxy_invoke_handler
+art_proxy_invoke_handler:
+    int3