opcodes

package
v0.0.0-...-03cd3b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MASK_LUI     uint32 = 0x0000007F
	MATCH_LUI    uint32 = 0x00000037
	MASK_AUIPC   uint32 = 0x0000007F
	MATCH_AUIPC  uint32 = 0x00000017
	MASK_JAL     uint32 = 0x0000007F
	MATCH_JAL    uint32 = 0x0000006F
	MASK_JALR    uint32 = 0x0000707F
	MATCH_JALR   uint32 = 0x00000067
	MASK_BEQ     uint32 = 0x0000707F
	MATCH_BEQ    uint32 = 0x00000063
	MASK_BNE     uint32 = 0x0000707F
	MATCH_BNE    uint32 = 0x00001063
	MASK_BLT     uint32 = 0x0000707F
	MATCH_BLT    uint32 = 0x00004063
	MASK_BGE     uint32 = 0x0000707F
	MATCH_BGE    uint32 = 0x00005063
	MASK_BLTU    uint32 = 0x0000707F
	MATCH_BLTU   uint32 = 0x00006063
	MASK_BGEU    uint32 = 0x0000707F
	MATCH_BGEU   uint32 = 0x00007063
	MASK_LB      uint32 = 0x0000707F
	MATCH_LB     uint32 = 0x00000003
	MASK_LH      uint32 = 0x0000707F
	MATCH_LH     uint32 = 0x00001003
	MASK_LW      uint32 = 0x0000707F
	MATCH_LW     uint32 = 0x00002003
	MASK_LBU     uint32 = 0x0000707F
	MATCH_LBU    uint32 = 0x00004003
	MASK_LHU     uint32 = 0x0000707F
	MATCH_LHU    uint32 = 0x00005003
	MASK_SB      uint32 = 0x0000707F
	MATCH_SB     uint32 = 0x00000023
	MASK_SH      uint32 = 0x0000707F
	MATCH_SH     uint32 = 0x00001023
	MASK_SW      uint32 = 0x0000707F
	MATCH_SW     uint32 = 0x00002023
	MASK_ADDI    uint32 = 0x0000707F
	MATCH_ADDI   uint32 = 0x00000013
	MASK_SLTI    uint32 = 0x0000707F
	MATCH_SLTI   uint32 = 0x00002013
	MASK_SLTIU   uint32 = 0x0000707F
	MATCH_SLTIU  uint32 = 0x00003013
	MASK_XORI    uint32 = 0x0000707F
	MATCH_XORI   uint32 = 0x00004013
	MASK_ORI     uint32 = 0x0000707F
	MATCH_ORI    uint32 = 0x00006013
	MASK_ANDI    uint32 = 0x0000707F
	MATCH_ANDI   uint32 = 0x00007013
	MASK_ADD     uint32 = 0xFE00707F
	MATCH_ADD    uint32 = 0x00000033
	MASK_SUB     uint32 = 0xFE00707F
	MATCH_SUB    uint32 = 0x40000033
	MASK_SLL     uint32 = 0xFE00707F
	MATCH_SLL    uint32 = 0x00001033
	MASK_SLT     uint32 = 0xFE00707F
	MATCH_SLT    uint32 = 0x00002033
	MASK_SLTU    uint32 = 0xFE00707F
	MATCH_SLTU   uint32 = 0x00003033
	MASK_XOR     uint32 = 0xFE00707F
	MATCH_XOR    uint32 = 0x00004033
	MASK_SRL     uint32 = 0xFE00707F
	MATCH_SRL    uint32 = 0x00005033
	MASK_SRA     uint32 = 0xFE00707F
	MATCH_SRA    uint32 = 0x40005033
	MASK_OR      uint32 = 0xFE00707F
	MATCH_OR     uint32 = 0x00006033
	MASK_AND     uint32 = 0xFE00707F
	MATCH_AND    uint32 = 0x00007033
	MASK_FENCE   uint32 = 0x0000707F
	MATCH_FENCE  uint32 = 0x0000000F
	MASK_ECALL   uint32 = 0xFFFFFFFF
	MATCH_ECALL  uint32 = 0x00000073
	MASK_EBREAK  uint32 = 0xFFFFFFFF
	MATCH_EBREAK uint32 = 0x00100073
	MASK_SLLI    uint32 = 0xFE00707F
	MATCH_SLLI   uint32 = 0x00001013
	MASK_SRLI    uint32 = 0xFE00707F
	MATCH_SRLI   uint32 = 0x00005013
	MASK_SRAI    uint32 = 0xFE00707F
	MATCH_SRAI   uint32 = 0x40005013
)
View Source
const (
	MASK_SFENCE_VMA  uint32 = 0xFE007FFF
	MATCH_SFENCE_VMA uint32 = 0x12000073
	MASK_SRET        uint32 = 0xFFFFFFFF
	MATCH_SRET       uint32 = 0x10200073
)
View Source
const (
	MASK_MRET  uint32 = 0xFFFFFFFF
	MATCH_MRET uint32 = 0x30200073
	MASK_DRET  uint32 = 0xFFFFFFFF
	MATCH_DRET uint32 = 0x7B200073
	MASK_WFI   uint32 = 0xFFFFFFFF
	MATCH_WFI  uint32 = 0x10500073
)
View Source
const (
	MASK_CSRRW   uint32 = 0x0000707F
	MATCH_CSRRW  uint32 = 0x00001073
	MASK_CSRRS   uint32 = 0x0000707F
	MATCH_CSRRS  uint32 = 0x00002073
	MASK_CSRRC   uint32 = 0x0000707F
	MATCH_CSRRC  uint32 = 0x00003073
	MASK_CSRRWI  uint32 = 0x0000707F
	MATCH_CSRRWI uint32 = 0x00005073
	MASK_CSRRSI  uint32 = 0x0000707F
	MATCH_CSRRSI uint32 = 0x00006073
	MASK_CSRRCI  uint32 = 0x0000707F
	MATCH_CSRRCI uint32 = 0x00007073
)
View Source
const (
	MASK_FENCE_I  uint32 = 0x0000707F
	MATCH_FENCE_I uint32 = 0x0000100F
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Components

type Components struct {
	RD, RS1, RS2                 uint32
	CSR                          uint32
	FM, PRED, SUCC               uint32
	IMM12, BIMM12, JIMM20, IMM20 int32
	ZIMM, SHAMTW                 uint32
}

type OP_ADD

type OP_ADD struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_ADD) Components

func (o OP_ADD) Components() Components

type OP_ADDI

type OP_ADDI struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_ADDI) Components

func (o OP_ADDI) Components() Components

type OP_AND

type OP_AND struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_AND) Components

func (o OP_AND) Components() Components

type OP_ANDI

type OP_ANDI struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_ANDI) Components

func (o OP_ANDI) Components() Components

type OP_AUIPC

type OP_AUIPC struct {
	RD    uint32
	IMM20 int32
}

func (OP_AUIPC) Components

func (o OP_AUIPC) Components() Components

type OP_BEQ

type OP_BEQ struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BEQ) Components

func (o OP_BEQ) Components() Components

type OP_BGE

type OP_BGE struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BGE) Components

func (o OP_BGE) Components() Components

type OP_BGEU

type OP_BGEU struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BGEU) Components

func (o OP_BGEU) Components() Components

type OP_BLT

type OP_BLT struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BLT) Components

func (o OP_BLT) Components() Components

type OP_BLTU

type OP_BLTU struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BLTU) Components

func (o OP_BLTU) Components() Components

type OP_BNE

type OP_BNE struct {
	BIMM12 int32
	RS1    uint32
	RS2    uint32
}

func (OP_BNE) Components

func (o OP_BNE) Components() Components

type OP_CSRRC

type OP_CSRRC struct {
	RD  uint32
	RS1 uint32
	CSR uint32
}

func (OP_CSRRC) Components

func (o OP_CSRRC) Components() Components

type OP_CSRRCI

type OP_CSRRCI struct {
	RD   uint32
	CSR  uint32
	ZIMM uint32
}

func (OP_CSRRCI) Components

func (o OP_CSRRCI) Components() Components

type OP_CSRRS

type OP_CSRRS struct {
	RD  uint32
	RS1 uint32
	CSR uint32
}

func (OP_CSRRS) Components

func (o OP_CSRRS) Components() Components

type OP_CSRRSI

type OP_CSRRSI struct {
	RD   uint32
	CSR  uint32
	ZIMM uint32
}

func (OP_CSRRSI) Components

func (o OP_CSRRSI) Components() Components

type OP_CSRRW

type OP_CSRRW struct {
	RD  uint32
	RS1 uint32
	CSR uint32
}

func (OP_CSRRW) Components

func (o OP_CSRRW) Components() Components

type OP_CSRRWI

type OP_CSRRWI struct {
	RD   uint32
	CSR  uint32
	ZIMM uint32
}

func (OP_CSRRWI) Components

func (o OP_CSRRWI) Components() Components

type OP_DRET

type OP_DRET struct {
}

func (OP_DRET) Components

func (o OP_DRET) Components() Components

type OP_EBREAK

type OP_EBREAK struct {
}

func (OP_EBREAK) Components

func (o OP_EBREAK) Components() Components

type OP_ECALL

type OP_ECALL struct {
}

func (OP_ECALL) Components

func (o OP_ECALL) Components() Components

type OP_FENCE

type OP_FENCE struct {
	FM   uint32
	PRED uint32
	SUCC uint32
	RS1  uint32
	RD   uint32
}

func (OP_FENCE) Components

func (o OP_FENCE) Components() Components

type OP_FENCE_I

type OP_FENCE_I struct {
	IMM12 int32
	RS1   uint32
	RD    uint32
}

func (OP_FENCE_I) Components

func (o OP_FENCE_I) Components() Components

type OP_ILLEGAL

type OP_ILLEGAL struct {
}

func (OP_ILLEGAL) Components

func (o OP_ILLEGAL) Components() Components

type OP_JAL

type OP_JAL struct {
	RD     uint32
	JIMM20 int32
}

func (OP_JAL) Components

func (o OP_JAL) Components() Components

type OP_JALR

type OP_JALR struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_JALR) Components

func (o OP_JALR) Components() Components

type OP_LB

type OP_LB struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_LB) Components

func (o OP_LB) Components() Components

type OP_LBU

type OP_LBU struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_LBU) Components

func (o OP_LBU) Components() Components

type OP_LH

type OP_LH struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_LH) Components

func (o OP_LH) Components() Components

type OP_LHU

type OP_LHU struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_LHU) Components

func (o OP_LHU) Components() Components

type OP_LUI

type OP_LUI struct {
	RD    uint32
	IMM20 int32
}

func (OP_LUI) Components

func (o OP_LUI) Components() Components

type OP_LW

type OP_LW struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_LW) Components

func (o OP_LW) Components() Components

type OP_MRET

type OP_MRET struct {
}

func (OP_MRET) Components

func (o OP_MRET) Components() Components

type OP_OR

type OP_OR struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_OR) Components

func (o OP_OR) Components() Components

type OP_ORI

type OP_ORI struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_ORI) Components

func (o OP_ORI) Components() Components

type OP_SB

type OP_SB struct {
	IMM12 int32
	RS1   uint32
	RS2   uint32
}

func (OP_SB) Components

func (o OP_SB) Components() Components

type OP_SFENCE_VMA

type OP_SFENCE_VMA struct {
	RS1 uint32
	RS2 uint32
}

func (OP_SFENCE_VMA) Components

func (o OP_SFENCE_VMA) Components() Components

type OP_SH

type OP_SH struct {
	IMM12 int32
	RS1   uint32
	RS2   uint32
}

func (OP_SH) Components

func (o OP_SH) Components() Components

type OP_SLL

type OP_SLL struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SLL) Components

func (o OP_SLL) Components() Components

type OP_SLLI

type OP_SLLI struct {
	RD     uint32
	RS1    uint32
	SHAMTW uint32
}

func (OP_SLLI) Components

func (o OP_SLLI) Components() Components

type OP_SLT

type OP_SLT struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SLT) Components

func (o OP_SLT) Components() Components

type OP_SLTI

type OP_SLTI struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_SLTI) Components

func (o OP_SLTI) Components() Components

type OP_SLTIU

type OP_SLTIU struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_SLTIU) Components

func (o OP_SLTIU) Components() Components

type OP_SLTU

type OP_SLTU struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SLTU) Components

func (o OP_SLTU) Components() Components

type OP_SRA

type OP_SRA struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SRA) Components

func (o OP_SRA) Components() Components

type OP_SRAI

type OP_SRAI struct {
	RD     uint32
	RS1    uint32
	SHAMTW uint32
}

func (OP_SRAI) Components

func (o OP_SRAI) Components() Components

type OP_SRET

type OP_SRET struct {
}

func (OP_SRET) Components

func (o OP_SRET) Components() Components

type OP_SRL

type OP_SRL struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SRL) Components

func (o OP_SRL) Components() Components

type OP_SRLI

type OP_SRLI struct {
	RD     uint32
	RS1    uint32
	SHAMTW uint32
}

func (OP_SRLI) Components

func (o OP_SRLI) Components() Components

type OP_SUB

type OP_SUB struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_SUB) Components

func (o OP_SUB) Components() Components

type OP_SW

type OP_SW struct {
	IMM12 int32
	RS1   uint32
	RS2   uint32
}

func (OP_SW) Components

func (o OP_SW) Components() Components

type OP_WFI

type OP_WFI struct {
}

func (OP_WFI) Components

func (o OP_WFI) Components() Components

type OP_XOR

type OP_XOR struct {
	RD  uint32
	RS1 uint32
	RS2 uint32
}

func (OP_XOR) Components

func (o OP_XOR) Components() Components

type OP_XORI

type OP_XORI struct {
	RD    uint32
	RS1   uint32
	IMM12 int32
}

func (OP_XORI) Components

func (o OP_XORI) Components() Components

type Opcode

type Opcode interface {
	Components() Components
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL