1*6c6e36e1SDavid du Colombier#define NPRIVATES 16 2*6c6e36e1SDavid du Colombier 3*6c6e36e1SDavid du ColombierGLOBL _tos(SB), $8 4*6c6e36e1SDavid du ColombierGLOBL _privates(SB), $8 5*6c6e36e1SDavid du ColombierGLOBL _nprivates(SB), $8 6*6c6e36e1SDavid du Colombier 7*6c6e36e1SDavid du ColombierTEXT _mainp(SB), 1, $(3*4+NPRIVATES*4) 8*6c6e36e1SDavid du Colombier MOVW $setR30(SB), R30 9*6c6e36e1SDavid du Colombier 10*6c6e36e1SDavid du Colombier /* _tos = arg */ 11*6c6e36e1SDavid du Colombier MOVW R1, _tos(SB) 12*6c6e36e1SDavid du Colombier 13*6c6e36e1SDavid du Colombier MOVW $8(SP), R1 14*6c6e36e1SDavid du Colombier MOVW R1, _privates(SB) 15*6c6e36e1SDavid du Colombier MOVW $NPRIVATES, R1 16*6c6e36e1SDavid du Colombier MOVW R1, _nprivates(SB) 17*6c6e36e1SDavid du Colombier 18*6c6e36e1SDavid du Colombier /* _profmain(); */ 19*6c6e36e1SDavid du Colombier JAL _profmain(SB) 20*6c6e36e1SDavid du Colombier 21*6c6e36e1SDavid du Colombier /* _tos->prof.pp = _tos->prof.next; */ 22*6c6e36e1SDavid du Colombier MOVW _tos+0(SB),R1 23*6c6e36e1SDavid du Colombier MOVW 4(R1),R2 24*6c6e36e1SDavid du Colombier MOVW R2,(R1) 25*6c6e36e1SDavid du Colombier 26*6c6e36e1SDavid du Colombier JAL _envsetup(SB) 27*6c6e36e1SDavid du Colombier 28*6c6e36e1SDavid du Colombier /* main(argc, argv, environ); */ 29*6c6e36e1SDavid du Colombier MOVW inargc-4(FP), R1 30*6c6e36e1SDavid du Colombier MOVW $inargv+0(FP), R2 31*6c6e36e1SDavid du Colombier MOVW environ(SB), R3 32*6c6e36e1SDavid du Colombier MOVW R1, 4(R29) 33*6c6e36e1SDavid du Colombier MOVW R2, 8(R29) 34*6c6e36e1SDavid du Colombier MOVW R3, 12(R29) 35*6c6e36e1SDavid du Colombier JAL main(SB) 36*6c6e36e1SDavid du Colombierloop: 37*6c6e36e1SDavid du Colombier MOVW R1, 4(R29) 38*6c6e36e1SDavid du Colombier JAL exit(SB) 39*6c6e36e1SDavid du Colombier MOVW $_profin(SB), R0 /* force loading of profile */ 40*6c6e36e1SDavid du Colombier JMP loop 41*6c6e36e1SDavid du Colombier 42*6c6e36e1SDavid du ColombierTEXT _savearg(SB), 1, $0 43*6c6e36e1SDavid du Colombier RET 44*6c6e36e1SDavid du Colombier 45*6c6e36e1SDavid du ColombierTEXT _callpc(SB), 1, $0 46*6c6e36e1SDavid du Colombier MOVW argp-4(FP), R1 47*6c6e36e1SDavid du Colombier RET 48