aboutsummaryrefslogtreecommitdiff
path: root/win32/lib/chkstk.S
diff options
context:
space:
mode:
authorbellard <bellard>2005-04-17 13:10:37 +0000
committerbellard <bellard>2005-04-17 13:10:37 +0000
commit5556cf15656ad1e433ec20502411411e30a4cdc7 (patch)
tree2105947a5bdaefd49ef9db9af5080498ef04ef42 /win32/lib/chkstk.S
parent6144d433211b4c5ceb68d6ffa500d6d54c3a2d67 (diff)
downloadtinycc-5556cf15656ad1e433ec20502411411e30a4cdc7.tar.gz
tinycc-5556cf15656ad1e433ec20502411411e30a4cdc7.tar.bz2
dos2unix
Diffstat (limited to 'win32/lib/chkstk.S')
-rw-r--r--win32/lib/chkstk.S58
1 files changed, 29 insertions, 29 deletions
diff --git a/win32/lib/chkstk.S b/win32/lib/chkstk.S
index 8e16d74..837d8af 100644
--- a/win32/lib/chkstk.S
+++ b/win32/lib/chkstk.S
@@ -1,29 +1,29 @@
-// =================================================
-// chkstk.s
-
-.text
-.globl __chkstk
-
-__chkstk:
- xchg (%esp), %ebp // store ebp, get ret.addr
- push %ebp // push ret.addr
- lea 4(%esp), %ebp // setup frame ptr
- push %ecx // save ecx
- mov %ebp, %ecx
-P0:
- sub $4096,%ecx
- test %eax,(%ecx)
- sub $4096,%eax
- cmp $4096,%eax
- jge P0
-
- sub %eax,%ecx
- mov %esp,%eax
- test %eax,(%ecx)
- mov %ecx,%esp
-
- mov (%eax),%ecx // restore ecx
- mov 4(%eax),%eax
- push %eax
- ret
-
+// =================================================
+// chkstk.s
+
+.text
+.globl __chkstk
+
+__chkstk:
+ xchg (%esp), %ebp // store ebp, get ret.addr
+ push %ebp // push ret.addr
+ lea 4(%esp), %ebp // setup frame ptr
+ push %ecx // save ecx
+ mov %ebp, %ecx
+P0:
+ sub $4096,%ecx
+ test %eax,(%ecx)
+ sub $4096,%eax
+ cmp $4096,%eax
+ jge P0
+
+ sub %eax,%ecx
+ mov %esp,%eax
+ test %eax,(%ecx)
+ mov %ecx,%esp
+
+ mov (%eax),%ecx // restore ecx
+ mov 4(%eax),%eax
+ push %eax
+ ret
+