summaryrefslogtreecommitdiff
path: root/emu/Unixware/asm-386.s
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
commit37da2899f40661e3e9631e497da8dc59b971cbd0 (patch)
treecbc6d4680e347d906f5fa7fca73214418741df72 /emu/Unixware/asm-386.s
parent54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff)
20060303a
Diffstat (limited to 'emu/Unixware/asm-386.s')
-rw-r--r--emu/Unixware/asm-386.s71
1 files changed, 71 insertions, 0 deletions
diff --git a/emu/Unixware/asm-386.s b/emu/Unixware/asm-386.s
new file mode 100644
index 00000000..e3978dd1
--- /dev/null
+++ b/emu/Unixware/asm-386.s
@@ -0,0 +1,71 @@
+ .section .bss
+ .align 4
+.L4_.bss:
+ .align 4
+Unixware_Asm_IntP: / Offset 0
+ .type Unixware_Asm_IntP,@object
+ .size Unixware_Asm_IntP,4
+ .set .,.+4
+Unixware_Asm_VoidP: / Offset 4
+ .type Unixware_Asm_VoidP,@object
+ .size Unixware_Asm_VoidP,4
+ .set .,.+4
+ .section .text
+ .align 4
+.L1_.text:
+/====================
+/ FPsave
+/--------------------
+ .align 4
+ .align 4
+ .globl FPsave
+FPsave:
+ pushl %ebp
+ movl %esp,%ebp
+ movl 8(%ebp),%eax
+ movl %eax,Unixware_Asm_VoidP
+ fstenv (%eax)
+ leave
+ ret
+ .align 4
+ .type FPsave,@function
+ .size FPsave,.-FPsave
+
+/====================
+/ FPrestore
+/--------------------
+ .align 4
+ .globl FPrestore
+FPrestore:
+ pushl %ebp
+ movl %esp,%ebp
+ movl 8(%ebp),%eax
+ movl %eax,Unixware_Asm_VoidP
+ fldenv (%eax)
+ leave
+ ret
+ .align 4
+ .type FPrestore,@function
+ .size FPrestore,.-FPrestore
+
+
+/====================
+/ getcallerpc
+/--------------------
+ .align 4
+ .globl getcallerpc
+getcallerpc:
+ movl 4(%ebp),%eax
+ ret
+ .align 4
+ .type getcallerpc,@function
+ .size getcallerpc,.-getcallerpc
+
+/ test-and-set
+ .align 4
+ .globl _tas
+_tas:
+ movl $1, %eax
+ movl 4(%esp), %ecx
+ xchgl %eax, 0(%ecx)
+ ret