Categorygithub.com/mewmew/mips
modulepackage
0.1.0
Repository: https://github.com/mewmew/mips.git
Documentation: pkg.go.dev

# README

MIPS

Build Status Coverage Status GoDoc

Decoder library for 32-bit MIPS I machine code in Go.

Design

For familiarity and consistency, the API is intentionally kept as close as possible to the golang.org/x/arch packages.

# Packages

No description provided by the author

# Functions

Decode decodes the 4 bytes in src as a single instruction.

# Constants

$a0.
$a1.
$a2.
$a3.
add.
addi.
addiu.
addu.
and.
andi.
$at.
BadVaddr.
bc0f.
bc0t.
bc1f.
bc1t.
bc2f.
bc2t.
bc3f.
bc3t.
beq.
bgez.
bgezal.
bgtz.
blez.
bltz.
bltzal.
bne.
break.
BusCtrl.
Cause.
cfc0.
cfc1.
cfc2.
cfc3.
$0.
$1.
$10.
$11.
$12.
$13.
$14.
$15.
$16.
$17.
$18.
$19.
$2.
$20.
$21.
$22.
$23.
$24.
$25.
$26.
$27.
$28.
$29.
$3.
$30.
$31.
$4.
$5.
$6.
$7.
$8.
$9.
Compare.
Config.
cop0.
cop1.
cop2.
cop3.
Count.
CP0 (System control co-processor) special registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
Registers.
$cp3_0.
$cp3_1.
$cp3_10.
$cp3_11.
$cp3_12.
$cp3_13.
$cp3_14.
$cp3_15.
$cp3_16.
$cp3_17.
$cp3_18.
$cp3_19.
$cp3_2.
$cp3_20.
$cp3_21.
$cp3_22.
$cp3_23.
$cp3_24.
$cp3_25.
$cp3_26.
$cp3_27.
$cp3_28.
$cp3_29.
$cp3_3.
$cp3_30.
$cp3_31.
$cp3_4.
$cp3_5.
$cp3_6.
$cp3_7.
$cp3_8.
$cp3_9.
ctc0.
ctc1.
ctc2.
ctc3.
div.
divu.
EPC.
$f0.
$f1.
$f10.
$f11.
$f12.
$f13.
$f14.
$f15.
$f16.
$f17.
$f18.
$f19.
$f2.
$f20.
$f21.
$f22.
$f23.
$f24.
$f25.
$f26.
$f27.
$f28.
$f29.
$f3.
$f30.
$f31.
$f4.
$f5.
$f6.
$f7.
$f8.
$f9.
$fp.
$gp.
$hi.
j.
jal.
jalr.
jr.
$k0.
$k1.
lb.
lbu.
lh.
lhu.
$lo.
lui.
lw.
lwc0.
lwc1.
lwc2.
lwc3.
lwl.
lwr.
mfc0.
mfc1.
mfc2.
mfc3.
mfhi.
mflo.
mtc0.
mtc1.
mtc2.
mtc3.
mthi.
mtlo.
mult.
multu.
nor.
or.
ori.
$pc.
PortSize.
PRId.
$ra.
rfe.
$s0.
$s1.
$s2.
$s3.
$s4.
$s5.
$s6.
$s7.
sb.
sh.
sll.
sllv.
slt.
slti.
sltiu.
sltu.
$sp.
SR.
sra.
srav.
srl.
srlv.
sub.
subu.
sw.
swc0.
swc1.
swc2.
swc3.
swl.
swr.
syscall.
$t0.
$t1.
$t2.
$t3.
$t4.
$t5.
$t6.
$t7.
$t8.
$t9.
tlbp.
tlbr.
tlbwi.
tlbwr.
$v0.
$v1.
xor.
xori.
$zero.

# Structs

An Imm is an integer constant.
An Inst is a single instruction.
A Mem is a memory reference made up of a base R and immediate X.

# Interfaces

An Arg is a single instruction argument, one of these types: Reg, PCRel, Mem, Imm.

# Type aliases

An Args holds the instruction arguments.
An Op is a MIPS opcode.
A PCRel describes a memory address (usually a code label) as a distance relative to the program counter.
A Reg is a single register.