summaryrefslogtreecommitdiff
path: root/emu/MacOSX/asm-386.s
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2009-03-25 15:55:14 +0000
committerCharles.Forsyth <devnull@localhost>2009-03-25 15:55:14 +0000
commitdfd1934d5e1ddbeb326f77fc0e52307c801a1a3e (patch)
treef1e8b23278caae95e01d88b00421d6c3642357ef /emu/MacOSX/asm-386.s
parent78dfdcbd59dc8f36975e7695933e3f753957474c (diff)
x20090325-1554
Diffstat (limited to 'emu/MacOSX/asm-386.s')
-rw-r--r--emu/MacOSX/asm-386.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/emu/MacOSX/asm-386.s b/emu/MacOSX/asm-386.s
new file mode 100644
index 00000000..fc903bcb
--- /dev/null
+++ b/emu/MacOSX/asm-386.s
@@ -0,0 +1,28 @@
+/*
+ * these are the same as on the PC (eg, Linux)
+*/
+
+ .globl _FPsave
+_FPsave:
+ pushl %ebp
+ movl %esp, %ebp
+ movl 8(%ebp), %eax
+ fstenv (%eax)
+ popl %ebp
+ ret
+
+ .globl _FPrestore
+_FPrestore:
+ pushl %ebp
+ movl %esp, %ebp
+ movl 8(%ebp), %eax
+ fldenv (%eax)
+ popl %ebp
+ ret
+
+ .globl __tas
+__tas:
+ movl $1, %eax
+ movl 4(%esp), %ecx
+ xchgl %eax, 0(%ecx)
+ ret