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.BinaryExpr
const AABSF
const AABSW
const AADD
const AADDD
const AADDF
const AADDU
const AADDV
const AADDVU
const AADDW
const AAND
const ABEQ
const ABFPF
const ABFPT
const ABGEZ
const ABGEZAL
const ABGTZ
const ABLEZ
const ABLTZ
const ABLTZAL
const ABNE
const ABREAK
const ACLO
const ACLZ
const ACMOVF
const ACMOVN
const ACMOVT
const ACMOVZ
const ACMPEQD
const ACMPEQF
const ACMPGED
const ACMPGEF
const ACMPGTD
const ACMPGTF
const ADIV
const ADIVD
const ADIVF
const ADIVU
const ADIVV
const ADIVVU
const ADIVW
const ADSBH
const ADSHD
const AGOK
const AJAL = obj.ACALL
aliases
const AJMP = obj.AJMP
const ALAST
const ALL
const ALLV
const ALUI
const AMADD
const AMOVB
const AMOVBU
const AMOVD
const AMOVDF
const AMOVDV
const AMOVDW
const AMOVF
const AMOVFD
const AMOVFV
const AMOVFW
const AMOVH
const AMOVHU
64-bit
const AMOVV
const AMOVVD
const AMOVVF
const AMOVVL
const AMOVVR
const AMOVW
const AMOVWD
const AMOVWF
const AMOVWL
const AMOVWR
const AMOVWU
const AMSUB
const AMUL
const AMULD
const AMULF
const AMULU
const AMULV
const AMULVU
const AMULW
const ANEGD
const ANEGF
const ANEGV
const ANEGW
const ANOOP
const ANOR
const ANYMEM = *ast.BinaryExpr
const AOR
const AREM
const AREMU
const AREMV
const AREMVU
const ARET = obj.ARET
const ARFE
const AROTR
const AROTRV
const ASC
const ASCV
const ASEB
const ASEH
const ASGT
const ASGTU
const ASLL
const ASLLV
const ASQRTD
const ASQRTF
const ASRA
const ASRAV
const ASRL
const ASRLV
const ASUB
const ASUBD
const ASUBF
const ASUBU
const ASUBV
const ASUBVU
const ASUBW
const ASYNC
const ASYSCALL
const ATEQ
const ATLBP
const ATLBR
const ATLBWI
const ATLBWR
const ATNE
const ATRUNCDV
const ATRUNCDW
64-bit FP
const ATRUNCFV
const ATRUNCFW
MSA
const AVMOVB
const AVMOVD
const AVMOVH
const AVMOVW
const AWORD
const AWSBH
const AXOR
var Anames = []string{...}
const BIG = 32766
const BRANCH = *ast.BinaryExpr
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADD0CON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADDCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ADDR
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_AND0CON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ANDCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_DACON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_DCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_FCREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_FREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_GOK
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_HI
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LACON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LAUTO
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LBRA
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LECON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LEXT
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LO
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_LOREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_MREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_NCLASS
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_NONE = iota
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_REG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SACON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SAUTO
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SBRA
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SECON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SEXT
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_SOREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_STCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_TEXTSIZE
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_TLS
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_UCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_WREG
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ZCON
go:generate go run ../mkcnames.go -i a.out.go -o anames0.go -p mips
const C_ZOREG
DELAY = LOAD|BRANCH|FCMP
const DELAY = BRANCH
const E_FCR = *ast.BinaryExpr
const E_HILO = *ast.BinaryExpr
const E_MCR = *ast.BinaryExpr
const E_MEM = *ast.BinaryExpr
const E_MEMSB = *ast.BinaryExpr
const E_MEMSP = *ast.BinaryExpr
const FCMP = *ast.BinaryExpr
mark flags
const FOLL = *ast.BinaryExpr
const FREGRET = REG_F0
const LABEL = *ast.BinaryExpr
const LEAF = *ast.BinaryExpr
const LOAD = *ast.BinaryExpr
var 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 = 32
const NOSCHED = *ast.BinaryExpr
Optab.flag
const NOTUSETMP = *ast.BinaryExpr
* mips 64
const NREG = 32
const NSCHED = 20
* mips 64
const NSNAME = 8
* mips 64
const NSYM = 50
* mips 64
const NWREG = 32
const REGARG = *ast.UnaryExpr
const REGCTXT = REG_R22
const REGG = REG_R30
const REGLINK = REG_R31
const REGRET = REG_R1
const REGRT1 = REG_R1
const REGRT2 = REG_R2
const REGSB = REG_R28
const REGSP = REG_R29
const REGTMP = REG_R23
const REGZERO = REG_R0
const REG_F0
const REG_F1
const REG_F10
const REG_F11
const REG_F12
const REG_F13
const REG_F14
const REG_F15
const REG_F16
const REG_F17
const REG_F18
const REG_F19
const REG_F2
const REG_F20
const REG_F21
const REG_F22
const REG_F23
const REG_F24
const REG_F25
const REG_F26
const REG_F27
const REG_F28
const REG_F29
const REG_F3
const REG_F30
const REG_F31
const REG_F4
const REG_F5
const REG_F6
const REG_F7
const REG_F8
const REG_F9
FPU control registers
const REG_FCR0
const REG_FCR1
const REG_FCR10
const REG_FCR11
const REG_FCR12
const REG_FCR13
const REG_FCR14
const REG_FCR15
const REG_FCR16
const REG_FCR17
const REG_FCR18
const REG_FCR19
const REG_FCR2
const REG_FCR20
const REG_FCR21
const REG_FCR22
const REG_FCR23
const REG_FCR24
const REG_FCR25
const REG_FCR26
const REG_FCR27
const REG_FCR28
const REG_FCR29
const REG_FCR3
const REG_FCR30
const REG_FCR31
const REG_FCR4
const REG_FCR5
const REG_FCR6
const REG_FCR7
const REG_FCR8
const REG_FCR9
const REG_HI
const REG_LAST = REG_LO
const REG_LO
co-processor 0 control registers
const REG_M0
const REG_M1
const REG_M10
const REG_M11
const REG_M12
const REG_M13
const REG_M14
const REG_M15
const REG_M16
const REG_M17
const REG_M18
const REG_M19
const REG_M2
const REG_M20
const REG_M21
const REG_M22
const REG_M23
const REG_M24
const REG_M25
const REG_M26
const REG_M27
const REG_M28
const REG_M29
const REG_M3
const REG_M30
const REG_M31
const REG_M4
const REG_M5
const REG_M6
const REG_M7
const REG_M8
const REG_M9
const REG_R0 = *ast.BinaryExpr
const REG_R1
const REG_R10
const REG_R11
const REG_R12
const REG_R13
const REG_R14
const REG_R15
const REG_R16
const REG_R17
const REG_R18
const REG_R19
const REG_R2
const REG_R20
const REG_R21
const REG_R22
const REG_R23
const REG_R24
const REG_R25
const REG_R26
const REG_R27
const REG_R28
const REG_R29
const REG_R3
const REG_R30
const REG_R31
const REG_R4
const REG_R5
const REG_R6
const REG_R7
const REG_R8
const REG_R9
const REG_SPECIAL = REG_M0
MSA registers The lower bits of W registers are alias to F registers
const REG_W0
const REG_W1
const REG_W10
const REG_W11
const REG_W12
const REG_W13
const REG_W14
const REG_W15
const REG_W16
const REG_W17
const REG_W18
const REG_W19
const REG_W2
const REG_W20
const REG_W21
const REG_W22
const REG_W23
const REG_W24
const REG_W25
const REG_W26
const REG_W27
const REG_W28
const REG_W29
const REG_W3
const REG_W30
const REG_W31
const REG_W4
const REG_W5
const REG_W6
const REG_W7
const REG_W8
const REG_W9
const SYNC = *ast.BinaryExpr
This order should be strictly consistent to that in a.out.go.
var cnames0 = []string{...}
const mips64FuncAlign = 8
var oprange [*ast.BinaryExpr][]Optab
var optab = []Optab{...}
const r0iszero = 1
var xcmp [C_NCLASS][C_NCLASS]bool
type 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) uint32
func DRconv(a int) string
func FPD(x uint32, y uint32) uint32
func FPF(x uint32, y uint32) uint32
func FPV(x uint32, y uint32) uint32
func FPW(x uint32, y uint32) uint32
func MMU(x uint32, y uint32) uint32
func OP(x uint32, y uint32) uint32
func OP_FRRR(op uint32, r1 int16, r2 int16, r3 int16) uint32
func OP_IRR(op uint32, i uint32, r2 int16, r3 int16) uint32
func OP_JMP(op uint32, i uint32) uint32
func OP_RRR(op uint32, r1 int16, r2 int16, r3 int16) uint32
func OP_SRR(op uint32, s uint32, r2 int16, r3 int16) uint32
func OP_VI10(op uint32, df uint32, s10 int32, wd uint32, minor uint32) uint32
func OP_VMI10(s10 int32, rs uint32, wd uint32, minor uint32, df uint32) uint32
func SP(x uint32, y uint32) uint32
func (c *ctxt0) aclass(a *obj.Addr) int
func (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) bool
func (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) bool
func 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) bool
isUnsafePoint returns whether p is an unsafe point.
func (c *ctxt0) isUnsafePoint(p *obj.Prog) bool
func isint32(v int64) bool
func isuint32(v uint64) bool
MSA Load/Store offset have to be multiple of size of data format
func (c *ctxt0) lsoffset(a obj.As, o int32) int32
func (c *ctxt0) markregused(s *Sch)
func ocmp(p1 Optab, p2 Optab) int
func offoverlap(sa *Sch, sb *Sch) bool
func (c *ctxt0) opirr(a obj.As) uint32
func (c *ctxt0) oplook(p *obj.Prog) *Optab
func (c *ctxt0) oprrr(a obj.As) uint32
func 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) string
func (c *ctxt0) regoff(a *obj.Addr) int32
func (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.Prog
MSA Two-bit Data Format Field Encoding
func (c *ctxt0) twobitdf(a obj.As) uint32
func (c *ctxt0) vregoff(a *obj.Addr) int64
func vshift(a obj.As) bool
Generated with Arrow