func wrapMain(funcs []*PkgSym) *Func { ret := NewFunc() // the main func // clear r0 for safety ret.AddInst(inst.Reg(arch8.XOR, 0, 0, 0, 0, 0)) for _, f := range funcs { ret.AddInst(inst.Jmp(arch8.JAL, 0)) ret.AddLink(FillLink, f) } ret.AddInst(inst.Sys(arch8.HALT, 0)) return ret }
func (_s) srl(d, s1, v uint32) uint32 { return S.Reg(A.SRL, d, s1, 0, v, 0) }
func (_s) reg(op, d, s1, s2 uint32) uint32 { return S.Reg(op, d, s1, s2, 0, 0) }
func makeInstReg(fn, d, s1, s2, sh, isFloat uint32) *inst { ret := asminst.Reg(fn, d, s1, s2, sh, isFloat) return &inst{inst: ret} }