summaryrefslogtreecommitdiff
path: root/lang/schemetoc/files/x86.s
diff options
context:
space:
mode:
Diffstat (limited to 'lang/schemetoc/files/x86.s')
-rw-r--r--lang/schemetoc/files/x86.s34
1 files changed, 34 insertions, 0 deletions
diff --git a/lang/schemetoc/files/x86.s b/lang/schemetoc/files/x86.s
new file mode 100644
index 000000000000..1cedbc50ce29
--- /dev/null
+++ b/lang/schemetoc/files/x86.s
@@ -0,0 +1,34 @@
+/*
+ * SCHEME->C
+ *
+ * x86 assembly code.
+ *
+ * This code originally came from the Linux port, so someone else gets
+ * the credit for writing it.
+ *
+ */
+
+#ifdef __i486__
+ .align 4
+#else
+ .align 2
+#endif
+.globl _sc_geti386regs
+
+_sc_geti386regs:
+ pushl %ebp
+ movl %esp,%ebp
+ pushl %ecx
+ movl %eax,%ecx
+ movl 8(%ebp),%eax
+ movl %ecx,(%eax)
+ popl %ecx
+ movl %ecx,4(%eax)
+ movl %edx,8(%eax)
+ movl %ebx,12(%eax)
+ movl %esi,16(%eax)
+ movl %edi,20(%eax)
+ movl %ebp,%esp
+ popl %ebp
+ ret
+