summaryrefslogtreecommitdiff
path: root/emu/Plan9/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/Plan9/asm-386.s
parent54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff)
20060303a
Diffstat (limited to 'emu/Plan9/asm-386.s')
-rw-r--r--emu/Plan9/asm-386.s33
1 files changed, 33 insertions, 0 deletions
diff --git a/emu/Plan9/asm-386.s b/emu/Plan9/asm-386.s
new file mode 100644
index 00000000..b8193f71
--- /dev/null
+++ b/emu/Plan9/asm-386.s
@@ -0,0 +1,33 @@
+
+TEXT tramp(SB),$0
+ MOVL nsp+0(FP), BX /* new stack */
+ MOVL fn+4(FP), CX /* func to exec */
+ MOVL arg+8(FP),DX
+
+ LEAL -8(BX), SP /* new stack */
+ PUSHL DX
+ CALL *CX
+ POPL AX
+
+ PUSHL $0
+ CALL _exits(SB)
+ POPL AX
+ RET
+
+TEXT vstack(SB),$0
+ MOVL arg+0(FP), AX
+ MOVL ustack(SB), SP
+ PUSHL AX
+ CALL exectramp(SB)
+ POPL AX /* dammit ken! */
+ RET
+
+TEXT FPsave(SB), 1, $0
+ MOVL fpu+0(FP), AX
+ FSTENV 0(AX)
+ RET
+
+TEXT FPrestore(SB), 1, $0
+ MOVL fpu+0(FP), AX
+ FLDENV 0(AX)
+ RET