aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-17 19:40:41 +0000
committerhpa <hpa>2004-12-17 19:40:41 +0000
commit6c1c1c0f31cda997a0841c76d413fa00bbfde355 (patch)
tree8f4efe2eace17be45eb351fea42978660e6d3685
parent14c52318cda1a548e284a90167446fb8feba5e99 (diff)
downloadsyslinux-6c1c1c0f31cda997a0841c76d413fa00bbfde355.tar.gz
syslinux-6c1c1c0f31cda997a0841c76d413fa00bbfde355.tar.xz
syslinux-6c1c1c0f31cda997a0841c76d413fa00bbfde355.zip
More regparmization
-rw-r--r--com32/lib/sys/exit.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/com32/lib/sys/exit.S b/com32/lib/sys/exit.S
index 76c8b5da..22c9da78 100644
--- a/com32/lib/sys/exit.S
+++ b/com32/lib/sys/exit.S
@@ -6,6 +6,10 @@
.globl _exit
.type _exit, @function
_exit:
+#ifdef REGPARM
+ pushl %eax
+#endif
+
# Run any destructors
movl $__dtors_start, %esi
2:
@@ -16,7 +20,11 @@ _exit:
jmp 2b
1:
+#ifdef REGPARM
+ popl %eax
+#else
movl 4(%esp),%eax # Exit code in %eax = return value
+#endif
movl (__entry_esp),%esp # Return stack pointer to entry value
ret # Return to termination address
.size _exit, .-_exit