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/power/main9.s | |
parent | 3b91c0fcc556960f767b70b59d5eb8f5e7ac00fa (diff) |
ape: initialize _tos and use _tos->pid for getpid()
Diffstat (limited to 'sys/src/ape/lib/ap/power/main9.s')
-rw-r--r-- | sys/src/ape/lib/ap/power/main9.s | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/src/ape/lib/ap/power/main9.s b/sys/src/ape/lib/ap/power/main9.s index ee493f5a8..8323e463e 100644 --- a/sys/src/ape/lib/ap/power/main9.s +++ b/sys/src/ape/lib/ap/power/main9.s @@ -1,8 +1,21 @@ -TEXT _main(SB), 1, $16 +#define NPRIVATES 16 + +GLOBL _tos(SB), $4 +GLOBL _privates(SB), $4 +GLOBL _nprivates(SB), $4 + +TEXT _main(SB), 1, $(3*4+NPRIVATES*4) MOVW $setSB(SB), R2 - BL _envsetup(SB) + /* _tos = arg */ + MOVW R3, _tos(SB) + MOVW $8(SP), R1 + MOVW R1, _privates(SB) + MOVW $NPRIVATES, R1 + MOVW R1, _nprivates(SB) + + BL _envsetup(SB) MOVW inargc-4(FP), R3 MOVW $inargv+0(FP), R4 MOVW R3, 4(R1) |