Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Csr = map[string]uint32{
"ustatus": 0x000,
"uie": 0x004,
"utvec": 0x005,
"uscratch": 0x040,
"uepc": 0x041,
"ucause": 0x042,
"utval": 0x043,
"uip": 0x044,
"cycle": 0xC00,
"time": 0xC01,
"instret": 0xC02,
"cycleh": 0xC80,
"timeh": 0xC81,
"instreth": 0xC82,
}
View Source
var Insns = map[string]Insn{ "lui": Insn{"lui", ULayout, UType}, "auipc": Insn{"auipc", ULayout, UType}, "jal": Insn{"jal", JLayout, JType}, "jalr": Insn{"jalr", ILayout, IType}, "beq": Insn{"beq", BLayout, BType}, "bne": Insn{"bne", BLayout, BType}, "blt": Insn{"blt", BLayout, BType}, "bge": Insn{"bge", BLayout, BType}, "bltu": Insn{"bltu", BLayout, BType}, "bgeu": Insn{"bgeu", BLayout, BType}, "lb": Insn{"lb", ILayout, LType}, "lh": Insn{"lh", ILayout, LType}, "lw": Insn{"lw", ILayout, LType}, "lbu": Insn{"lbu", ILayout, LType}, "lhu": Insn{"lhu", ILayout, LType}, "sb": Insn{"sb", SLayout, SType}, "sh": Insn{"sh", SLayout, SType}, "sw": Insn{"sw", SLayout, SType}, "addi": Insn{"addi", ILayout, IType}, "slti": Insn{"slti", ILayout, IType}, "sltiu": Insn{"sltiu", ILayout, IType}, "xori": Insn{"xori", ILayout, IType}, "ori": Insn{"ori", ILayout, IType}, "andi": Insn{"andi", ILayout, IType}, "slli": Insn{"slli", RLayout, IType}, "srli": Insn{"srli", RLayout, IType}, "srai": Insn{"srai", RLayout, IType}, "add": Insn{"add", RLayout, RType}, "sub": Insn{"sub", RLayout, RType}, "sll": Insn{"sll", RLayout, RType}, "slt": Insn{"slt", RLayout, RType}, "sltu": Insn{"sltu", RLayout, RType}, "xor": Insn{"xor", RLayout, RType}, "srl": Insn{"srl", RLayout, RType}, "sra": Insn{"sra", RLayout, RType}, "or": Insn{"or", RLayout, RType}, "and": Insn{"and", RLayout, RType}, "fence": Insn{"fence", FLayout, FType}, "ecall": Insn{"ecall", ILayout, EType}, "ebreak": Insn{"ebreak", ILayout, EType}, "csrrw": Insn{"csrrw", ILayout, CType}, "csrrs": Insn{"csrrs", ILayout, CType}, "csrrc": Insn{"csrrc", ILayout, CType}, "csrrwi": Insn{"csrrwi", ILayout, CType}, "csrrsi": Insn{"csrrsi", ILayout, CType}, "csrrci": Insn{"csrrci", ILayout, CType}, "uret": Insn{"uret", RLayout, PType}, "sret": Insn{"sret", RLayout, PType}, "mret": Insn{"mret", RLayout, PType}, "wfi": Insn{"wfi", RLayout, PType}, }
View Source
var Reg = map[string]uint32{
"x0": 0,
"x1": 1,
"x2": 2,
"x3": 3,
"x4": 4,
"x5": 5,
"x6": 6,
"x7": 7,
"x8": 8,
"x9": 9,
"x10": 10,
"x11": 11,
"x12": 12,
"x13": 13,
"x14": 14,
"x15": 15,
"x16": 16,
"x17": 17,
"x18": 18,
"x19": 19,
"x20": 20,
"x21": 21,
"x22": 22,
"x23": 23,
"x24": 24,
"x25": 25,
"x26": 26,
"x27": 27,
"x28": 28,
"x29": 29,
"x30": 30,
"x31": 31,
"zero": 0,
"ra": 1,
"sp": 2,
"gp": 3,
"tp": 4,
"t0": 5,
"t1": 6,
"t2": 7,
"s0": 8,
"s1": 9,
"a0": 10,
"a1": 11,
"a2": 12,
"a3": 13,
"a4": 14,
"a5": 15,
"a6": 16,
"a7": 17,
"s2": 18,
"s3": 19,
"s4": 20,
"s5": 21,
"s6": 22,
"s7": 23,
"s8": 24,
"s9": 25,
"s10": 26,
"s11": 27,
"t3": 28,
"t4": 29,
"t5": 30,
"t6": 31,
"fp": 8,
}
Functions ¶
Types ¶
type Insn ¶
type Insn struct { Name string Layout InsnLayout Type InsnType }
type InsnLayout ¶
type InsnLayout int
const ( RLayout InsnLayout = iota JLayout ULayout BLayout SLayout ILayout FLayout // fence instructions )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.