// arithmetic operations on vectors implemented in arith.go.
// func addVV_s(z, x, y *Word, n int) (c Word)
-TEXT big·addVV_s(SB),7,$0
+TEXT ·addVV_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), CX
// func subVV_s(z, x, y *Word, n int) (c Word)
// (same as addVV_s except for SBBL instead of ADCL and label names)
-TEXT big·subVV_s(SB),7,$0
+TEXT ·subVV_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), CX
// func addVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·addVW_s(SB),7,$0
+TEXT ·addVW_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), AX // c = y
// func subVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·subVW_s(SB),7,$0
+TEXT ·subVW_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), AX // c = y
// func mulAddVWW_s(z, x *Word, y, r Word, n int) (c Word)
-TEXT big·mulAddVWW_s(SB),7,$0
+TEXT ·mulAddVWW_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), BP
// func addMulVVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·addMulVVW_s(SB),7,$0
+TEXT ·addMulVVW_s(SB),7,$0
MOVL z+0(FP), DI
MOVL x+4(FP), SI
MOVL y+8(FP), BP
// divWVW_s(z* Word, xn Word, x *Word, y Word, n int) (r Word)
-TEXT big·divWVW_s(SB),7,$0
+TEXT ·divWVW_s(SB),7,$0
MOVL z+0(FP), DI
MOVL xn+4(FP), DX // r = xn
MOVL x+8(FP), SI
// TODO(gri) - experiment with unrolled loops for faster execution
// func addVV_s(z, x, y *Word, n int) (c Word)
-TEXT big·addVV_s(SB),7,$0
+TEXT ·addVV_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), R9
// func subVV_s(z, x, y *Word, n int) (c Word)
// (same as addVV_s except for SBBQ instead of ADCQ and label names)
-TEXT big·subVV_s(SB),7,$0
+TEXT ·subVV_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), R9
// func addVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·addVW_s(SB),7,$0
+TEXT ·addVW_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), AX // c = y
// func subVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·subVW_s(SB),7,$0
+TEXT ·subVW_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), AX // c = y
// func mulAddVWW_s(z, x *Word, y, r Word, n int) (c Word)
-TEXT big·mulAddVWW_s(SB),7,$0
+TEXT ·mulAddVWW_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), R9
// func addMulVVW_s(z, x *Word, y Word, n int) (c Word)
-TEXT big·addMulVVW_s(SB),7,$0
+TEXT ·addMulVVW_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ x+8(FP), R8
MOVQ y+16(FP), R9
// divWVW_s(z* Word, xn Word, x *Word, y Word, n int) (r Word)
-TEXT big·divWVW_s(SB),7,$0
+TEXT ·divWVW_s(SB),7,$0
MOVQ z+0(FP), R10
MOVQ xn+8(FP), DX // r = xn
MOVQ x+16(FP), R8
// arithmetic operations on vectors implemented in arith.go.
// TODO(gri) Implement these routines.
-TEXT big·addVV_s(SB),7,$0
- B big·addVV_g(SB)
+TEXT ·addVV_s(SB),7,$0
+ B ·addVV_g(SB)
-TEXT big·subVV_s(SB),7,$0
- B big·subVV_g(SB)
+TEXT ·subVV_s(SB),7,$0
+ B ·subVV_g(SB)
-TEXT big·addVW_s(SB),7,$0
- B big·addVW_g(SB)
+TEXT ·addVW_s(SB),7,$0
+ B ·addVW_g(SB)
-TEXT big·subVW_s(SB),7,$0
- B big·subVW_g(SB)
+TEXT ·subVW_s(SB),7,$0
+ B ·subVW_g(SB)
-TEXT big·mulAddVWW_s(SB),7,$0
- B big·mulAddVWW_g(SB)
+TEXT ·mulAddVWW_s(SB),7,$0
+ B ·mulAddVWW_g(SB)
-TEXT big·addMulVVW_s(SB),7,$0
- B big·addMulVVW_g(SB)
+TEXT ·addMulVVW_s(SB),7,$0
+ B ·addMulVVW_g(SB)
-TEXT big·divWVW_s(SB),7,$0
- B big·divWVW_g(SB)
+TEXT ·divWVW_s(SB),7,$0
+ B ·divWVW_g(SB)
// func Mul128(x, y uint64) (z1, z0 uint64)
// z1<<64 + z0 = x*y
//
-TEXT bignum·Mul128(SB),7,$0
+TEXT ·Mul128(SB),7,$0
MOVQ a+0(FP), AX
MULQ a+8(FP)
MOVQ DX, a+16(FP)
// func MulAdd128(x, y, c uint64) (z1, z0 uint64)
// z1<<64 + z0 = x*y + c
//
-TEXT bignum·MulAdd128(SB),7,$0
+TEXT ·MulAdd128(SB),7,$0
MOVQ a+0(FP), AX
MULQ a+8(FP)
ADDQ a+16(FP), AX
// func Div128(x1, x0, y uint64) (q, r uint64)
// q = (x1<<64 + x0)/y + r
//
-TEXT bignum·Div128(SB),7,$0
+TEXT ·Div128(SB),7,$0
MOVQ a+0(FP), DX
MOVQ a+8(FP), AX
DIVQ a+16(FP)
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-TEXT bytes·IndexByte(SB),7,$0
+TEXT ·IndexByte(SB),7,$0
MOVL p+0(FP), SI
MOVL len+4(FP), CX
MOVB b+12(FP), AL
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-TEXT bytes·IndexByte(SB),7,$0
+TEXT ·IndexByte(SB),7,$0
MOVQ p+0(FP), SI
MOVL len+8(FP), CX
MOVB b+16(FP), AL
// license that can be found in the LICENSE file.
// no memchr implementation on arm yet
-TEXT bytes·IndexByte(SB),7,$0
- B bytes·indexBytePortable(SB)
+TEXT ·IndexByte(SB),7,$0
+ B ·indexBytePortable(SB)
// license that can be found in the LICENSE file.
// func Asin(x float64) float64
-TEXT math·Asin(SB),7,$0
+TEXT ·Asin(SB),7,$0
FMOVD x+0(FP), F0 // F0=sin(x)
FMOVD F0, F1 // F0=sin(x), F1=sin(x)
FMULD F0, F0 // F0=sin(x)*sin(x), F1=sin(x)
RET
// func Acos(x float64) float64
-TEXT math·Acos(SB),7,$0
+TEXT ·Acos(SB),7,$0
FMOVD x+0(FP), F0 // F0=cos(x)
FMOVD F0, F1 // F0=cos(x), F1=cos(x)
FMULD F0, F0 // F0=cos(x)*cos(x), F1=cos(x)
// license that can be found in the LICENSE file.
// func Atan(x float64) float64
-TEXT math·Atan(SB),7,$0
+TEXT ·Atan(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FLD1 // F0=1, F1=x
FPATAN // F0=atan(F1/F0)
// license that can be found in the LICENSE file.
// func Exp(x float64) float64
-TEXT math·Exp(SB),7,$0
+TEXT ·Exp(SB),7,$0
// test bits for not-finite
MOVL x+4(FP), AX
ANDL $0x7ff00000, AX
// license that can be found in the LICENSE file.
// func Fabs(x float64) float64
-TEXT math·Fabs(SB),7,$0
+TEXT ·Fabs(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FABS // F0=|x|
FMOVDP F0, r+8(FP)
// license that can be found in the LICENSE file.
// func Ceil(x float64) float64
-TEXT math·Ceil(SB),7,$0
+TEXT ·Ceil(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FSTCW -2(SP) // save old Control Word
MOVW -2(SP), AX
RET
// func Floor(x float64) float64
-TEXT math·Floor(SB),7,$0
+TEXT ·Floor(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FSTCW -2(SP) // save old Control Word
MOVW -2(SP), AX
// license that can be found in the LICENSE file.
// func Log(x float64) float64
-TEXT math·Log(SB),7,$0
+TEXT ·Log(SB),7,$0
FLDLN2 // F0=log(2)
FMOVD x+0(FP), F0 // F0=x, F1=log(2)
FYL2X // F0=log(x)=log2(x)*log(2)
RET
// func Log10(x float64) float64
-TEXT math·Log10(SB),7,$0
+TEXT ·Log10(SB),7,$0
FLDLG2 // F0=log10(2)
FMOVD x+0(FP), F0 // F0=x, F1=log10(2)
FYL2X // F0=log10(x)=log2(x)*log10(2)
// license that can be found in the LICENSE file.
// func Cos(x float64) float64
-TEXT math·Cos(SB),7,$0
+TEXT ·Cos(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FCOS // F0=cos(x) if -2**63 < x < 2**63
FSTSW AX // AX=status word
RET
// func Sin(x float64) float64
-TEXT math·Sin(SB),7,$0
+TEXT ·Sin(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FSIN // F0=sin(x) if -2**63 < x < 2**63
FSTSW AX // AX=status word
// license that can be found in the LICENSE file.
// func Sqrt(x float64) float64
-TEXT math·Sqrt(SB),7,$0
+TEXT ·Sqrt(SB),7,$0
FMOVD x+0(FP),F0
FSQRT
FMOVDP F0,r+8(FP)
// license that can be found in the LICENSE file.
// func Sqrt(x float64) float64
-TEXT math·Sqrt(SB),7,$0
+TEXT ·Sqrt(SB),7,$0
MOVSD x+0(FP), X0
SQRTSD X0, X0
MOVSD X0, r+8(FP)
// license that can be found in the LICENSE file.
// func Tan(x float64) float64
-TEXT math·Tan(SB),7,$0
+TEXT ·Tan(SB),7,$0
FMOVD x+0(FP), F0 // F0=x
FPTAN // F0=1, F1=tan(x) if -2**63 < x < 2**63
FSTSW AX // AX=status word
// create a new goroutine to start program
PUSHL $mainstart(SB) // entry
PUSHL $0 // arg size
- CALL runtime·newproc(SB)
+ CALL ·newproc(SB)
POPL AX
POPL AX
*/
// Called during function prolog when more stack is needed.
-TEXT runtime·morestack(SB),7,$0
+TEXT ·morestack(SB),7,$0
// Cannot grow scheduler stack (m->g0).
get_tls(CX)
MOVL m(CX), BX
// Return point when leaving stack.
-TEXT runtime·lessstack(SB), 7, $0
+TEXT ·lessstack(SB), 7, $0
// Save return value in m->cret
get_tls(CX)
MOVL m(CX), BX
SUBL $5, (SP) // return to CALL again
JMP AX // but first run the deferred function
-TEXT runtime·memclr(SB),7,$0
+TEXT ·memclr(SB),7,$0
MOVL 4(SP), DI // arg 1 addr
MOVL 8(SP), CX // arg 2 count
ADDL $3, CX
STOSL
RET
-TEXT runtime·getcallerpc+0(SB),7,$0
+TEXT ·getcallerpc+0(SB),7,$0
MOVL x+0(FP),AX // addr of first arg
MOVL -4(AX),AX // get calling pc
RET
-TEXT runtime·setcallerpc+0(SB),7,$0
+TEXT ·setcallerpc+0(SB),7,$0
MOVL x+0(FP),AX // addr of first arg
MOVL x+4(FP), BX
MOVL BX, -4(AX) // set calling pc
// fn func(arg0, arg1, arg2 *ptr, callerpc uintptr, xxx) yyy,
// arg0, arg1, arg2 *ptr) (func(xxx) yyy)
void
-runtime·closure(int32 siz, byte *fn, byte *arg0)
+·closure(int32 siz, byte *fn, byte *arg0)
{
byte *p, *q, **ret;
int32 i, n;
stk = (Stktop*)g->stackbase;
for(n=0; n<100; n++) {
- if(pc == (uint64)runtime·lessstack) {
+ if(pc == (uint64)·lessstack) {
// printf("--\n");
// pop to earlier stack block
pc = (uintptr)stk->gobuf.pc;
for(i = 0; i < f->args; i++) {
if(i != 0)
prints(", ");
- runtime·printhex(((uint32*)sp)[i]);
+ ·printhex(((uint32*)sp)[i]);
if(i >= 4) {
prints(", ...");
break;
// func caller(n int) (pc uintptr, file string, line int, ok bool)
void
-runtime·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retbool)
+·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retbool)
{
uintptr pc;
byte *sp;
// now unwind n levels
stk = (Stktop*)g->stackbase;
while(n-- > 0) {
- while(pc == (uintptr)runtime·lessstack) {
+ while(pc == (uintptr)·lessstack) {
pc = (uintptr)stk->gobuf.pc;
sp = stk->gobuf.sp;
stk = (Stktop*)stk->stackbase;
}
void
-runtime·uint64div(Vlong n, Vlong d, Vlong q)
+·uint64div(Vlong n, Vlong d, Vlong q)
{
_divvu(&q, n, d);
}
}
void
-runtime·uint64mod(Vlong n, Vlong d, Vlong q)
+·uint64mod(Vlong n, Vlong d, Vlong q)
{
_modvu(&q, n, d);
}
}
void
-runtime·int64div(Vlong n, Vlong d, Vlong q)
+·int64div(Vlong n, Vlong d, Vlong q)
{
_divv(&q, n, d);
}
}
void
-runtime·int64mod(Vlong n, Vlong d, Vlong q)
+·int64mod(Vlong n, Vlong d, Vlong q)
{
_modv(&q, n, d);
}
// create a new goroutine to start program
PUSHQ $mainstart(SB) // entry
PUSHQ $0 // arg size
- CALL runtime·newproc(SB)
+ CALL ·newproc(SB)
POPQ AX
POPQ AX
*/
// Called during function prolog when more stack is needed.
-TEXT runtime·morestack(SB),7,$0
+TEXT ·morestack(SB),7,$0
// Called from f.
// Set m->morebuf to f's caller.
MOVQ 8(SP), AX // f's caller's PC
RET
// Return point when leaving stack.
-TEXT runtime·lessstack(SB), 7, $0
+TEXT ·lessstack(SB), 7, $0
// Save return value in m->cret
MOVQ AX, m_cret(m)
RET
// morestack trampolines
-TEXT runtime·morestack00+0(SB),7,$0
+TEXT ·morestack00+0(SB),7,$0
MOVQ $0, AX
MOVQ AX, m_moreframe(m)
- MOVQ $runtime·morestack+0(SB), AX
+ MOVQ $·morestack+0(SB), AX
JMP AX
-TEXT runtime·morestack01+0(SB),7,$0
+TEXT ·morestack01+0(SB),7,$0
SHLQ $32, AX
MOVQ AX, m_moreframe(m)
- MOVQ $runtime·morestack+0(SB), AX
+ MOVQ $·morestack+0(SB), AX
JMP AX
-TEXT runtime·morestack10+0(SB),7,$0
+TEXT ·morestack10+0(SB),7,$0
MOVLQZX AX, AX
MOVQ AX, m_moreframe(m)
- MOVQ $runtime·morestack+0(SB), AX
+ MOVQ $·morestack+0(SB), AX
JMP AX
-TEXT runtime·morestack11+0(SB),7,$0
+TEXT ·morestack11+0(SB),7,$0
MOVQ AX, m_moreframe(m)
- MOVQ $runtime·morestack+0(SB), AX
+ MOVQ $·morestack+0(SB), AX
JMP AX
// subcases of morestack01
// with const of 8,16,...48
-TEXT runtime·morestack8(SB),7,$0
+TEXT ·morestack8(SB),7,$0
PUSHQ $1
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestack16(SB),7,$0
+TEXT ·morestack16(SB),7,$0
PUSHQ $2
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestack24(SB),7,$0
+TEXT ·morestack24(SB),7,$0
PUSHQ $3
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestack32(SB),7,$0
+TEXT ·morestack32(SB),7,$0
PUSHQ $4
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestack40(SB),7,$0
+TEXT ·morestack40(SB),7,$0
PUSHQ $5
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestack48(SB),7,$0
+TEXT ·morestack48(SB),7,$0
PUSHQ $6
- MOVQ $runtime·morestackx(SB), AX
+ MOVQ $·morestackx(SB), AX
JMP AX
-TEXT runtime·morestackx(SB),7,$0
+TEXT ·morestackx(SB),7,$0
POPQ AX
SHLQ $35, AX
MOVQ AX, m_moreframe(m)
- MOVQ $runtime·morestack(SB), AX
+ MOVQ $·morestack(SB), AX
JMP AX
// bool cas(int32 *val, int32 old, int32 new)
// fn func(arg0, arg1, arg2 *ptr, callerpc uintptr, xxx) yyy,
// arg0, arg1, arg2 *ptr) (func(xxx) yyy)
void
-runtime·closure(int32 siz, byte *fn, byte *arg0)
+·closure(int32 siz, byte *fn, byte *arg0)
{
byte *p, *q, **ret;
int32 i, n;
stk = (Stktop*)g->stackbase;
for(n=0; n<100; n++) {
- if(pc == (uint64)runtime·lessstack) {
+ if(pc == (uint64)·lessstack) {
// pop to earlier stack block
// printf("-- stack jump %p => %p\n", sp, stk->gobuf.sp);
pc = (uintptr)stk->gobuf.pc;
for(i = 0; i < f->args; i++) {
if(i != 0)
prints(", ");
- runtime·printhex(((uint32*)sp)[i]);
+ ·printhex(((uint32*)sp)[i]);
if(i >= 4) {
prints(", ...");
break;
// func caller(n int) (pc uint64, file string, line int, ok bool)
void
-runtime·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbool)
+·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbool)
{
uint64 pc;
byte *sp;
// now unwind n levels
stk = (Stktop*)g->stackbase;
while(n-- > 0) {
- while(pc == (uintptr)runtime·lessstack) {
+ while(pc == (uintptr)·lessstack) {
pc = (uintptr)stk->gobuf.pc;
sp = stk->gobuf.sp;
stk = (Stktop*)stk->stackbase;
MOVW.W R0, -4(R13)
MOVW $0, R0
MOVW.W R0, -4(R13) // push $0 as guard
- BL runtime·newproc(SB)
+ BL ·newproc(SB)
MOVW $12(R13), R13 // pop args and LR
// start this M
// NB. we do not save R0 because the we've forced 5c to pass all arguments
// on the stack.
// using frame size $-4 means do not save LR on stack.
-TEXT runtime·morestack(SB),7,$-4
+TEXT ·morestack(SB),7,$-4
// Cannot grow scheduler stack (m->g0).
MOVW m_g0(m), R4
CMP g, R4
// Return point when leaving stack.
// using frame size $-4 means do not save LR on stack.
-TEXT runtime·lessstack(SB), 7, $-4
+TEXT ·lessstack(SB), 7, $-4
// Save return value in m->cret
MOVW R0, m_cret(m)
MOVW $-4(R1), SP // correct for sp pointing to arg0, past stored lr
B (R0)
-TEXT runtime·memclr(SB),7,$20
+TEXT ·memclr(SB),7,$20
MOVW 0(FP), R0
MOVW $0, R1 // c = 0
MOVW R1, -16(SP)
MOVW -4(SP), g
RET
-TEXT runtime·getcallerpc+0(SB),7,$-4
+TEXT ·getcallerpc+0(SB),7,$-4
MOVW 0(SP), R0
RET
-TEXT runtime·setcallerpc+0(SB),7,$-4
+TEXT ·setcallerpc+0(SB),7,$-4
MOVW x+4(FP), R0
MOVW R0, 0(SP)
RET
#pragma textflag 7
void
-runtime·closure(int32 siz, byte *fn, byte *arg0)
+·closure(int32 siz, byte *fn, byte *arg0)
{
byte *p, *q, **ret;
uint32 *pc;
// for(i = 0; i < f->args; i++) {
// if(i != 0)
// prints(", ");
-// runtime·printhex(((uint32*)sp)[i]);
+// ·printhex(((uint32*)sp)[i]);
// if(i >= 4) {
// prints(", ...");
// break;
// func caller(n int) (pc uintptr, file string, line int, ok bool)
void
-runtime·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retbool)
+·Caller(int32 n, uintptr retpc, String retfile, int32 retline, bool retbool)
{
// uintptr pc;
// byte *sp;
}
void
-runtime·float64toint64(double d, Vlong y)
+·float64toint64(double d, Vlong y)
{
_d2v(&y, d);
}
}
void
-runtime·int64tofloat64(Vlong y, double d)
+·int64tofloat64(Vlong y, double d)
{
d = _v2d(y);
}
}
void
-runtime·uint64div(Vlong n, Vlong d, Vlong q)
+·uint64div(Vlong n, Vlong d, Vlong q)
{
_divvu(&q, n, d);
}
}
void
-runtime·uint64mod(Vlong n, Vlong d, Vlong q)
+·uint64mod(Vlong n, Vlong d, Vlong q)
{
_modvu(&q, n, d);
}
}
void
-runtime·int64div(Vlong n, Vlong d, Vlong q)
+·int64div(Vlong n, Vlong d, Vlong q)
{
_divv(&q, n, d);
}
}
void
-runtime·int64mod(Vlong n, Vlong d, Vlong q)
+·int64mod(Vlong n, Vlong d, Vlong q)
{
_modv(&q, n, d);
}
void *initcgo; /* filled in by dynamic linker when Cgo is available */
int64 ncgocall;
-void runtime·entersyscall(void);
-void runtime·exitsyscall(void);
+void ·entersyscall(void);
+void ·exitsyscall(void);
void
cgocall(void (*fn)(void*), void *arg)
* M to run goroutines while we are in the
* foreign code.
*/
- runtime·entersyscall();
+ ·entersyscall();
runcgo(fn, arg);
- runtime·exitsyscall();
+ ·exitsyscall();
return;
}
void
-runtime·Cgocalls(int64 ret)
+·Cgocalls(int64 ret)
{
ret = ncgocall;
FLUSH(&ret);
if(elem->alg >= nelem(algarray)) {
printf("chan(alg=%d)\n", elem->alg);
- throw("runtime·makechan: unsupported elem type");
+ throw("runtime.makechan: unsupported elem type");
}
c = mal(sizeof(*c));
if(debug) {
prints("makechan: chan=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints("; elemsize=");
- runtime·printint(elem->size);
+ ·printint(elem->size);
prints("; elemalg=");
- runtime·printint(elem->alg);
+ ·printint(elem->alg);
prints("; elemalign=");
- runtime·printint(elem->align);
+ ·printint(elem->align);
prints("; dataqsiz=");
- runtime·printint(c->dataqsiz);
+ ·printint(c->dataqsiz);
prints("\n");
}
// makechan(elemsize uint32, elemalg uint32, hint uint32) (hchan *chan any);
void
-runtime·makechan(Type *elem, uint32 hint, Hchan *ret)
+·makechan(Type *elem, uint32 hint, Hchan *ret)
{
ret = makechan(elem, hint);
FLUSH(&ret);
if(debug) {
prints("chansend: chan=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints("; elem=");
c->elemalg->print(c->elemsize, ep);
prints("\n");
if(debug) {
prints("chanrecv: chan=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints("\n");
}
// chansend1(hchan *chan any, elem any);
void
-runtime·chansend1(Hchan* c, ...)
+·chansend1(Hchan* c, ...)
{
int32 o;
byte *ae;
// chansend2(hchan *chan any, elem any) (pres bool);
void
-runtime·chansend2(Hchan* c, ...)
+·chansend2(Hchan* c, ...)
{
int32 o;
byte *ae, *ap;
// chanrecv1(hchan *chan any) (elem any);
void
-runtime·chanrecv1(Hchan* c, ...)
+·chanrecv1(Hchan* c, ...)
{
int32 o;
byte *ae;
// chanrecv2(hchan *chan any) (elem any, pres bool);
void
-runtime·chanrecv2(Hchan* c, ...)
+·chanrecv2(Hchan* c, ...)
{
int32 o;
byte *ae, *ap;
// newselect(size uint32) (sel *byte);
void
-runtime·newselect(int32 size, ...)
+·newselect(int32 size, ...)
{
int32 n, o;
Select **selp;
*selp = sel;
if(debug) {
prints("newselect s=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" size=");
- runtime·printint(size);
+ ·printint(size);
prints("\n");
}
}
// selectsend(sel *byte, hchan *chan any, elem any) (selected bool);
void
-runtime·selectsend(Select *sel, Hchan *c, ...)
+·selectsend(Select *sel, Hchan *c, ...)
{
int32 i, eo;
Scase *cas;
cas = mal(sizeof *cas + c->elemsize - sizeof(cas->u.elem));
sel->scase[i] = cas;
- cas->pc = runtime·getcallerpc(&sel);
+ cas->pc = ·getcallerpc(&sel);
cas->chan = c;
eo = rnd(sizeof(sel), sizeof(c));
if(debug) {
prints("selectsend s=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" pc=");
- runtime·printpointer(cas->pc);
+ ·printpointer(cas->pc);
prints(" chan=");
- runtime·printpointer(cas->chan);
+ ·printpointer(cas->chan);
prints(" so=");
- runtime·printint(cas->so);
+ ·printint(cas->so);
prints(" send=");
- runtime·printint(cas->send);
+ ·printint(cas->send);
prints("\n");
}
}
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
void
-runtime·selectrecv(Select *sel, Hchan *c, ...)
+·selectrecv(Select *sel, Hchan *c, ...)
{
int32 i, eo;
Scase *cas;
sel->ncase = i+1;
cas = mal(sizeof *cas);
sel->scase[i] = cas;
- cas->pc = runtime·getcallerpc(&sel);
+ cas->pc = ·getcallerpc(&sel);
cas->chan = c;
eo = rnd(sizeof(sel), sizeof(c));
if(debug) {
prints("selectrecv s=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" pc=");
- runtime·printpointer(cas->pc);
+ ·printpointer(cas->pc);
prints(" chan=");
- runtime·printpointer(cas->chan);
+ ·printpointer(cas->chan);
prints(" so=");
- runtime·printint(cas->so);
+ ·printint(cas->so);
prints(" send=");
- runtime·printint(cas->send);
+ ·printint(cas->send);
prints("\n");
}
}
// selectdefaul(sel *byte) (selected bool);
void
-runtime·selectdefault(Select *sel, ...)
+·selectdefault(Select *sel, ...)
{
int32 i;
Scase *cas;
sel->ncase = i+1;
cas = mal(sizeof *cas);
sel->scase[i] = cas;
- cas->pc = runtime·getcallerpc(&sel);
+ cas->pc = ·getcallerpc(&sel);
cas->chan = nil;
cas->so = rnd(sizeof(sel), Structrnd);
if(debug) {
prints("selectdefault s=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" pc=");
- runtime·printpointer(cas->pc);
+ ·printpointer(cas->pc);
prints(" so=");
- runtime·printint(cas->so);
+ ·printint(cas->so);
prints(" send=");
- runtime·printint(cas->send);
+ ·printint(cas->send);
prints("\n");
}
}
// selectgo(sel *byte);
void
-runtime·selectgo(Select *sel)
+·selectgo(Select *sel)
{
uint32 p, o, i, j;
Scase *cas, *dfl;
if(debug) {
prints("selectgo: sel=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints("\n");
}
if(debug) {
prints("wait-return: sel=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" c=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints(" cas=");
- runtime·printpointer(cas);
+ ·printpointer(cas);
prints(" send=");
- runtime·printint(cas->send);
+ ·printint(cas->send);
prints(" o=");
- runtime·printint(o);
+ ·printint(o);
prints("\n");
}
// recv path to wakeup the sender (sg)
if(debug) {
prints("gotr: sel=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" c=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints(" o=");
- runtime·printint(o);
+ ·printint(o);
prints("\n");
}
if(cas->u.elemp != nil)
// send path to wakeup the receiver (sg)
if(debug) {
prints("gots: sel=");
- runtime·printpointer(sel);
+ ·printpointer(sel);
prints(" c=");
- runtime·printpointer(c);
+ ·printpointer(c);
prints(" o=");
- runtime·printint(o);
+ ·printint(o);
prints("\n");
}
if(c->closed & Wclosed)
retc:
selunlock(sel);
- runtime·setcallerpc(&sel, cas->pc);
+ ·setcallerpc(&sel, cas->pc);
as = (byte*)&sel + cas->so;
freesel(sel);
*as = true;
// closechan(sel *byte);
void
-runtime·closechan(Hchan *c)
+·closechan(Hchan *c)
{
SudoG *sg;
G* gp;
void
chanclose(Hchan *c)
{
- runtime·closechan(c);
+ ·closechan(c);
}
bool
// closedchan(sel *byte) bool;
void
-runtime·closedchan(Hchan *c, bool closed)
+·closedchan(Hchan *c, bool closed)
{
closed = chanclosed(c);
FLUSH(&closed);
CALL notok(SB)
RET
-TEXT runtime·mmap(SB),7,$0
+TEXT ·mmap(SB),7,$0
MOVL $197, AX
INT $0x80
JAE 2(PC)
SYSCALL
INT $3 // not reached
-TEXT runtime·mmap(SB),7,$0
+TEXT ·mmap(SB),7,$0
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), SI // arg 2 len
MOVL 20(SP), DX // arg 3 prot
MOVQ BP, (BP)
RET
-TEXT runtime·memclr(SB),7,$0
+TEXT ·memclr(SB),7,$0
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), CX // arg 2 count
ADDL $7, CX
STOSQ
RET
-TEXT runtime·getcallerpc+0(SB),7,$0
+TEXT ·getcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ -8(AX),AX // get calling pc
RET
-TEXT runtime·setcallerpc+0(SB),7,$0
+TEXT ·setcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ x+8(FP), BX
MOVQ BX, -8(AX) // set calling pc
prints("send:\t");
for(i=0; i<h->msgh_size/sizeof(p[0]); i++){
prints(" ");
- runtime·printpointer((void*)p[i]);
+ ·printpointer((void*)p[i]);
if(i%8 == 7)
prints("\n\t");
}
if(ret != 0){
if(DebugMach){
prints("mach_msg error ");
- runtime·printint(ret);
+ ·printint(ret);
prints("\n");
}
return ret;
prints("recv:\t");
for(i=0; i<h->msgh_size/sizeof(p[0]); i++){
prints(" ");
- runtime·printpointer((void*)p[i]);
+ ·printpointer((void*)p[i]);
if(i%8 == 7)
prints("\n\t");
}
if(h->msgh_id != id+Reply){
if(DebugMach){
prints("mach_msg reply id mismatch ");
- runtime·printint(h->msgh_id);
+ ·printint(h->msgh_id);
prints(" != ");
- runtime·printint(id+Reply);
+ ·printint(id+Reply);
prints("\n");
}
return -303; // MIG_REPLY_MISMATCH
&& !(h->msgh_bits & MACH_MSGH_BITS_COMPLEX)){
if(DebugMach){
prints("mig result ");
- runtime·printint(c->code);
+ ·printint(c->code);
prints("\n");
}
return c->code;
if(h->msgh_size != rxsize){
if(DebugMach){
prints("mach_msg reply size mismatch ");
- runtime·printint(h->msgh_size);
+ ·printint(h->msgh_size);
prints(" != ");
- runtime·printint(rxsize);
+ ·printint(rxsize);
prints("\n");
}
return -307; // MIG_ARRAY_TOO_LARGE
MOVL $0xf1, 0xf1
RET
-TEXT runtime·mmap(SB),7,$-4
+TEXT ·mmap(SB),7,$-4
MOVL $477, AX
INT $0x80
JAE 2(PC)
CALL sighandler(SB)
RET
-TEXT runtime·mmap(SB),7,$-8
+TEXT ·mmap(SB),7,$-8
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), SI // arg 2 len
MOVL 20(SP), DX // arg 3 prot
MOVQ BP, (BP)
RET
-TEXT runtime·memclr(SB),7,$-8
+TEXT ·memclr(SB),7,$-8
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), CX // arg 2 count
ADDL $7, CX
STOSQ
RET
-TEXT runtime·getcallerpc+0(SB),7,$0
+TEXT ·getcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ -8(AX),AX // get calling pc
RET
-TEXT runtime·setcallerpc+0(SB),7,$0
+TEXT ·setcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ x+8(FP), BX
MOVQ BX, -8(AX) // set calling pc
if(keyalg >= nelem(algarray) || algarray[keyalg].hash == nohash) {
printf("map(keyalg=%d)\n", keyalg);
- throw("runtime·makemap: unsupported map key type");
+ throw("runtime.makemap: unsupported map key type");
}
if(valalg >= nelem(algarray)) {
printf("map(valalg=%d)\n", valalg);
- throw("runtime·makemap: unsupported map value type");
+ throw("runtime.makemap: unsupported map value type");
}
h = mal(sizeof(*h));
// makemap(key, val *Type, hint uint32) (hmap *map[any]any);
void
-runtime·makemap(Type *key, Type *val, uint32 hint, Hmap *ret)
+·makemap(Type *key, Type *val, uint32 hint, Hmap *ret)
{
ret = makemap(key, val, hint);
FLUSH(&ret);
// mapaccess1(hmap *map[any]any, key any) (val any);
void
-runtime·mapaccess1(Hmap *h, ...)
+·mapaccess1(Hmap *h, ...)
{
byte *ak, *av;
bool pres;
mapaccess(h, ak, av, &pres);
if(!pres)
- throw("runtime·mapaccess1: key not in map");
+ throw("runtime.mapaccess1: key not in map");
if(debug) {
- prints("runtime·mapaccess1: map=");
- runtime·printpointer(h);
+ prints("runtime.mapaccess1: map=");
+ ·printpointer(h);
prints("; key=");
h->keyalg->print(h->keysize, ak);
prints("; val=");
h->valalg->print(h->valsize, av);
prints("; pres=");
- runtime·printbool(pres);
+ ·printbool(pres);
prints("\n");
}
}
// mapaccess2(hmap *map[any]any, key any) (val any, pres bool);
void
-runtime·mapaccess2(Hmap *h, ...)
+·mapaccess2(Hmap *h, ...)
{
byte *ak, *av, *ap;
mapaccess(h, ak, av, ap);
if(debug) {
- prints("runtime·mapaccess2: map=");
- runtime·printpointer(h);
+ prints("runtime.mapaccess2: map=");
+ ·printpointer(h);
prints("; key=");
h->keyalg->print(h->keysize, ak);
prints("; val=");
h->valalg->print(h->valsize, av);
prints("; pres=");
- runtime·printbool(*ap);
+ ·printbool(*ap);
prints("\n");
}
}
if(debug) {
prints("mapassign: map=");
- runtime·printpointer(h);
+ ·printpointer(h);
prints("; key=");
h->keyalg->print(h->keysize, ak);
prints("; val=");
h->valalg->print(h->valsize, av);
prints("; hit=");
- runtime·printint(hit);
+ ·printint(hit);
prints("; res=");
- runtime·printpointer(res);
+ ·printpointer(res);
prints("\n");
}
}
// mapassign1(hmap *map[any]any, key any, val any);
void
-runtime·mapassign1(Hmap *h, ...)
+·mapassign1(Hmap *h, ...)
{
byte *ak, *av;
// mapassign2(hmap *map[any]any, key any, val any, pres bool);
void
-runtime·mapassign2(Hmap *h, ...)
+·mapassign2(Hmap *h, ...)
{
byte *ak, *av, *ap;
if(debug) {
prints("mapassign2: map=");
- runtime·printpointer(h);
+ ·printpointer(h);
prints("; key=");
h->keyalg->print(h->keysize, ak);
prints("\n");
// mapiterinit(hmap *map[any]any, hiter *any);
void
-runtime·mapiterinit(Hmap *h, struct hash_iter *it)
+·mapiterinit(Hmap *h, struct hash_iter *it)
{
if(h == nil) {
it->data = nil;
hash_iter_init(h, it);
it->data = hash_next(it);
if(debug) {
- prints("runtime·mapiterinit: map=");
- runtime·printpointer(h);
+ prints("runtime.mapiterinit: map=");
+ ·printpointer(h);
prints("; iter=");
- runtime·printpointer(it);
+ ·printpointer(it);
prints("; data=");
- runtime·printpointer(it->data);
+ ·printpointer(it->data);
prints("\n");
}
}
struct hash_iter *it;
it = mal(sizeof *it);
- runtime·mapiterinit(h, it);
+ ·mapiterinit(h, it);
return it;
}
// mapiternext(hiter *any);
void
-runtime·mapiternext(struct hash_iter *it)
+·mapiternext(struct hash_iter *it)
{
if(gcwaiting)
gosched();
it->data = hash_next(it);
if(debug) {
- prints("runtime·mapiternext: iter=");
- runtime·printpointer(it);
+ prints("runtime.mapiternext: iter=");
+ ·printpointer(it);
prints("; data=");
- runtime·printpointer(it->data);
+ ·printpointer(it->data);
prints("\n");
}
}
void
mapiternext(struct hash_iter *it)
{
- runtime·mapiternext(it);
+ ·mapiternext(it);
}
// mapiter1(hiter *any) (key any);
void
-runtime·mapiter1(struct hash_iter *it, ...)
+·mapiter1(struct hash_iter *it, ...)
{
Hmap *h;
byte *ak, *res;
res = it->data;
if(res == nil)
- throw("runtime·mapiter2: key:val nil pointer");
+ throw("runtime.mapiter2: key:val nil pointer");
h->keyalg->copy(h->keysize, ak, res);
if(debug) {
prints("mapiter2: iter=");
- runtime·printpointer(it);
+ ·printpointer(it);
prints("; map=");
- runtime·printpointer(h);
+ ·printpointer(h);
prints("\n");
}
}
// mapiter2(hiter *any) (key any, val any);
void
-runtime·mapiter2(struct hash_iter *it, ...)
+·mapiter2(struct hash_iter *it, ...)
{
Hmap *h;
byte *ak, *av, *res;
res = it->data;
if(res == nil)
- throw("runtime·mapiter2: key:val nil pointer");
+ throw("runtime.mapiter2: key:val nil pointer");
h->keyalg->copy(h->keysize, ak, res);
h->valalg->copy(h->valsize, av, res+h->datavo);
if(debug) {
prints("mapiter2: iter=");
- runtime·printpointer(it);
+ ·printpointer(it);
prints("; map=");
- runtime·printpointer(h);
+ ·printpointer(h);
prints("\n");
}
}
#define malloc mal
#define free(a) USED(a)
#define offsetof(s,m) (uint32)(&(((s*)0)->m))
-#define memset(a,b,c) runtime·memclr((byte*)(a), (uint32)(c))
+#define memset(a,b,c) ·memclr((byte*)(a), (uint32)(c))
#define memcpy(a,b,c) mcpy((byte*)(a),(byte*)(b),(uint32)(c))
#define assert(a) if(!(a)) throw("assert")
// ifaceT2I(sigi *byte, sigt *byte, elem any) (ret Iface);
#pragma textflag 7
void
-runtime·ifaceT2I(InterfaceType *inter, Type *t, ...)
+·ifaceT2I(InterfaceType *inter, Type *t, ...)
{
byte *elem;
Iface *ret;
// ifaceT2E(sigt *byte, elem any) (ret Eface);
#pragma textflag 7
void
-runtime·ifaceT2E(Type *t, ...)
+·ifaceT2E(Type *t, ...)
{
byte *elem;
Eface *ret;
// ifaceI2T(sigt *byte, iface any) (ret any);
#pragma textflag 7
void
-runtime·ifaceI2T(Type *t, Iface i, ...)
+·ifaceI2T(Type *t, Iface i, ...)
{
Itab *tab;
byte *ret;
// ifaceI2T2(sigt *byte, i Iface) (ret any, ok bool);
#pragma textflag 7
void
-runtime·ifaceI2T2(Type *t, Iface i, ...)
+·ifaceI2T2(Type *t, Iface i, ...)
{
byte *ret;
bool *ok;
if(i.tab == nil || i.tab->type != t) {
*ok = false;
- runtime·memclr(ret, wid);
+ ·memclr(ret, wid);
return;
}
// ifaceE2T(sigt *byte, e Eface) (ret any);
#pragma textflag 7
void
-runtime·ifaceE2T(Type *t, Eface e, ...)
+·ifaceE2T(Type *t, Eface e, ...)
{
byte *ret;
// ifaceE2T2(sigt *byte, iface any) (ret any, ok bool);
#pragma textflag 7
void
-runtime·ifaceE2T2(Type *t, Eface e, ...)
+·ifaceE2T2(Type *t, Eface e, ...)
{
byte *ret;
bool *ok;
if(t != e.type) {
*ok = false;
- runtime·memclr(ret, wid);
+ ·memclr(ret, wid);
return;
}
// ifaceI2E(sigi *byte, iface any) (ret any);
// TODO(rsc): Move to back end, throw away function.
void
-runtime·ifaceI2E(Iface i, Eface ret)
+·ifaceI2E(Iface i, Eface ret)
{
Itab *tab;
// called only for implicit (no type assertion) conversions.
// converting nil is okay.
void
-runtime·ifaceI2I(InterfaceType *inter, Iface i, Iface ret)
+·ifaceI2I(InterfaceType *inter, Iface i, Iface ret)
{
Itab *tab;
// called only for explicit conversions (with type assertion).
// converting nil is not okay.
void
-runtime·ifaceI2Ix(InterfaceType *inter, Iface i, Iface ret)
+·ifaceI2Ix(InterfaceType *inter, Iface i, Iface ret)
{
Itab *tab;
// ifaceI2I2(sigi *byte, iface any) (ret any, ok bool);
void
-runtime·ifaceI2I2(InterfaceType *inter, Iface i, Iface ret, bool ok)
+·ifaceI2I2(InterfaceType *inter, Iface i, Iface ret, bool ok)
{
Itab *tab;
// ifaceE2I(sigi *byte, iface any) (ret any);
// Called only for explicit conversions (with type assertion).
void
-runtime·ifaceE2I(InterfaceType *inter, Eface e, Iface ret)
+·ifaceE2I(InterfaceType *inter, Eface e, Iface ret)
{
ifaceE2I(inter, e, &ret);
}
// ifaceE2I2(sigi *byte, iface any) (ret any, ok bool);
void
-runtime·ifaceE2I2(InterfaceType *inter, Eface e, Iface ret, bool ok)
+·ifaceE2I2(InterfaceType *inter, Eface e, Iface ret, bool ok)
{
Type *t;
// ifaceeq(i1 any, i2 any) (ret bool);
void
-runtime·ifaceeq(Iface i1, Iface i2, bool ret)
+·ifaceeq(Iface i1, Iface i2, bool ret)
{
ret = ifaceeq(i1, i2);
FLUSH(&ret);
// efaceeq(i1 any, i2 any) (ret bool)
void
-runtime·efaceeq(Eface e1, Eface e2, bool ret)
+·efaceeq(Eface e1, Eface e2, bool ret)
{
ret = efaceeq(e1, e2);
FLUSH(&ret);
// ifacethash(i1 any) (ret uint32);
void
-runtime·ifacethash(Iface i1, uint32 ret)
+·ifacethash(Iface i1, uint32 ret)
{
Itab *tab;
// efacethash(e1 any) (ret uint32)
void
-runtime·efacethash(Eface e1, uint32 ret)
+·efacethash(Eface e1, uint32 ret)
{
Type *t;
}
void
-runtime·printiface(Iface i)
+·printiface(Iface i)
{
printiface(i);
}
void
-runtime·printeface(Eface e)
+·printeface(Eface e)
{
printeface(e);
}
INT $3 // not reached
RET
-TEXT runtime·mmap(SB),7,$0
+TEXT ·mmap(SB),7,$0
MOVL $192, AX // mmap2
MOVL 4(SP), BX
MOVL 8(SP), CX
SYSCALL
RET
-TEXT runtime·write(SB),7,$0-24
+TEXT ·write(SB),7,$0-24
MOVL 8(SP), DI
MOVQ 16(SP), SI
MOVL 24(SP), DX
SYSCALL
INT $3 // not reached
-TEXT runtime·mmap(SB),7,$0-32
+TEXT ·mmap(SB),7,$0-32
MOVQ 8(SP), DI
MOVQ $0, SI
MOVL 16(SP), SI
MOVQ BP, (BP)
RET
-TEXT runtime·memclr(SB),7,$0-16
+TEXT ·memclr(SB),7,$0-16
MOVQ 8(SP), DI // arg 1 addr
MOVL 16(SP), CX // arg 2 count (cannot be zero)
ADDL $7, CX
STOSQ
RET
-TEXT runtime·getcallerpc+0(SB),7,$0
+TEXT ·getcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ -8(AX),AX // get calling pc
RET
-TEXT runtime·setcallerpc+0(SB),7,$0
+TEXT ·setcallerpc+0(SB),7,$0
MOVQ x+0(FP),AX // addr of first arg
MOVQ x+8(FP), BX
MOVQ BX, -8(AX) // set calling pc
MOVW $1003, R1
MOVW R0, (R1) // fail hard
-TEXT runtime·mmap(SB),7,$0
+TEXT ·mmap(SB),7,$0
MOVW 0(FP), R0
MOVW 4(FP), R1
MOVW 8(FP), R2
return;
prints("futexsleep addr=");
- runtime·printpointer(addr);
+ ·printpointer(addr);
prints(" val=");
- runtime·printint(val);
+ ·printint(val);
prints(" returned ");
- runtime·printint(ret);
+ ·printint(ret);
prints("\n");
*(int32*)0x1005 = 0x1005;
}
// safe to loop and call futex again.
prints("futexwakeup addr=");
- runtime·printpointer(addr);
+ ·printpointer(addr);
prints(" returned ");
- runtime·printint(ret);
+ ·printint(ret);
prints("\n");
*(int32*)0x1006 = 0x1006;
}
// TODO(rsc,hectorchu): Switch to m stack before call.
TEXT stdcall(SB),7,$0
- CALL runtime·entersyscall(SB)
+ CALL ·entersyscall(SB)
get_tls(CX)
MOVL m(CX), CX
POPL m_return_address(CX) // save return address
MOVL m_stack_pointer(CX), SP
PUSHL AX
PUSHL m_return_address(CX)
- CALL runtime·exitsyscall(SB)
+ CALL ·exitsyscall(SB)
MOVL 4(SP), AX
RET
TEXT thread_create(SB),7,$0
JMP SYSCALL(thread_create)
-TEXT runtime·mmap(SB),7,$24
+TEXT ·mmap(SB),7,$24
MOVL a1+0(FP), BX
MOVL a2+4(FP), CX // round up to 64 kB boundary; silences nacl warning
ADDL $(64*1024-1), CX
q = p;
p += ask;
- runtime·memclr(q, ask);
+ ·memclr(q, ask);
return q;
}
int8 *goos = "pchw";
-extern void runtime·write(int32 fd, void *v, int32 len, int32 cap); // slice, spelled out
+extern void ·write(int32 fd, void *v, int32 len, int32 cap); // slice, spelled out
int32
write(int32 fd, void *v, int32 len)
{
- runtime·write(fd, v, len, len);
+ ·write(fd, v, len, len);
return len;
}
int32 i;
for(i=0; i<n; i++) {
- runtime·printpointer((byte*)(p[i]>>4));
- runtime·printpointer((byte*)(p[i]&0xf));
+ ·printpointer((byte*)(p[i]>>4));
+ ·printpointer((byte*)(p[i]&0xf));
if((i&15) == 15)
prints("\n");
else
}
switch(*p) {
case 'd':
- runtime·printint(*(int32*)arg);
+ ·printint(*(int32*)arg);
break;
case 'D':
- runtime·printint(*(int64*)arg);
+ ·printint(*(int64*)arg);
break;
case 'x':
- runtime·printhex(*(uint32*)arg);
+ ·printhex(*(uint32*)arg);
break;
case 'X':
- runtime·printhex(*(uint64*)arg);
+ ·printhex(*(uint64*)arg);
break;
case 'p':
- runtime·printpointer(*(void**)arg);
+ ·printpointer(*(void**)arg);
break;
case 's':
prints(*(int8**)arg);
break;
case 'S':
- runtime·printstring(*(String*)arg);
+ ·printstring(*(String*)arg);
break;
}
arg = narg;
void
-runtime·printpc(void *p)
+·printpc(void *p)
{
prints("PC=");
- runtime·printhex((uint64)runtime·getcallerpc(p));
+ ·printhex((uint64)·getcallerpc(p));
}
void
-runtime·printbool(bool v)
+·printbool(bool v)
{
if(v) {
write(fd, (byte*)"true", 4);
}
void
-runtime·printfloat(float64 v)
+·printfloat(float64 v)
{
byte buf[20];
int32 e, s, i, n;
}
void
-runtime·printuint(uint64 v)
+·printuint(uint64 v)
{
byte buf[100];
int32 i;
}
void
-runtime·printint(int64 v)
+·printint(int64 v)
{
if(v < 0) {
write(fd, "-", 1);
v = -v;
}
- runtime·printuint(v);
+ ·printuint(v);
}
void
-runtime·printhex(uint64 v)
+·printhex(uint64 v)
{
static int8 *dig = "0123456789abcdef";
byte buf[100];
}
void
-runtime·printpointer(void *p)
+·printpointer(void *p)
{
- runtime·printhex((uint64)p);
+ ·printhex((uint64)p);
}
void
-runtime·printstring(String v)
+·printstring(String v)
{
extern int32 maxstring;
}
void
-runtime·printsp(void)
+·printsp(void)
{
write(fd, " ", 1);
}
void
-runtime·printnl(void)
+·printnl(void)
{
write(fd, "\n", 1);
}
// This is called only from the go syscall library, not
// from the low-level system calls used by the runtime.
void
-runtime·entersyscall(void)
+·entersyscall(void)
{
lock(&sched);
if(sched.predawn) {
// This is called only from the go syscall library, not
// from the low-level system calls used by the runtime.
void
-runtime·exitsyscall(void)
+·exitsyscall(void)
{
lock(&sched);
if(sched.predawn) {
// Continue as if lessstack had just called m->morepc
// (the PC that decided to grow the stack).
label.sp = sp;
- label.pc = (byte*)runtime·lessstack;
+ label.pc = (byte*)·lessstack;
label.g = m->curg;
gogocall(&label, m->morepc);
*/
#pragma textflag 7
void
-runtime·newproc(int32 siz, byte* fn, byte* arg0)
+·newproc(int32 siz, byte* fn, byte* arg0)
{
byte *stk, *sp;
G *newg;
siz = (siz+7) & ~7;
if(siz > 1024)
- throw("runtime·newproc: too many args");
+ throw("runtime.newproc: too many args");
lock(&sched);
#pragma textflag 7
void
-runtime·deferproc(int32 siz, byte* fn, byte* arg0)
+·deferproc(int32 siz, byte* fn, byte* arg0)
{
Defer *d;
#pragma textflag 7
void
-runtime·deferreturn(uintptr arg0)
+·deferreturn(uintptr arg0)
{
Defer *d;
byte *sp, *fn;
}
void
-runtime·Breakpoint(void)
+·Breakpoint(void)
{
breakpoint();
}
void
-runtime·Goexit(void)
+·Goexit(void)
{
goexit();
}
void
-runtime·Gosched(void)
+·Gosched(void)
{
gosched();
}
void
-runtime·LockOSThread(void)
+·LockOSThread(void)
{
if(sched.predawn)
throw("cannot wire during init");
// delete when scheduler is stronger
void
-runtime·GOMAXPROCS(int32 n)
+·GOMAXPROCS(int32 n)
{
if(n < 1)
n = 1;
}
void
-runtime·UnlockOSThread(void)
+·UnlockOSThread(void)
{
m->lockedg = nil;
g->lockedm = nil;
// for testing of wire, unwire
void
-runtime·mid(uint32 ret)
+·mid(uint32 ret)
{
ret = m->id;
FLUSH(&ret);
}
void
-runtime·panicl(int32 lno)
+·panicl(int32 lno)
{
uint8 *sp;
printf("\npanic PC=%X\n", (uint64)(uintptr)&lno);
sp = (uint8*)&lno;
if(gotraceback()){
- traceback(runtime·getcallerpc(&lno), sp, g);
+ traceback(·getcallerpc(&lno), sp, g);
tracebackothers(g);
}
breakpoint(); // so we can grab it in a debugger
}
void
-runtime·throwindex(void)
+·throwindex(void)
{
throw("index out of range");
}
void
-runtime·throwslice(void)
+·throwslice(void)
{
throw("slice out of range");
}
void
-runtime·throwreturn(void)
+·throwreturn(void)
{
throw("no return at end of a typed function");
}
void
-runtime·throwinit(void)
+·throwinit(void)
{
throw("recursive call during initialization");
}
{
fd = 2;
printf("throw: %s\n", s);
- runtime·panicl(-1);
+ ·panicl(-1);
*(int32*)0 = 0; // not reached
exit(1); // even more not reached
}
v = *(uint64*)a;
break;
}
- runtime·printint(v);
+ ·printint(v);
}
static void
strprint(uint32 s, String *a)
{
USED(s);
- runtime·printstring(*a);
+ ·printstring(*a);
}
static uintptr
interprint(uint32 s, Iface *a)
{
USED(s);
- runtime·printiface(*a);
+ ·printiface(*a);
}
static uint32
nilinterprint(uint32 s, Eface *a)
{
USED(s);
- runtime·printeface(*a);
+ ·printeface(*a);
}
static uint32
void gogo(Gobuf*, uintptr);
void gogocall(Gobuf*, void(*)(void));
uintptr gosave(Gobuf*);
-void runtime·lessstack(void);
+void ·lessstack(void);
void goargs(void);
void FLUSH(void*);
void* getu(void);
void gosched(void);
void goexit(void);
void runcgo(void (*fn)(void*), void*);
-void runtime·entersyscall(void);
-void runtime·exitsyscall(void);
+void ·entersyscall(void);
+void ·exitsyscall(void);
void siginit(void);
bool sigsend(int32 sig);
* UTF-8 characters in identifiers.
*/
#ifndef __GNUC__
-#define runtime_memclr runtime·memclr
-#define runtime_getcallerpc runtime·getcallerpc
-#define runtime_mmap runtime·mmap
-#define runtime_printslice runtime·printslice
-#define runtime_printbool runtime·printbool
-#define runtime_printfloat runtime·printfloat
-#define runtime_printhex runtime·printhex
-#define runtime_printint runtime·printint
-#define runtime_printiface runtime·printiface
-#define runtime_printeface runtime·printeface
-#define runtime_printpc runtime·printpc
-#define runtime_printpointer runtime·printpointer
-#define runtime_printstring runtime·printstring
-#define runtime_printuint runtime·printuint
-#define runtime_setcallerpc runtime·setcallerpc
+#define runtime_memclr ·memclr
+#define runtime_getcallerpc ·getcallerpc
+#define runtime_mmap ·mmap
+#define runtime_printslice ·printslice
+#define runtime_printbool ·printbool
+#define runtime_printfloat ·printfloat
+#define runtime_printhex ·printhex
+#define runtime_printint ·printint
+#define runtime_printiface ·printiface
+#define runtime_printeface ·printeface
+#define runtime_printpc ·printpc
+#define runtime_printpointer ·printpointer
+#define runtime_printstring ·printstring
+#define runtime_printuint ·printuint
+#define runtime_setcallerpc ·setcallerpc
#endif
/*
// Called to receive a bitmask of queued signals.
func Sigrecv() (m uint32) {
- runtime·entersyscall();
+ ·entersyscall();
notesleep(&sig);
- runtime·exitsyscall();
+ ·exitsyscall();
noteclear(&sig);
for(;;) {
m = sig.mask;
// see also unsafe·NewArray
// makeslice(typ *Type, nel int, cap int) (ary []any);
void
-runtime·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret)
+·makeslice(SliceType *t, uint32 nel, uint32 cap, Slice ret)
{
uint64 size;
if(debug) {
printf("makeslice(%S, %d, %d); ret=",
*t->string, nel, cap);
- runtime·printslice(ret);
+ ·printslice(ret);
}
}
throwslice(uint32 lb, uint32 hb, uint32 n)
{
prints("slice[");
- runtime·printint(lb);
+ ·printint(lb);
prints(":");
- runtime·printint(hb);
+ ·printint(hb);
prints("] of [");
- runtime·printint(n);
+ ·printint(n);
prints("] array\n");
throw("array slice");
}
// sliceslice(old []any, lb int, hb int, width int) (ary []any);
void
-runtime·sliceslice(Slice old, uint32 lb, uint32 hb, uint32 width, Slice ret)
+·sliceslice(Slice old, uint32 lb, uint32 hb, uint32 width, Slice ret)
{
if(hb > old.cap || lb > hb) {
if(debug) {
- prints("runtime·sliceslice: old=");
- runtime·printslice(old);
+ prints("runtime.sliceslice: old=");
+ ·printslice(old);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; hb=");
- runtime·printint(hb);
+ ·printint(hb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("\n");
prints("oldarray: nel=");
- runtime·printint(old.len);
+ ·printint(old.len);
prints("; cap=");
- runtime·printint(old.cap);
+ ·printint(old.cap);
prints("\n");
}
throwslice(lb, hb, old.cap);
FLUSH(&ret);
if(debug) {
- prints("runtime·sliceslice: old=");
- runtime·printslice(old);
+ prints("runtime.sliceslice: old=");
+ ·printslice(old);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; hb=");
- runtime·printint(hb);
+ ·printint(hb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("; ret=");
- runtime·printslice(ret);
+ ·printslice(ret);
prints("\n");
}
}
// sliceslice1(old []any, lb int, width int) (ary []any);
void
-runtime·sliceslice1(Slice old, uint32 lb, uint32 width, Slice ret)
+·sliceslice1(Slice old, uint32 lb, uint32 width, Slice ret)
{
if(lb > old.len) {
if(debug) {
- prints("runtime·sliceslice: old=");
- runtime·printslice(old);
+ prints("runtime.sliceslice: old=");
+ ·printslice(old);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("\n");
prints("oldarray: nel=");
- runtime·printint(old.len);
+ ·printint(old.len);
prints("; cap=");
- runtime·printint(old.cap);
+ ·printint(old.cap);
prints("\n");
}
throwslice(lb, old.len, old.cap);
FLUSH(&ret);
if(debug) {
- prints("runtime·sliceslice: old=");
- runtime·printslice(old);
+ prints("runtime.sliceslice: old=");
+ ·printslice(old);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("; ret=");
- runtime·printslice(ret);
+ ·printslice(ret);
prints("\n");
}
}
// slicearray(old *any, nel int, lb int, hb int, width int) (ary []any);
void
-runtime·slicearray(byte* old, uint32 nel, uint32 lb, uint32 hb, uint32 width, Slice ret)
+·slicearray(byte* old, uint32 nel, uint32 lb, uint32 hb, uint32 width, Slice ret)
{
if(nel > 0 && old == nil) {
// crash if old == nil.
if(hb > nel || lb > hb) {
if(debug) {
- prints("runtime·slicearray: old=");
- runtime·printpointer(old);
+ prints("runtime.slicearray: old=");
+ ·printpointer(old);
prints("; nel=");
- runtime·printint(nel);
+ ·printint(nel);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; hb=");
- runtime·printint(hb);
+ ·printint(hb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("\n");
}
throwslice(lb, hb, nel);
FLUSH(&ret);
if(debug) {
- prints("runtime·slicearray: old=");
- runtime·printpointer(old);
+ prints("runtime.slicearray: old=");
+ ·printpointer(old);
prints("; nel=");
- runtime·printint(nel);
+ ·printint(nel);
prints("; lb=");
- runtime·printint(lb);
+ ·printint(lb);
prints("; hb=");
- runtime·printint(hb);
+ ·printint(hb);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("; ret=");
- runtime·printslice(ret);
+ ·printslice(ret);
prints("\n");
}
}
// slicecopy(to any, fr any, wid uint32) int
void
-runtime·slicecopy(Slice to, Slice fm, uintptr width, int32 ret)
+·slicecopy(Slice to, Slice fm, uintptr width, int32 ret)
{
if(fm.array == nil || fm.len == 0 ||
to.array == nil || to.len == 0 ||
if(debug) {
prints("main·copy: to=");
- runtime·printslice(to);
+ ·printslice(to);
prints("; fm=");
- runtime·printslice(fm);
+ ·printslice(fm);
prints("; width=");
- runtime·printint(width);
+ ·printint(width);
prints("; ret=");
- runtime·printint(ret);
+ ·printint(ret);
prints("\n");
}
}
void
-runtime·printslice(Slice a)
+·printslice(Slice a)
{
prints("[");
- runtime·printint(a.len);
+ ·printint(a.len);
prints("/");
- runtime·printint(a.cap);
+ ·printint(a.cap);
prints("]");
- runtime·printpointer(a.array);
+ ·printpointer(a.array);
}
{
prints(s);
prints(" ");
- runtime·printint(a);
+ ·printint(a);
prints("<");
- runtime·printint(b);
+ ·printint(b);
prints(">");
- runtime·printint(c);
+ ·printint(c);
prints("\n");
throw("string bounds");
}
if(lindex < 0 || lindex > si.len ||
hindex < lindex || hindex > si.len) {
- runtime·printpc(&si);
+ ·printpc(&si);
prints(" ");
prbounds("slice", lindex, si.len, hindex);
}
int32 l;
if(lindex < 0 || lindex > si.len) {
- runtime·printpc(&si);
+ ·printpc(&si);
prints(" ");
prbounds("slice", lindex, si.len, si.len);
}
func indexstring(s String, i int32) (b byte) {
if(i < 0 || i >= s.len) {
- runtime·printpc(&s);
+ ·printpc(&s);
prints(" ");
prbounds("index", 0, i, s.len);
}
// return true;
// }else
// return false;
-TEXT sync·cas(SB), 7, $0
+TEXT ·cas(SB), 7, $0
MOVL 4(SP), BX
MOVL 8(SP), AX
MOVL 12(SP), CX
// return true;
// }else
// return false;
-TEXT sync·cas(SB), 7, $0
+TEXT ·cas(SB), 7, $0
MOVQ 8(SP), BX
MOVL 16(SP), AX
MOVL 20(SP), CX
// }else
// return false;
-TEXT sync·cas(SB),7,$0
+TEXT ·cas(SB),7,$0
MOVW 0(FP), R1 // *val
MOVW 4(FP), R2 // old
MOVW 8(FP), R3 // new
// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
// Trap # in AX, args on stack above caller pc.
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
LEAL 8(SP), SI
// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);
// Trap # in AX, args in DI SI DX, return in AX DX
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
// Trap # in AX, args on stack above caller pc.
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVL 4(SP), AX // syscall entry
// slide args down on top of system call number
LEAL 8(SP), SI
// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);
// Trap # in AX, args in DI SI DX, return in AX DX
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
// func Syscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
// Trap # in AX, args in BX CX DX SI DI, return in AX
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
MOVL 8(SP), BX
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
// Actually Syscall5 but the rest of the code expects it to be named Syscall6.
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL 4(SP), AX // syscall entry
MOVL 8(SP), BX
RET
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVL 4(SP), AX // syscall entry
MOVL 8(SP), BX
MOVL 12(SP), CX
// func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int)
// Kernel interface gets call sub-number and pointer to a0.
-TEXT syscall·socketcall(SB),7,$0
+TEXT ·socketcall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL $SYS_SOCKETCALL, AX // syscall entry
MOVL 4(SP), BX // socket call number
// taking the address of the return value newoffset.
// Underlying system call is
// llseek(int fd, int offhi, int offlo, int64 *result, int whence)
-TEXT syscall·Seek(SB),7,$0
+TEXT ·Seek(SB),7,$0
CALL runtime·entersyscall(SB)
MOVL $SYS__LLSEEK, AX // syscall entry
MOVL 4(SP), BX // fd
// Note that this differs from "standard" ABI convention, which
// would pass 4th arg in CX, not R10.
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
CALL runtime·entersyscall(SB)
MOVQ 16(SP), DI
MOVQ 24(SP), SI
CALL runtime·exitsyscall(SB)
RET
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVQ 16(SP), DI
MOVQ 24(SP), SI
MOVQ 32(SP), DX
// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT syscall·Syscall(SB),7,$0
+TEXT ·Syscall(SB),7,$0
BL runtime·entersyscall(SB)
MOVW 4(SP), R7
MOVW 8(SP), R0
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
// Actually Syscall5 but the rest of the code expects it to be named Syscall6.
-TEXT syscall·Syscall6(SB),7,$0
+TEXT ·Syscall6(SB),7,$0
BL runtime·entersyscall(SB)
MOVW 4(SP), R7 // syscall entry
MOVW 8(SP), R0
RET
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT syscall·RawSyscall(SB),7,$0
+TEXT ·RawSyscall(SB),7,$0
MOVW 4(SP), R7 // syscall entry
MOVW 8(SP), R0
MOVW 12(SP), R1
// func Syscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
// Trap # in AX, args in BX CX DX SI DI, return in AX
-TEXT syscall·Syscall(SB),7,$20
+TEXT ·Syscall(SB),7,$20
CALL runtime·entersyscall(SB)
MOVL trap+0(FP), AX // syscall entry
MOVL a1+4(FP), BX
RET
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-TEXT syscall·Syscall6(SB),7,$24
+TEXT ·Syscall6(SB),7,$24
CALL runtime·entersyscall(SB)
MOVL a1+4(FP), BX
MOVL a2+8(FP), CX
RET
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT syscall·RawSyscall(SB),7,$20
+TEXT ·RawSyscall(SB),7,$20
MOVL trap+0(FP), AX // syscall entry
MOVL a1+4(FP), BX
MOVL a2+8(FP), CX