summaryrefslogtreecommitdiff
path: root/translate/grt/config/chkstk.S
diff options
context:
space:
mode:
Diffstat (limited to 'translate/grt/config/chkstk.S')
-rw-r--r--translate/grt/config/chkstk.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/translate/grt/config/chkstk.S b/translate/grt/config/chkstk.S
new file mode 100644
index 0000000..1f29245
--- /dev/null
+++ b/translate/grt/config/chkstk.S
@@ -0,0 +1,20 @@
+ .file "chkstk.S"
+ .version "01.01"
+
+ .text
+
+ /* Function called to loop on the process. */
+ .align 4
+ .type _chkstk,@function
+ .global _chkstk
+_chkstk:
+ testl %eax,%eax
+ je _chkstk_zero
+ subl $4,%eax /* 4 bytes already used by call. */
+ subl %eax,%esp
+ jmp *(%esp,%eax)
+_chkstk_zero:
+ ret
+ .size _chkstk, . - _chkstk
+
+ .ident "Written by T.Gingold"