about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorVadim Chugunov <vadimcn@gmail.com>2013-08-17 23:35:15 -0700
committerVadim Chugunov <vadimcn@gmail.com>2013-08-22 00:12:43 -0700
commit84e683063b9b25aeeacd25b41cc02bb2159eec4a (patch)
treef2b5f91eb70b782241d914fb364111aa3ddd8597 /src/rt
parent9e7f1fce73e37d8d26ed38cf8b568be67411e0ed (diff)
downloadrust-84e683063b9b25aeeacd25b41cc02bb2159eec4a.tar.gz
rust-84e683063b9b25aeeacd25b41cc02bb2159eec4a.zip
Emit unwind info in rustrt assembly files on Windows.
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/arch/i386/ccall.S10
-rw-r--r--src/rt/arch/i386/morestack.S10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/rt/arch/i386/ccall.S b/src/rt/arch/i386/ccall.S
index e47d51bbdb7..eeee7a4e715 100644
--- a/src/rt/arch/i386/ccall.S
+++ b/src/rt/arch/i386/ccall.S
@@ -12,7 +12,7 @@
 
 	.text
 
-#if defined(__APPLE__) || defined(_WIN32)
+#if defined(__APPLE__) || defined(__WIN32__)
 .globl ___morestack
 ___morestack:
 #else
@@ -21,20 +21,20 @@ ___morestack:
 __morestack:
 #endif
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_startproc
 #endif
 
 	pushl %ebp
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_def_cfa_offset 8
 	.cfi_offset %ebp, -8
 #endif
 
 	movl %esp,%ebp          // save esp
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_def_cfa_register %ebp
 #endif
 
@@ -47,6 +47,6 @@ __morestack:
 
 	ret
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_endproc
 #endif
diff --git a/src/rt/arch/i386/morestack.S b/src/rt/arch/i386/morestack.S
index a95e183a1d1..9598f14579f 100644
--- a/src/rt/arch/i386/morestack.S
+++ b/src/rt/arch/i386/morestack.S
@@ -97,7 +97,7 @@
 #endif
 .globl MORESTACK
 
-// FIXME: What about _WIN32?
+// FIXME: What about __WIN32__?
 #if defined(__linux__) || defined(__FreeBSD__)
 	.hidden MORESTACK
 #else
@@ -111,7 +111,7 @@
 #endif
 
 MORESTACK:
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_startproc
 #endif
 
@@ -130,7 +130,7 @@ MORESTACK:
 	// __morestack, and an extra return address.
 
 	pushl %ebp
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	// The CFA is 20 bytes above the register that it is
 	// associated with for this frame (which will be %ebp)
 	.cfi_def_cfa_offset 20
@@ -138,7 +138,7 @@ MORESTACK:
 	.cfi_offset %ebp, -20
 #endif
 	movl %esp, %ebp
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	// Calculate the CFA as an offset from %ebp
 	.cfi_def_cfa_register %ebp
 #endif
@@ -232,7 +232,7 @@ MORESTACK:
 
 	jmpl *%eax
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__WIN32__)
 	.cfi_endproc
 #endif