diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-03 05:22:21 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-03 05:22:21 +0100 |
commit | f3842de5fd405859f0a2de9a6f9fed0311c4629c (patch) | |
tree | 54296a0438016951e0acafddfeabfaa6c513202e /sys/src/ape/lib/ap/386 | |
parent | 3b91c0fcc556960f767b70b59d5eb8f5e7ac00fa (diff) |
ape: initialize _tos and use _tos->pid for getpid()
Diffstat (limited to 'sys/src/ape/lib/ap/386')
-rw-r--r-- | sys/src/ape/lib/ap/386/main9.s | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/src/ape/lib/ap/386/main9.s b/sys/src/ape/lib/ap/386/main9.s index aef0777a4..04ee73dd1 100644 --- a/sys/src/ape/lib/ap/386/main9.s +++ b/sys/src/ape/lib/ap/386/main9.s @@ -1,4 +1,16 @@ - TEXT _main(SB), 1, $12 +#define NPRIVATES 16 + +GLOBL _tos(SB), $4 +GLOBL _privates(SB), $4 +GLOBL _nprivates(SB), $4 + +TEXT _main(SB), 1, $(3*4+NPRIVATES*4) + + /* _tos = arg */ + MOVL AX, _tos(SB) + LEAL 8(SP), AX + MOVL AX, _privates(SB) + MOVL $NPRIVATES, _nprivates(SB) CALL _envsetup(SB) MOVL inargc-4(FP), AX |