Imports #
"cmd/internal/obj"
"cmd/internal/objabi"
"cmd/internal/sys"
"fmt"
"log"
"slices"
"cmd/internal/obj"
"fmt"
"cmd/internal/obj"
"cmd/internal/sys"
"encoding/binary"
"fmt"
"internal/abi"
"log"
"math"
"cmd/internal/obj"
"cmd/internal/obj"
"cmd/internal/obj"
"cmd/internal/objabi"
"cmd/internal/sys"
"fmt"
"log"
"slices"
"cmd/internal/obj"
"fmt"
"cmd/internal/obj"
"cmd/internal/sys"
"encoding/binary"
"fmt"
"internal/abi"
"log"
"math"
"cmd/internal/obj"
"cmd/internal/obj"
const AABSD = *ast.BinaryExprconst AABSFconst AABSWconst AADDconst AADDDconst AADDFconst AADDUconst AADDVconst AADDVUconst AADDWconst AANDconst ABEQconst ABFPFconst ABFPTconst ABGEZconst ABGEZALconst ABGTZconst ABLEZconst ABLTZconst ABLTZALconst ABNEconst ABREAKconst ACLOconst ACLZconst ACMOVFconst ACMOVNconst ACMOVTconst ACMOVZconst ACMPEQDconst ACMPEQFconst ACMPGEDconst ACMPGEFconst ACMPGTDconst ACMPGTFconst ADIVconst ADIVDconst ADIVFconst ADIVUconst ADIVVconst ADIVVUconst ADIVWconst ADSBHconst ADSHDconst AGOKconst AJAL = obj.ACALLaliases
const AJMP = obj.AJMPconst ALASTconst ALLconst ALLVconst ALUIconst AMADDconst AMOVBconst AMOVBUconst AMOVDconst AMOVDFconst AMOVDVconst AMOVDWconst AMOVFconst AMOVFDconst AMOVFVconst AMOVFWconst AMOVHconst AMOVHU64-bit
const AMOVVconst AMOVVDconst AMOVVFconst AMOVVLconst AMOVVRconst AMOVWconst AMOVWDconst AMOVWFconst AMOVWLconst AMOVWRconst AMOVWUconst AMSUBconst AMULconst AMULDconst AMULFconst AMULUconst AMULVconst AMULVUconst AMULWconst ANEGDconst ANEGFconst ANEGVconst ANEGWconst ANOOPconst ANORconst ANYMEM = *ast.BinaryExprconst AORconst AREMconst AREMUconst AREMVconst AREMVUconst ARET = obj.ARETconst ARFEconst AROTRconst AROTRVconst ASCconst ASCVconst ASEBconst ASEHconst ASGTconst ASGTUconst ASLLconst ASLLVconst ASQRTDconst ASQRTFconst ASRAconst ASRAVconst ASRLconst ASRLVconst ASUBconst ASUBDconst ASUBFconst ASUBUconst ASUBVconst ASUBVUconst ASUBWconst ASYNCconst ASYSCALLconst ATEQconst ATLBPconst ATLBRconst ATLBWIconst ATLBWRconst ATNEconst ATRUNCDVconst ATRUNCDW64-bit FP
const ATRUNCFVconst ATRUNCFWMSA
const AVMOVBconst AVMOVDconst AVMOVHconst AVMOVWconst AWORDconst AWSBHconst AXORvar Anames = []string{...}const BIG = 32766const BRANCH = *ast.BinaryExprgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADD0CONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADDCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADDRgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_AND0CONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ANDCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_DACONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_DCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_FCREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_FREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_GOKgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_HIgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LACONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LAUTOgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LBRAgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LECONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LEXTgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LOgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LOREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_MREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_NCLASSgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_NONE = iotago:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_REGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SACONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SAUTOgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SBRAgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SECONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SEXTgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SOREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_STCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_TEXTSIZEgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_TLSgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_UCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_WREGgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ZCONgo:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ZOREGDELAY = LOAD|BRANCH|FCMP
const DELAY = BRANCHconst E_FCR = *ast.BinaryExprconst E_HILO = *ast.BinaryExprconst E_MCR = *ast.BinaryExprconst E_MEM = *ast.BinaryExprconst E_MEMSB = *ast.BinaryExprconst E_MEMSP = *ast.BinaryExprconst FCMP = *ast.BinaryExprmark flags
const FOLL = *ast.BinaryExprconst FREGRET = REG_F0const LABEL = *ast.BinaryExprconst LEAF = *ast.BinaryExprconst LOAD = *ast.BinaryExprvar Linkmips = obj.LinkArch{...}var Linkmips64 = obj.LinkArch{...}var Linkmips64le = obj.LinkArch{...}var Linkmipsle = obj.LinkArch{...}https://llvm.org/svn/llvm-project/llvm/trunk/lib/Target/Mips/MipsRegisterInfo.td search for DwarfRegNum https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/mips/mips.c?view=co&revision=258099&content-type=text%2Fplain search for mips_dwarf_regno For now, this is adequate for both 32 and 64 bit.
var MIPSDWARFRegisters = map[int16]int16{...}* mips 64
const NFREG = 32const NOSCHED = *ast.BinaryExprOptab.flag
const NOTUSETMP = *ast.BinaryExpr* mips 64
const NREG = 32const NSCHED = 20* mips 64
const NSNAME = 8* mips 64
const NSYM = 50* mips 64
const NWREG = 32const REGARG = *ast.UnaryExprconst REGCTXT = REG_R22const REGG = REG_R30const REGLINK = REG_R31const REGRET = REG_R1const REGRT1 = REG_R1const REGRT2 = REG_R2const REGSB = REG_R28const REGSP = REG_R29const REGTMP = REG_R23const REGZERO = REG_R0const REG_F0const REG_F1const REG_F10const REG_F11const REG_F12const REG_F13const REG_F14const REG_F15const REG_F16const REG_F17const REG_F18const REG_F19const REG_F2const REG_F20const REG_F21const REG_F22const REG_F23const REG_F24const REG_F25const REG_F26const REG_F27const REG_F28const REG_F29const REG_F3const REG_F30const REG_F31const REG_F4const REG_F5const REG_F6const REG_F7const REG_F8const REG_F9FPU control registers
const REG_FCR0const REG_FCR1const REG_FCR10const REG_FCR11const REG_FCR12const REG_FCR13const REG_FCR14const REG_FCR15const REG_FCR16const REG_FCR17const REG_FCR18const REG_FCR19const REG_FCR2const REG_FCR20const REG_FCR21const REG_FCR22const REG_FCR23const REG_FCR24const REG_FCR25const REG_FCR26const REG_FCR27const REG_FCR28const REG_FCR29const REG_FCR3const REG_FCR30const REG_FCR31const REG_FCR4const REG_FCR5const REG_FCR6const REG_FCR7const REG_FCR8const REG_FCR9const REG_HIconst REG_LAST = REG_LOconst REG_LOco-processor 0 control registers
const REG_M0const REG_M1const REG_M10const REG_M11const REG_M12const REG_M13const REG_M14const REG_M15const REG_M16const REG_M17const REG_M18const REG_M19const REG_M2const REG_M20const REG_M21const REG_M22const REG_M23const REG_M24const REG_M25const REG_M26const REG_M27const REG_M28const REG_M29const REG_M3const REG_M30const REG_M31const REG_M4const REG_M5const REG_M6const REG_M7const REG_M8const REG_M9const REG_R0 = *ast.BinaryExprconst REG_R1const REG_R10const REG_R11const REG_R12const REG_R13const REG_R14const REG_R15const REG_R16const REG_R17const REG_R18const REG_R19const REG_R2const REG_R20const REG_R21const REG_R22const REG_R23const REG_R24const REG_R25const REG_R26const REG_R27const REG_R28const REG_R29const REG_R3const REG_R30const REG_R31const REG_R4const REG_R5const REG_R6const REG_R7const REG_R8const REG_R9const REG_SPECIAL = REG_M0MSA registers The lower bits of W registers are alias to F registers
const REG_W0const REG_W1const REG_W10const REG_W11const REG_W12const REG_W13const REG_W14const REG_W15const REG_W16const REG_W17const REG_W18const REG_W19const REG_W2const REG_W20const REG_W21const REG_W22const REG_W23const REG_W24const REG_W25const REG_W26const REG_W27const REG_W28const REG_W29const REG_W3const REG_W30const REG_W31const REG_W4const REG_W5const REG_W6const REG_W7const REG_W8const REG_W9const SYNC = *ast.BinaryExprThis order should be strictly consistent to that in a.out.go.
var cnames0 = []string{...}const mips64FuncAlign = 8var oprange [*ast.BinaryExpr][]Optabvar optab = []Optab{...}const r0iszero = 1var xcmp [C_NCLASS][C_NCLASS]booltype Dep struct {
ireg uint32
freg uint32
cc uint32
}type Optab struct {
as obj.As
a1 uint8
a2 uint8
a3 uint8
type_ int8
size int8
param int16
family sys.ArchFamily
flag uint8
}type Sch struct {
p obj.Prog
set Dep
used Dep
soffset int32
size uint8
nop uint8
comp bool
}ctxt0 holds state while assembling a single function. Each function gets a fresh ctxt0. This allows for multiple functions to be safely concurrently assembled.
type ctxt0 struct {
ctxt *obj.Link
newprog obj.ProgAlloc
cursym *obj.LSym
autosize int32
instoffset int64
pc int64
}func BCOND(x uint32, y uint32) uint32func DRconv(a int) stringfunc FPD(x uint32, y uint32) uint32func FPF(x uint32, y uint32) uint32func FPV(x uint32, y uint32) uint32func FPW(x uint32, y uint32) uint32func MMU(x uint32, y uint32) uint32func OP(x uint32, y uint32) uint32func OP_FRRR(op uint32, r1 int16, r2 int16, r3 int16) uint32func OP_IRR(op uint32, i uint32, r2 int16, r3 int16) uint32func OP_JMP(op uint32, i uint32) uint32func OP_RRR(op uint32, r1 int16, r2 int16, r3 int16) uint32func OP_SRR(op uint32, s uint32, r2 int16, r3 int16) uint32func OP_VI10(op uint32, df uint32, s10 int32, wd uint32, minor uint32) uint32func OP_VMI10(s10 int32, rs uint32, wd uint32, minor uint32, df uint32) uint32func SP(x uint32, y uint32) uint32func (c *ctxt0) aclass(a *obj.Addr) intfunc (c *ctxt0) addnop(p *obj.Prog)func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32)func buildop(ctxt *obj.Link)func cmp(a int, b int) boolfunc (c *ctxt0) compound(p *obj.Prog) bool* test 2 adjacent instructions * and find out if inserted instructions * are desired to prevent stalls.
func conflict(sa *Sch, sb *Sch) bool* test to see if two instructions can be * interchanged without changing semantics
func (c *ctxt0) depend(sa *Sch, sb *Sch) boolfunc init()func init()func init()isRestartable returns whether p is a multi-instruction sequence that, if preempted, can be restarted.
func (c *ctxt0) isRestartable(p *obj.Prog) boolisUnsafePoint returns whether p is an unsafe point.
func (c *ctxt0) isUnsafePoint(p *obj.Prog) boolfunc isint32(v int64) boolfunc isuint32(v uint64) boolMSA Load/Store offset have to be multiple of size of data format
func (c *ctxt0) lsoffset(a obj.As, o int32) int32func (c *ctxt0) markregused(s *Sch)func ocmp(p1 Optab, p2 Optab) intfunc offoverlap(sa *Sch, sb *Sch) boolfunc (c *ctxt0) opirr(a obj.As) uint32func (c *ctxt0) oplook(p *obj.Prog) *Optabfunc (c *ctxt0) oprrr(a obj.As) uint32func opset(a obj.As, b0 obj.As)func prasm(p *obj.Prog)func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc)func progedit(ctxt *obj.Link, p *obj.Prog, newprog obj.ProgAlloc)func rconv(r int) stringfunc (c *ctxt0) regoff(a *obj.Addr) int32func (c *ctxt0) sched(p0 *obj.Prog, pe *obj.Prog)func span0(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc)func (c *ctxt0) stacksplit(p *obj.Prog, framesize int32) *obj.ProgMSA Two-bit Data Format Field Encoding
func (c *ctxt0) twobitdf(a obj.As) uint32func (c *ctxt0) vregoff(a *obj.Addr) int64func vshift(a obj.As) boolGenerated with Arrow