package core:rexcode/isa/riscv

⌘K
Ctrl+K
or
/

    Overview

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    Types

    Alias_Src ¶

    Alias_Src :: enum u8 {
    	NONE,    // slot unused
    	ARG0,    // user's 1st operand
    	ARG1,    // user's 2nd operand
    	ARG2,    // user's 3rd operand
    	X0,      // hardwired zero (x0)
    	X1,      // link register (ra / x1)
    	LIT,     // the `lit` field below (immediate literal)
    	CSR_LIT, // the `csr` field below (fixed 12-bit CSR address)
    }
     

    How each operand slot of the target instruction is filled.

    Clobber ¶

    Clobber :: struct {
    	written:      Operand_Set,
    	// operand slots whose register/CSR is written
    	read:         Operand_Set,
    	// operand slots whose register/CSR/mem-base is read
    	implicit_wr:  Clobber_Regs,
    	// implicit reg writes (ra on C.JAL/C.JALR)
    	implicit_rd:  Clobber_Regs,
    	// implicit reg reads (sp on the *SP forms)
    	fflags_wr:    FFlags,
    	// accrued exception flags this op may raise
    	reads_frm:    bool,
    	// consumes the dynamic rounding mode from fcsr
    	writes_mem:   bool,
    	reads_mem:    bool,
    	side_effects: Side_Effects,
    }

    Clobber_Reg ¶

    Clobber_Reg :: enum u8 {
    	RA, // x1, implicit link on C.JAL / C.JALR
    	SP, // x2, implicit base on the *SP compressed forms
    }
     

    Implicitly-touched registers that are NOT distinct operands. RISC-V's base ISA has almost none of these (unlike x86's RAX/RDX/RSP-heavy encodings) — only the compressed link/stack forms.

    Decode_Entry ¶

    Decode_Entry :: struct #packed {
    	mnemonic: Mnemonic,
    	// 2
    	ops:      [4]Operand_Type,
    	// 4
    	enc:      [4]Operand_Encoding,
    	// 4
    	bits:     u32,
    	// 4
    	mask:     u32,
    	// 4
    	feature:  Feature,
    	// 1
    	flags:    Encoding_Flags,
    }

    Decode_Index ¶

    Decode_Index :: struct #packed {
    	start: u16,
    	count: u16,
    }

    Encode_Run ¶

    Encode_Run :: struct {
    	start: u32,
    	count: u32,
    }
     

    Companion run index: ENCODE_RUNS[mnemonic] -> contiguous run in ENCODE_FORMS.

    Encoding ¶

    Encoding :: struct #packed {
    	mnemonic: Mnemonic,
    	// 2
    	ops:      [4]Operand_Type,
    	// 4
    	enc:      [4]Operand_Encoding,
    	// 4
    	bits:     u32,
    	// 4
    	mask:     u32,
    	// 4
    	feature:  Feature,
    	// 1
    	flags:    Encoding_Flags,
    }

    Encoding_Flags ¶

    Encoding_Flags :: distinct bit_field u8 {
    	rv32_only:      bool | 1,
    	rv64_only:      bool | 1,
    	branch:         bool | 1,
    	fp_round:       bool | 1,
    	explicit_count: u8 | 3,
    	has_implicit:   bool | 1,
    }

    FFlag ¶

    FFlag :: enum u8 {
    	NV, // invalid operation
    	DZ, // divide by zero
    	OF, // overflow
    	UF, // underflow
    	NX, // inexact
    }
     

    fcsr accrued exception flags. This is the ONLY flag state in RISC-V — there are no integer condition codes, so there is no EFLAGS-style triad here.

    FFlags ¶

    FFlags :: distinct bit_set[FFlag; u8]

    FPR ¶

    FPR :: enum u8 {
    	FT0  = 0, 
    	FT1  = 1, 
    	FT2  = 2, 
    	FT3  = 3, 
    	FT4  = 4, 
    	FT5  = 5, 
    	FT6  = 6, 
    	FT7  = 7, 
    	FS0  = 8, 
    	FS1  = 9, 
    	FA0  = 10, 
    	FA1  = 11, 
    	FA2  = 12, 
    	FA3  = 13, 
    	FA4  = 14, 
    	FA5  = 15, 
    	FA6  = 16, 
    	FA7  = 17, 
    	FS2  = 18, 
    	FS3  = 19, 
    	FS4  = 20, 
    	FS5  = 21, 
    	FS6  = 22, 
    	FS7  = 23, 
    	FS8  = 24, 
    	FS9  = 25, 
    	FS10 = 26, 
    	FS11 = 27, 
    	FT8  = 28, 
    	FT9  = 29, 
    	FT10 = 30, 
    	FT11 = 31, 
    }

    Feature ¶

    Feature :: enum u16 {
    	I,        // RV32I / RV64I base integer
    	M,        // multiply / divide
    	A,        // atomics
    	F,        // single-precision FP
    	D,        // double-precision FP
    	ZICSR,    // CSR access (CSRRW/S/C + immediate forms)
    	ZIFENCEI, // FENCE.I (instruction-fetch fence)
    	C,        // 16-bit compressed instructions
    	ZBA,      // address-generation bit-manip
    	ZBB,      // basic bit-manip
    	ZBC,      // carry-less multiply
    	ZBS,      // single-bit bit-manip
    	ZICOND,   // conditional zeroing
    	ZFH,      // half-precision (binary16) FP
    	PRIV,     // privileged trap-return / TLB maintenance
    }
     

    Extension this entry belongs to (metadata, not used by the matcher).

    GPR ¶

    GPR :: enum u8 {
    	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, 
    }

    Related Constants

    Instruction ¶

    Instruction :: struct #packed {
    	ops:           [4]Operand `fmt:"v,operand_count"`,
    	// 40 bytes
    	mnemonic:      Mnemonic,
    	// 2
    	operand_count: u8,
    	// 1
    	flags:         Instruction_Flags,
    	// 1
    	length:        u8,
    	// 1 -- always 4 for non-C
    	_:             [3]u8,
    }

    Instruction_Flags ¶

    Instruction_Flags :: distinct bit_field u8 {
    	_: u8 | 8,
    }

    Instruction_Info ¶

    Instruction_Info :: struct {
    	offset:       u32,
    	decode_entry: u16,
    	_:            u16,
    }

    Memory ¶

    Memory :: struct #packed {
    	base: Register,
    	// GPR base
    	_:    u16,
    	disp: i32,
    }

    Mnemonic ¶

    Mnemonic :: enum u16 {
    	INVALID    = 0, 
    	// Upper-immediate
    	LUI, 
    	AUIPC, 
    	// Jumps
    	JAL, 
    	JALR, 
    	// Branches
    	BEQ, 
    	BNE, 
    	BLT, 
    	BGE, 
    	BLTU, 
    	BGEU, 
    	// Loads / stores
    	LB, 
    	LH, 
    	LW, 
    	LBU, 
    	LHU, 
    	SB, 
    	SH, 
    	SW, 
    	LWU, 
    	LD,             // RV64-only
    	SD,             // RV64-only
    	// Integer reg-imm
    	ADDI, 
    	SLTI, 
    	SLTIU, 
    	XORI, 
    	ORI, 
    	ANDI, 
    	SLLI, 
    	SRLI, 
    	SRAI,           // shift-immediate (5-bit shamt RV32; 6-bit RV64)
    	ADDIW, 
    	SLLIW, 
    	SRLIW, 
    	SRAIW,          // RV64-only (32-bit ops)
    	// Integer reg-reg
    	ADD, 
    	SUB, 
    	SLL, 
    	SLT, 
    	SLTU, 
    	XOR, 
    	SRL, 
    	SRA, 
    	OR, 
    	AND, 
    	ADDW, 
    	SUBW, 
    	SLLW, 
    	SRLW, 
    	SRAW,           // RV64-only
    	// Memory ordering
    	FENCE, 
    	FENCE_I, 
    	// System
    	ECALL, 
    	EBREAK, 
    	CSRRW, 
    	CSRRS, 
    	CSRRC, 
    	CSRRWI, 
    	CSRRSI, 
    	CSRRCI, 
    	MUL, 
    	MULH, 
    	MULHSU, 
    	MULHU, 
    	DIV, 
    	DIVU, 
    	REM, 
    	REMU, 
    	MULW, 
    	DIVW, 
    	DIVUW, 
    	REMW, 
    	REMUW,          // RV64-only
    	LR_W, 
    	SC_W, 
    	AMOSWAP_W, 
    	AMOADD_W, 
    	AMOXOR_W, 
    	AMOAND_W, 
    	AMOOR_W, 
    	AMOMIN_W, 
    	AMOMAX_W, 
    	AMOMINU_W, 
    	AMOMAXU_W, 
    	LR_D, 
    	SC_D,           // RV64-only
    	AMOSWAP_D, 
    	AMOADD_D, 
    	AMOXOR_D, 
    	AMOAND_D, 
    	AMOOR_D, 
    	AMOMIN_D, 
    	AMOMAX_D, 
    	AMOMINU_D, 
    	AMOMAXU_D, 
    	FLW, 
    	FSW, 
    	FMADD_S, 
    	FMSUB_S, 
    	FNMSUB_S, 
    	FNMADD_S, 
    	FADD_S, 
    	FSUB_S, 
    	FMUL_S, 
    	FDIV_S, 
    	FSQRT_S, 
    	FSGNJ_S, 
    	FSGNJN_S, 
    	FSGNJX_S, 
    	FMIN_S, 
    	FMAX_S, 
    	FCVT_W_S, 
    	FCVT_WU_S, 
    	FMV_X_W, 
    	FEQ_S, 
    	FLT_S, 
    	FLE_S, 
    	FCLASS_S, 
    	FCVT_S_W, 
    	FCVT_S_WU, 
    	FMV_W_X, 
    	FCVT_L_S, 
    	FCVT_LU_S, 
    	FCVT_S_L, 
    	FCVT_S_LU,      // RV64F
    	FLD, 
    	FSD, 
    	FMADD_D, 
    	FMSUB_D, 
    	FNMSUB_D, 
    	FNMADD_D, 
    	FADD_D, 
    	FSUB_D, 
    	FMUL_D, 
    	FDIV_D, 
    	FSQRT_D, 
    	FSGNJ_D, 
    	FSGNJN_D, 
    	FSGNJX_D, 
    	FMIN_D, 
    	FMAX_D, 
    	FCVT_S_D, 
    	FCVT_D_S, 
    	FEQ_D, 
    	FLT_D, 
    	FLE_D, 
    	FCLASS_D, 
    	FCVT_W_D, 
    	FCVT_WU_D, 
    	FCVT_D_W, 
    	FCVT_D_WU, 
    	FCVT_L_D, 
    	FCVT_LU_D, 
    	FCVT_D_L, 
    	FCVT_D_LU,      // RV64D
    	FMV_X_D, 
    	FMV_D_X,        // RV64D
    	// -------------------------------------------------------------------------
    	// C extension (16-bit compressed). Each C.* mnemonic expands semantically
    	// to a 32-bit base ISA instruction; the encoder picks the compressed
    	// form by mnemonic.
    	// -------------------------------------------------------------------------
    	C_NOP, 
    	C_EBREAK, 
    	C_ADDI4SPN,     // rd', sp, imm
    	C_LW, 
    	C_LD, 
    	C_SW, 
    	C_SD,           // (RV64 LD/SD; RV32 has LW/SW)
    	C_FLW, 
    	C_FSW, 
    	C_FLD, 
    	C_FSD,          // double-precision FP load/store
    	C_ADDI, 
    	C_ADDIW, 
    	C_LI, 
    	C_LUI, 
    	C_ADDI16SP,     // sp, imm
    	C_SRLI, 
    	C_SRAI, 
    	C_ANDI, 
    	C_SUB, 
    	C_XOR, 
    	C_OR, 
    	C_AND, 
    	C_SUBW, 
    	C_ADDW,         // RV64-only
    	C_J, 
    	C_JAL,          // C.JAL is RV32-only; RV64 has C.ADDIW
    	C_BEQZ, 
    	C_BNEZ, 
    	C_SLLI, 
    	C_LWSP, 
    	C_LDSP, 
    	C_SWSP, 
    	C_SDSP, 
    	C_FLDSP, 
    	C_FSDSP, 
    	C_JR, 
    	C_JALR, 
    	C_MV, 
    	C_ADD, 
    	C_FLWSP, 
    	C_FSWSP, 
    	SH1ADD, 
    	SH2ADD, 
    	SH3ADD, 
    	ADD_UW, 
    	SH1ADD_UW, 
    	SH2ADD_UW, 
    	SH3ADD_UW, 
    	SLLI_UW, 
    	ANDN, 
    	ORN, 
    	XNOR, 
    	CLZ, 
    	CTZ, 
    	CPOP, 
    	SEXT_B, 
    	SEXT_H, 
    	ZEXT_H, 
    	MIN, 
    	MINU, 
    	MAX, 
    	MAXU, 
    	ROL, 
    	ROR, 
    	RORI, 
    	ORC_B, 
    	REV8, 
    	CLZW, 
    	CTZW, 
    	CPOPW, 
    	ROLW, 
    	RORW, 
    	RORIW, 
    	CLMUL, 
    	CLMULH, 
    	CLMULR, 
    	BCLR, 
    	BCLRI, 
    	BEXT, 
    	BEXTI, 
    	BINV, 
    	BINVI, 
    	BSET, 
    	BSETI, 
    	CZERO_EQZ, 
    	CZERO_NEZ, 
    	FLH, 
    	FSH, 
    	FMADD_H, 
    	FMSUB_H, 
    	FNMSUB_H, 
    	FNMADD_H, 
    	FADD_H, 
    	FSUB_H, 
    	FMUL_H, 
    	FDIV_H, 
    	FSQRT_H, 
    	FSGNJ_H, 
    	FSGNJN_H, 
    	FSGNJX_H, 
    	FMIN_H, 
    	FMAX_H, 
    	FCVT_W_H, 
    	FCVT_WU_H, 
    	FCVT_L_H, 
    	FCVT_LU_H, 
    	FCVT_H_W, 
    	FCVT_H_WU, 
    	FCVT_H_L, 
    	FCVT_H_LU, 
    	FCVT_S_H, 
    	FCVT_H_S, 
    	FCVT_D_H, 
    	FCVT_H_D, 
    	FMV_X_H, 
    	FMV_H_X, 
    	FCLASS_H, 
    	FEQ_H, 
    	FLT_H, 
    	FLE_H, 
    	MRET, 
    	SRET, 
    	WFI, 
    	SFENCE_VMA, 
    }

    Related Procedures With Parameters

    Operand ¶

    Operand :: struct #packed {
    	using _: struct #raw_union {
    		reg:       Register,
    		// REGISTER (int or FP)
    		mem:       Memory,
    		immediate: i64,
    		relative:  i64,
    	},
    	kind: Operand_Kind,
    	size: u8,
    }

    Related Procedures With Returns

    Operand_Encoding ¶

    Operand_Encoding :: enum u8 {
    	NONE, 
    	RD,              // bits 11-7   (any register, int or FP)
    	RS1,             // bits 19-15
    	RS2,             // bits 24-20
    	RS3,             // bits 31-27  (R4-type, FMADD/FMSUB/FNMADD/FNMSUB)
    	SHAMT5,          // bits 24-20  (5-bit shift)
    	SHAMT6,          // bits 25-20  (6-bit shift, RV64 long shifts)
    	IMM_I,           // bits 31-20  (signed I-type 12-bit)
    	IMM_S,           // bits 31-25 || 11-7  (S-type scatter)
    	IMM_B,           // B-type scatter: imm[12] @31, [10:5] @30-25, [4:1] @11-8, [11] @7
    	IMM_U,           // bits 31-12  (U-type 20-bit upper)
    	IMM_J,           // J-type scatter: imm[20] @31, [10:1] @30-21, [11] @20, [19:12] @19-12
    	OFFSET_BASE_I,   // memory: rs1 @bits 19-15 + IMM_I disp (loads, JALR, FLW, FLD)
    	OFFSET_BASE_S,   // memory: rs1 @bits 19-15 + IMM_S disp (stores, FSW, FSD)
    	OFFSET_BASE_A,   // memory: rs1 @bits 19-15 only (atomics; disp must be 0)
    	CSR_FIELD,       // bits 31-20  (12-bit CSR address)
    	ZIMM_FIELD,      // bits 19-15  (zero-extended 5-bit imm; replaces rs1 in CSRRxI)
    	FENCE_PRED,      // bits 27-24
    	FENCE_SUCC,      // bits 23-20
    	ROUND_FIELD,     // bits 14-12  (funct3 doubles as rm)
    	AQRL,            // bits 26-25  (atomic acquire/release)
    	// ---- C extension (compressed; bits fit in low 16 of the word) ----
    	C_RD_RS1,        // bits 11-7  (CR/CI shared rd/rs1 slot)
    	C_RS2,           // bits  6-2  (CR rs2)
    	C_RD_PRIMED,     // bits  4-2  (CIW/CL/CB rd' encoded as x8+field)
    	C_RS1_PRIMED,    // bits  9-7  (CL/CS/CA/CB rs1' encoded as x8+field)
    	C_RS2_PRIMED,    // bits  4-2  (CS/CA rs2' encoded as x8+field)
    	C_RD_RS1_PRIMED, // bits  9-7  (CA rd'/rs1' encoded as x8+field)
    	C_IMM_CI_S,      // bits 12 || 6-2  (signed 6-bit CI imm)
    	C_IMM_CI_U,      // bits 12 || 6-2  (unsigned 6-bit CI imm; SLLI shamt)
    	C_IMM_CIW,       // bits 12-5  (C.ADDI4SPN: scrambled to imm[9:2])
    	C_IMM_LUI,       // bits 12 || 6-2 (C.LUI: imm[17] || imm[16:12])
    	C_IMM_ADDI16SP,  // bits 12,4,3,5,2,6  -> imm[9,4,6,8:7,5]
    	C_IMM_CSS_W,     // bits 12-7  -> imm[5:2,7:6] (C.SWSP scaled by 4)
    	C_IMM_CSS_D,     // bits 12-7  -> imm[5:3,8:6] (C.SDSP scaled by 8)
    	C_IMM_CL_W,      // bits 12-10 || 6-5 -> imm[5:3,2,6] (C.LW/C.SW scaled by 4)
    	C_IMM_CL_D,      // bits 12-10 || 6-5 -> imm[5:3,7:6] (C.LD/C.SD scaled by 8)
    	C_BRANCH9,       // C.BEQZ/BNEZ: scatter to bits 12 || 10:9,2,7:6,5:4 || 11
    	C_BRANCH12,      // C.J/C.JAL: scatter to bits 12 || 8 || 10:9 || 6 || 7 || 2 || 11 || 5:3 -> imm[11,4,9:8,10,6,7,3:1,5]
    	C_OFFSET_BASE_W, // memory: rs1' at 9-7 + scaled-by-4 imm at 12-10 || 6-5
    	C_OFFSET_BASE_D, // memory: rs1' at 9-7 + scaled-by-8 imm at 12-10 || 6-5
    	C_SP_OFFSET_W,   // SP-relative: rd at 11-7 + scaled-by-4 imm at 12 || 6:4 || 3:2 -> imm[5,4:2,7:6]
    	C_SP_OFFSET_D,   // SP-relative: rd at 11-7 + scaled-by-8 imm at 12 || 6:5 || 4:2 -> imm[5,4:3,8:6]
    }
     

    Where the operand's bits land in the 32-bit instruction word.

    Operand_Kind ¶

    Operand_Kind :: enum u8 {
    	NONE, 
    	REGISTER,  // mostly used for `A` in `ROL A` (implicit; rarely needed)
    	IMMEDIATE, 
    	MEMORY, 
    	RELATIVE,  // PC-relative target (label or raw byte offset)
    }

    Operand_Set ¶

    Operand_Set :: distinct bit_set[int; u8]
     

    Operand slots (indices into the Encoding operand list) that are read/written. Max 4 operands (R4-type FMA: rd, rs1, rs2, rs3).

    Operand_Type ¶

    Operand_Type :: enum u8 {
    	NONE, 
    	GPR, 
    	FPR, 
    	IMM12,       // signed 12-bit I-type immediate (ADDI/LOADS/JALR/...)
    	IMM12U,      // unsigned 12-bit (CSR address; some pseudo-uses)
    	IMM5,        // 5-bit shift amount (RV32 shifts; SLLIW/SRLIW/SRAIW)
    	IMM6,        // 6-bit shift amount (RV64 SLLI/SRLI/SRAI)
    	IMM20,       // 20-bit U-type immediate (LUI, AUIPC)
    	REL13,       // 13-bit branch target (label or signed byte offset)
    	REL21,       // 21-bit jump target (label or signed byte offset)
    	MEM,         // base + signed 12-bit displacement
    	CSR,         // 12-bit CSR address
    	FENCE_FLAGS, // 4-bit pred or succ mask (for FENCE)
    	ROUND_MODE,  // 3-bit FP rounding mode
    	ZIMM5,       // 5-bit zero-extended immediate (CSRRWI/SI/CI)
    	// ---- C extension (compressed) ----
    	GPR_C,       // "primed" 3-bit register (x8..x15 only)
    	GPR_SP,      // hardwired SP (x2) for C.ADDI16SP / C.LWSP / C.SWSP
    	GPR_NONZERO, // GPR with hw != 0 (C.ADDI/C.LI/C.MV/etc. forbid x0)
    	FPR_C,       // primed FP register (f8..f15 only)
    	IMM_C6S,     // CI-form signed 6-bit (C.ADDI/C.LI)
    	IMM_C6U,     // CI-form unsigned 6-bit (C.SLLI/SRLI/SRAI shamt)
    	IMM_C8U,     // CIW-form 8-bit unsigned scaled (C.ADDI4SPN)
    	IMM_C10S,    // C.ADDI16SP 10-bit signed scaled by 16
    	IMM_C18S,    // C.LUI 18-bit signed scaled by 4096
    	REL9,        // 9-bit signed PC-rel branch (C.BEQZ/BNEZ)
    	REL12,       // 12-bit signed PC-rel jump (C.J/C.JAL)
    	MEM_C_W,     // memory for C.LW/C.SW (rs1' + scaled imm by 4)
    	MEM_C_D,     // memory for C.LD/C.SD (rs1' + scaled imm by 8)
    	MEM_C_SP_W,  // SP-relative for C.LWSP/C.SWSP (scaled by 4)
    	MEM_C_SP_D,  // SP-relative for C.LDSP/C.SDSP (scaled by 8)
    }
     

    What the user passes in.

    Pseudo_Alias ¶

    Pseudo_Alias :: struct {
    	target:    Mnemonic,
    	// real instruction emitted
    	src:       [4]Alias_Src,
    	// how to fill target's four operand slots
    	lit:       i16,
    	// immediate when a src slot is .LIT
    	csr:       u16,
    	// CSR address when a src slot is .CSR_LIT
    	nargs:     u8,
    	// operands the user supplies (ARG0..<ARGn)
    	rv32_only: bool,
    }

    Pseudo_Mnemonic ¶

    Pseudo_Mnemonic :: enum u16 {
    	INVALID, 
    	// integer moves / arithmetic
    	NOP, 
    	MV, 
    	NOT, 
    	NEG, 
    	NEGW, 
    	SEXT_W, 
    	ZEXT_B, 
    	// set-if / compare-to-zero
    	SEQZ, 
    	SNEZ, 
    	SLTZ, 
    	SGTZ, 
    	// branch-on-zero
    	BEQZ, 
    	BNEZ, 
    	BLEZ, 
    	BGEZ, 
    	BLTZ, 
    	BGTZ, 
    	// branch with swapped operands
    	BGT, 
    	BLE, 
    	BGTU, 
    	BLEU, 
    	// jumps
    	J, 
    	JAL_RA, 
    	JR, 
    	JALR_RA, 
    	RET, 
    	// generic CSR access
    	CSRR, 
    	CSRW, 
    	CSRS, 
    	CSRC, 
    	CSRWI, 
    	CSRSI, 
    	CSRCI, 
    	// named counter reads (CSR baked in)
    	RDCYCLE, 
    	RDTIME, 
    	RDINSTRET, 
    	RDCYCLEH, 
    	RDTIMEH, 
    	RDINSTRETH, 
    	// fcsr / frm / fflags accessors
    	FRCSR, 
    	FSCSR, 
    	FRRM, 
    	FSRM, 
    	FRFLAGS, 
    	FSFLAGS, 
    	FSRMI, 
    	FSFLAGSI, 
    	// FP sign-injection moves
    	FMV_S, 
    	FABS_S, 
    	FNEG_S, 
    	FMV_D, 
    	FABS_D, 
    	FNEG_D, 
    	FMV_H, 
    	FABS_H, 
    	FNEG_H, 
    	// memory ordering
    	FENCE_ALL, 
    }

    Relocation ¶

    Relocation :: struct #packed {
    	offset:   u32,
    	label_id: u32,
    	addend:   i32,
    	type:     Relocation_Type,
    	size:     u8,
    	inst_idx: u16,
    }

    Relocation_Type ¶

    Relocation_Type :: enum u8 {
    	NONE         = 0, 
    	// PC-relative branches and jumps
    	BRANCH,           // 13-bit signed PC-rel, B-type scatter (BEQ/BNE/...)
    	JAL,              // 21-bit signed PC-rel, J-type scatter (JAL)
    	// PC-relative paired (AUIPC + ADDI/load/store)
    	PCREL_HI20,       // upper 20 bits of (sym - pc), U-type
    	PCREL_LO12_I,     // lower 12 bits, I-type form
    	PCREL_LO12_S,     // lower 12 bits, S-type form
    	// Absolute paired (LUI + ADDI/load/store)
    	HI20,             // upper 20 of absolute, U-type
    	LO12_I,           // lower 12, I-type
    	LO12_S,           // lower 12, S-type
    	// Helpful aggregate forms (the assembler can expand)
    	CALL,             // AUIPC + JALR pair to call a far symbol
    	// ---- C extension PC-relative ----
    	C_BRANCH,         // 9-bit signed PC-rel for C.BEQZ / C.BNEZ
    	C_JUMP,           // 12-bit signed PC-rel for C.J / C.JAL
    }

    Side_Effect ¶

    Side_Effect :: enum u8 {
    	CONTROL,     // writes pc: branches, jumps, and trap redirects
    	TRAP,        // synchronous environment trap (ECALL / EBREAK)
    	FENCE,       // explicit memory-ordering barrier (FENCE)
    	IFENCE,      // instruction-fetch synchronization (FENCE.I)
    	ATOMIC,      // indivisible memory RMW (AMO*, and the LR/SC pair)
    	RESERVATION, // sets or tests an LR/SC reservation
    }

    XLEN ¶

    XLEN :: enum u8 {
    	RV32, 
    	RV64, 
    }

    Related Procedures With Parameters

    Constants

    One row per constant, under the prefix it shares with others.

    A0:: Register(REG_GPR | 10)
    A1:: Register(REG_GPR | 11)
    A2:: Register(REG_GPR | 12)
    A3:: Register(REG_GPR | 13)
    A4:: Register(REG_GPR | 14)
    A5:: Register(REG_GPR | 15)
    A6:: Register(REG_GPR | 16)
    A7:: Register(REG_GPR | 17)
    DEFAULT_PRINT_OPTIONS: rexcode_isa.Print_Options : isa.DEFAULT_PRINT_OPTIONS
    FA0:: Register(REG_FPR | 10)
    FA1:: Register(REG_FPR | 11)
    FA2:: Register(REG_FPR | 12)
    FA3:: Register(REG_FPR | 13)
    FA4:: Register(REG_FPR | 14)
    FA5:: Register(REG_FPR | 15)
    FA6:: Register(REG_FPR | 16)
    FA7:: Register(REG_FPR | 17)
    FP:: GPR(8)
    S0 doubles as frame pointer in the ABI
    FS0:: Register(REG_FPR | 8)
    FS1:: Register(REG_FPR | 9)
    FS10:: Register(REG_FPR | 26)
    FS11:: Register(REG_FPR | 27)
    FS2:: Register(REG_FPR | 18)
    FS3:: Register(REG_FPR | 19)
    FS4:: Register(REG_FPR | 20)
    FS5:: Register(REG_FPR | 21)
    FS6:: Register(REG_FPR | 22)
    FS7:: Register(REG_FPR | 23)
    FS8:: Register(REG_FPR | 24)
    FS9:: Register(REG_FPR | 25)
    FT0:: Register(REG_FPR | 0)
    FT1:: Register(REG_FPR | 1)
    FT10:: Register(REG_FPR | 30)
    FT11:: Register(REG_FPR | 31)
    FT2:: Register(REG_FPR | 2)
    FT3:: Register(REG_FPR | 3)
    FT4:: Register(REG_FPR | 4)
    FT5:: Register(REG_FPR | 5)
    FT6:: Register(REG_FPR | 6)
    FT7:: Register(REG_FPR | 7)
    FT8:: Register(REG_FPR | 28)
    FT9:: Register(REG_FPR | 29)
    GP:: Register(REG_GPR | 3)
    LABEL_UNDEFINED: rexcode_isa.Label_Definition : isa.LABEL_UNDEFINED
    MASK_… 16
    MASK_B: u32 : MASK_OPCODE | MASK_FUNCT3
    MASK_FUNCT3:: u32(0x00007000)
    bits 14-12
    MASK_FUNCT7:: u32(0xFE000000)
    bits 31-25
    MASK_I: u32 : MASK_OPCODE | MASK_FUNCT3
    MASK_IMM_I:: u32(0xFFF00000)
    bits 31-20
    MASK_I_SHIFT: u32 : MASK_OPCODE | MASK_FUNCT3 | (MASK_FUNCT7 &~ MASK_SHAMT6)
    ignore shamt
    MASK_J: u32 : MASK_OPCODE
    MASK_OPCODE:: u32(0x0000007F)
    Static field masks for handy reference in the table.
    MASK_R: u32 : MASK_OPCODE | MASK_FUNCT3 | MASK_FUNCT7
    Convenience composites
    MASK_RD:: u32(0x00000F80)
    bits 11-7
    MASK_RS1:: u32(0x000F8000)
    bits 19-15
    MASK_RS2:: u32(0x01F00000)
    bits 24-20
    MASK_S: u32 : MASK_OPCODE | MASK_FUNCT3
    MASK_SHAMT5:: u32(0x01F00000)
    bits 24-20
    MASK_SHAMT6:: u32(0x03F00000)
    bits 25-20 (RV64)
    MASK_U: u32 : MASK_OPCODE
    MAX_INST_SIZE:: 4
    NONE:: Register(0xFFFF)
    RA:: Register(REG_GPR | 1)
    REG_… 3
    REG_FPR:: 0x0200
    f0..f31
    REG_GPR:: 0x0100
    x0..x31
    REG_NONE:: 0x0000
    S0:: Register(REG_GPR | 8)
    S1:: Register(REG_GPR | 9)
    S10:: Register(REG_GPR | 26)
    S11:: Register(REG_GPR | 27)
    S2:: Register(REG_GPR | 18)
    S3:: Register(REG_GPR | 19)
    S4:: Register(REG_GPR | 20)
    S5:: Register(REG_GPR | 21)
    S6:: Register(REG_GPR | 22)
    S7:: Register(REG_GPR | 23)
    S8:: Register(REG_GPR | 24)
    S9:: Register(REG_GPR | 25)
    SP:: Register(REG_GPR | 2)
    T0:: Register(REG_GPR | 5)
    T1:: Register(REG_GPR | 6)
    T2:: Register(REG_GPR | 7)
    T3:: Register(REG_GPR | 28)
    T4:: Register(REG_GPR | 29)
    T5:: Register(REG_GPR | 30)
    T6:: Register(REG_GPR | 31)
    TP:: Register(REG_GPR | 4)
    ZERO:: Register(REG_GPR | 0)

    Variables

    CLOBBER_FORMS ¶

    @(rodata)
    CLOBBER_FORMS: []Clobber = …

    DECODE_ENTRIES ¶

    @(rodata)
    DECODE_ENTRIES: []Decode_Entry = …

    DECODE_INDEX_OPCODE ¶

    @(rodata)
    DECODE_INDEX_OPCODE: []Decode_Index = …

    DECODE_INDEX_OP_FP ¶

    @(rodata)
    DECODE_INDEX_OP_FP: []Decode_Index = …

    DECODE_INDEX_RVC ¶

    @(rodata)
    DECODE_INDEX_RVC: []Decode_Index = …

    ENCODE_FORMS ¶

    @(rodata)
    ENCODE_FORMS: []Encoding = …

    ENCODE_RUNS ¶

    @(rodata)
    ENCODE_RUNS: []Encode_Run = …

    Procedures

    One row per procedure; each is a proc "contextless" unless it says otherwise.

    aprintproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string
    aprintlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string
    bprintproc(buf: []u8, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    bprintlnproc(buf: []u8, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    decodeproc(data: []u8, relocs: []Relocation, instructions: ^[dynamic]Instruction, inst_info: ^[dynamic]Instruction_Info, label_defs: ^[dynamic]rexcode_isa.Label_Definition, errors: ^[dynamic]rexcode_isa.Error, xlen: XLEN = .RV64) -> (byte_count: u32, ok: bool)
    decode_estimate_instruction_count(data: []u8) -> int
    Typical-case estimate of the instruction count for data.

    Typical-case estimate of the instruction count for data.

    decode_max_instruction_count(data: []u8) -> int
    Instruction-count ceiling for data (base is 4 bytes, compressed (C) 2; minimum 2).

    Instruction-count ceiling for data (base is 4 bytes, compressed (C) 2; minimum 2).

    decode_reserveproc(instructions: ^[dynamic]Instruction, inst_info: ^[dynamic]Instruction_Info, label_defs: ^[dynamic]rexcode_isa.Label_Definition, data: []u8, exact: bool = false)
    Pre-size the caller's decode output arrays for data (reserves on top of any existing elements; nil to skip; exact=true for the ceiling, else the estimate).

    Pre-size the caller's decode output arrays for data (reserves on top of any existing elements; nil to skip; exact=true for the ceiling, else the estimate).

    emit_addproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_add_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_add_uwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_add_uw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_addiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_addi_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_addiwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_addiw_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_addwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_addw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_amoadd_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoadd_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoadd_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoadd_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoand_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoand_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoand_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoand_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomax_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomax_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomax_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomax_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomaxu_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomaxu_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomaxu_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomaxu_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomin_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomin_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomin_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amomin_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amominu_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amominu_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amominu_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amominu_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoor_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoor_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoor_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoor_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoswap_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoswap_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoswap_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoswap_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoxor_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoxor_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoxor_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_amoxor_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_andproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_and_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_andiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_andi_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_andnproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_andn_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_auipcproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_auipc_gpr_imm20proc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_bclrproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bclr_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bclriproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_bclri_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_beqproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_beq_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bextproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bext_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bextiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_bexti_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_bgeproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bge_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bgeuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bgeu_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_binvproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_binv_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_binviproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_binvi_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_bltproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_blt_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bltuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bltu_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bneproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bne_gpr_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, label: u32)
    emit_bsetproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bset_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_bsetiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_bseti_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_c_addproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_add_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_addiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addi16spproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addi16sp_gpr_imm10sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addi4spnproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_c_addi4spn_gpr_gpr_imm8uproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_c_addi_gpr_imm6sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addiwproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addiw_gpr_imm6sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_addwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_addw_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_andproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_and_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_andiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_andi_gpr_imm6sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_beqzproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_c_beqz_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_c_bnezproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_c_bnez_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_c_ebreakproc(instructions: ^[dynamic]Instruction)
    emit_c_ebreak_noneproc(instructions: ^[dynamic]Instruction)
    emit_c_fldproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fld_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fldspproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fldsp_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_flwproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_flw_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_flwspproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_flwsp_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fsdproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fsd_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fsdspproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fsdsp_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fswproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fsw_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fswspproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_fswsp_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_c_jproc(instructions: ^[dynamic]Instruction, label: u32)
    emit_c_j_labelproc(instructions: ^[dynamic]Instruction, label: u32)
    emit_c_jalproc(instructions: ^[dynamic]Instruction, label: u32)
    emit_c_jal_labelproc(instructions: ^[dynamic]Instruction, label: u32)
    emit_c_jalrproc(instructions: ^[dynamic]Instruction, rd: GPR)
    emit_c_jalr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR)
    emit_c_jrproc(instructions: ^[dynamic]Instruction, rd: GPR)
    emit_c_jr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR)
    emit_c_ldproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_ld_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_ldspproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_ldsp_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_liproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_li_gpr_imm6sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_luiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_lui_gpr_imm18sproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_lwproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_lw_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_lwspproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_lwsp_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_mvproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_mv_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_nopproc(instructions: ^[dynamic]Instruction)
    emit_c_nop_noneproc(instructions: ^[dynamic]Instruction)
    emit_c_orproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_or_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_sdproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_sd_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_sdspproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_sdsp_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_slliproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_slli_gpr_imm6uproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_sraiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_srai_gpr_imm6uproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_srliproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_srli_gpr_imm6uproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_c_subproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_sub_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_subwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_subw_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_swproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_sw_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_swspproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_swsp_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_c_xorproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_c_xor_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_clmulproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clmul_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clmulhproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clmulh_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clmulrproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clmulr_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_clzproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_clz_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_clzwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_clzw_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_cpopproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_cpop_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_cpopwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_cpopw_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_csrrcproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrc_gpr_csr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrciproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_csrrci_gpr_csr_zimm5proc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_csrrsproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrs_gpr_csr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrsiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_csrrsi_gpr_csr_zimm5proc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_csrrwproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrw_gpr_csr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, rs1: GPR)
    emit_csrrwiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_csrrwi_gpr_csr_zimm5proc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64, imm2: i64)
    emit_ctzproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_ctz_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_ctzwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_ctzw_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_czero_eqzproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_czero_eqz_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_czero_nezproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_czero_nez_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_div_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divuwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divuw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_divw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_ebreakproc(instructions: ^[dynamic]Instruction)
    emit_ebreak_noneproc(instructions: ^[dynamic]Instruction)
    emit_ecallproc(instructions: ^[dynamic]Instruction)
    emit_ecall_noneproc(instructions: ^[dynamic]Instruction)
    emit_fadd_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fadd_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fadd_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fadd_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fadd_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fadd_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fclass_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fclass_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fclass_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fclass_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fclass_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fclass_s_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_d_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_d_h_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_d_lproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_l_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_luproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_lu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_d_s_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_d_wproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_w_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_wuproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_d_wu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_h_d_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_h_lproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_l_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_luproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_lu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_h_s_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_h_wproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_w_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_wuproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_h_wu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_l_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_l_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_l_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_l_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_l_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_l_s_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_lu_s_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_s_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_s_d_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_s_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_s_h_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fcvt_s_lproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_l_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_luproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_lu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_wproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_w_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_wuproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_s_wu_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fcvt_w_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_w_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_w_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_w_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_w_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_w_s_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fcvt_wu_s_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fdiv_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fdiv_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fdiv_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fdiv_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fdiv_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fdiv_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fenceproc(instructions: ^[dynamic]Instruction, imm: i64, imm2: i64)
    emit_fence_fence_fenceproc(instructions: ^[dynamic]Instruction, imm: i64, imm2: i64)
    emit_fence_iproc(instructions: ^[dynamic]Instruction)
    emit_fence_i_noneproc(instructions: ^[dynamic]Instruction)
    emit_feq_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_feq_d_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_feq_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_feq_h_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_feq_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_feq_s_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fldproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fld_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fle_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fle_d_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fle_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fle_h_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fle_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_fle_s_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flhproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_flh_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_flt_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flt_d_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flt_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flt_h_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flt_sproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flt_s_gpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR, rs2: FPR)
    emit_flwproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_flw_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fmadd_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmadd_d_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmadd_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmadd_h_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmadd_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmadd_s_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmax_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmax_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmax_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmax_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmax_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmax_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmin_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmsub_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmsub_d_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmsub_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmsub_h_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmsub_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmsub_s_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fmul_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmul_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmul_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmul_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmul_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmul_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fmv_d_xproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_d_x_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_h_xproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_h_x_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_w_xproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_w_x_fpr_gprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: GPR)
    emit_fmv_x_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fmv_x_d_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fmv_x_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fmv_x_h_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fmv_x_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fmv_x_w_gpr_fprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: FPR)
    emit_fnmadd_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmadd_d_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmadd_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmadd_h_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmadd_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmadd_s_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_d_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_h_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fnmsub_s_fpr_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR)
    emit_fsdproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fsd_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fsgnj_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnj_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnj_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnj_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnj_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnj_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjn_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsgnjx_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fshproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fsh_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fsqrt_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsqrt_d_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsqrt_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsqrt_h_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsqrt_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsqrt_s_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR)
    emit_fsub_dproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsub_d_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsub_hproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsub_h_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsub_sproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fsub_s_fpr_fpr_fprproc(instructions: ^[dynamic]Instruction, rd: FPR, rs1: FPR, rs2: FPR)
    emit_fswproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_fsw_fpr_memproc(instructions: ^[dynamic]Instruction, rd: FPR, mem: Memory)
    emit_jalproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_jal_gpr_labelproc(instructions: ^[dynamic]Instruction, rd: GPR, label: u32)
    emit_jalrproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_jalr_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_lbproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lb_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lbuproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lbu_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_ldproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_ld_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lhproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lh_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lhuproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lhu_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lr_dproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lr_d_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lr_wproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lr_w_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_luiproc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_lui_gpr_imm20proc(instructions: ^[dynamic]Instruction, rd: GPR, imm: i64)
    emit_lwproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lw_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lwuproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_lwu_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_maxproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_max_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_maxuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_maxu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_minproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_min_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_minuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_minu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mretproc(instructions: ^[dynamic]Instruction)
    emit_mret_noneproc(instructions: ^[dynamic]Instruction)
    emit_mulproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mul_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulhproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulh_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulhsuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulhsu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulhuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulhu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_mulw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_orproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_or_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_orc_bproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_orc_b_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_oriproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_ori_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_ornproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_orn_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rem_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remuwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remuw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_remw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rev8proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_rev8_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_rolproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rol_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rolwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rolw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rorproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_ror_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_roriproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_rori_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_roriwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_roriw_gpr_gpr_imm5proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_rorwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_rorw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sbproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sb_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sc_dproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_sc_d_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_sc_wproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_sc_w_gpr_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, mem: Memory)
    emit_sdproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sd_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sext_bproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_sext_b_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_sext_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_sext_h_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_sfence_vmaproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_sfence_vma_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_shproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sh1addproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh1add_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh1add_uwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh1add_uw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh2addproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh2add_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh2add_uwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh2add_uw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh3addproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh3add_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh3add_uwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh3add_uw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sh_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sllproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sll_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_slliproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slli_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slli_uwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slli_uw_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slliwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slliw_gpr_gpr_imm5proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sllwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sllw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sltproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_slt_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sltiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_slti_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sltiuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sltiu_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sltuproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sltu_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sraproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sra_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sraiproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srai_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sraiwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_sraiw_gpr_gpr_imm5proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srawproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sraw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sretproc(instructions: ^[dynamic]Instruction)
    emit_sret_noneproc(instructions: ^[dynamic]Instruction)
    emit_srlproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_srl_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_srliproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srli_gpr_gpr_imm6proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srliwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srliw_gpr_gpr_imm5proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_srlwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_srlw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_subproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_sub_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_subwproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_subw_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_swproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_sw_gpr_memproc(instructions: ^[dynamic]Instruction, rd: GPR, mem: Memory)
    emit_wfiproc(instructions: ^[dynamic]Instruction)
    emit_wfi_noneproc(instructions: ^[dynamic]Instruction)
    emit_xnorproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_xnor_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_xorproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_xor_gpr_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, rs2: GPR)
    emit_xoriproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_xori_gpr_gpr_imm12proc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR, imm: i64)
    emit_zext_hproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    emit_zext_h_gpr_gprproc(instructions: ^[dynamic]Instruction, rd: GPR, rs1: GPR)
    encodeproc(instructions: []Instruction, label_defs: []rexcode_isa.Label_Definition, code: []u8, relocs: ^[dynamic]Relocation, errors: ^[dynamic]rexcode_isa.Error, resolve: bool = true, base_address: u64 = 0, xlen: XLEN = .RV64) -> (byte_count: u32, ok: bool)
    encode_max_code_size(instructions: []Instruction) -> int
    encode_max_relocation_count(instructions: []Instruction) -> int
    encode_reserveproc(code: ^[dynamic]u8, relocs: ^[dynamic]Relocation, instructions: []Instruction)
    Pre-size the caller's encode outputs (code grown by length so code[:] is a valid emit target; relocs reserved by capacity) so the encode hot path never…

    Pre-size the caller's encode outputs (code grown by length so code[:] is a valid emit target; relocs reserved by capacity) so the encode hot path never reallocates. Allocates no new buffers; pass nil to skip either array.

    fpr_from_num(n: u8) -> Register
    fprintproc(fd: ^os.File, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    fprintlnproc(fd: ^os.File, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    gpr_from_num(n: u8) -> Register
    inst_add(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_add_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_add_uw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_add_uw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_addi(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_addi_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_addiw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_addiw_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_addw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_addw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_amoadd_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoadd_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoadd_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoadd_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoand_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoand_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoand_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoand_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomax_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomax_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomax_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomax_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomaxu_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomaxu_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomaxu_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomaxu_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomin_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomin_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomin_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amomin_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amominu_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amominu_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amominu_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amominu_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoor_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoor_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoor_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoor_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoswap_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoswap_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoswap_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoswap_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoxor_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoxor_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoxor_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_amoxor_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_and(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_and_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_andi(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_andi_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_andn(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_andn_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_auipc(rd: GPR, imm: i64) -> Instruction
    inst_auipc_gpr_imm20(rd: GPR, imm: i64) -> Instruction
    inst_bclr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bclr_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bclri(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_bclri_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_beq(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_beq_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bext(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bext_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bexti(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_bexti_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_bge(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bge_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bgeu(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bgeu_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_binv(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_binv_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_binvi(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_binvi_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_blt(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_blt_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bltu(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bltu_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bne(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_bne_gpr_gpr_label(rd: GPR, rs1: GPR, label: u32) -> Instruction
    inst_branch(m: Mnemonic, rs1, rs2: Register, label_id: u32) -> Instruction
    B-type branch: rs1, rs2, label
    inst_bset(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bset_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_bseti(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_bseti_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_c_add(rd: GPR, rs1: GPR) -> Instruction
    inst_c_add_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_addi(rd: GPR, imm: i64) -> Instruction
    inst_c_addi16sp(rd: GPR, imm: i64) -> Instruction
    inst_c_addi16sp_gpr_imm10s(rd: GPR, imm: i64) -> Instruction
    inst_c_addi4spn(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_c_addi4spn_gpr_gpr_imm8u(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_c_addi_gpr_imm6s(rd: GPR, imm: i64) -> Instruction
    inst_c_addiw(rd: GPR, imm: i64) -> Instruction
    inst_c_addiw_gpr_imm6s(rd: GPR, imm: i64) -> Instruction
    inst_c_addw(rd: GPR, rs1: GPR) -> Instruction
    inst_c_addw_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_and(rd: GPR, rs1: GPR) -> Instruction
    inst_c_and_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_andi(rd: GPR, imm: i64) -> Instruction
    inst_c_andi_gpr_imm6s(rd: GPR, imm: i64) -> Instruction
    inst_c_beqz(rd: GPR, label: u32) -> Instruction
    inst_c_beqz_gpr_label(rd: GPR, label: u32) -> Instruction
    inst_c_bnez(rd: GPR, label: u32) -> Instruction
    inst_c_bnez_gpr_label(rd: GPR, label: u32) -> Instruction
    inst_c_ebreak() -> Instruction
    inst_c_ebreak_none() -> Instruction
    inst_c_fld(rd: FPR, mem: Memory) -> Instruction
    inst_c_fld_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_fldsp(rd: FPR, mem: Memory) -> Instruction
    inst_c_fldsp_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_flw(rd: FPR, mem: Memory) -> Instruction
    inst_c_flw_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_flwsp(rd: FPR, mem: Memory) -> Instruction
    inst_c_flwsp_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsd(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsd_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsdsp(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsdsp_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsw(rd: FPR, mem: Memory) -> Instruction
    inst_c_fsw_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_fswsp(rd: FPR, mem: Memory) -> Instruction
    inst_c_fswsp_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_c_j(label: u32) -> Instruction
    inst_c_j_label(label: u32) -> Instruction
    inst_c_jal(label: u32) -> Instruction
    inst_c_jal_label(label: u32) -> Instruction
    inst_c_jalr(rd: GPR) -> Instruction
    inst_c_jalr_gpr(rd: GPR) -> Instruction
    inst_c_jr(rd: GPR) -> Instruction
    inst_c_jr_gpr(rd: GPR) -> Instruction
    inst_c_ld(rd: GPR, mem: Memory) -> Instruction
    inst_c_ld_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_ldsp(rd: GPR, mem: Memory) -> Instruction
    inst_c_ldsp_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_li(rd: GPR, imm: i64) -> Instruction
    inst_c_li_gpr_imm6s(rd: GPR, imm: i64) -> Instruction
    inst_c_lui(rd: GPR, imm: i64) -> Instruction
    inst_c_lui_gpr_imm18s(rd: GPR, imm: i64) -> Instruction
    inst_c_lw(rd: GPR, mem: Memory) -> Instruction
    inst_c_lw_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_lwsp(rd: GPR, mem: Memory) -> Instruction
    inst_c_lwsp_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_mv(rd: GPR, rs1: GPR) -> Instruction
    inst_c_mv_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_nop() -> Instruction
    inst_c_nop_none() -> Instruction
    inst_c_or(rd: GPR, rs1: GPR) -> Instruction
    inst_c_or_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_sd(rd: GPR, mem: Memory) -> Instruction
    inst_c_sd_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_sdsp(rd: GPR, mem: Memory) -> Instruction
    inst_c_sdsp_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_slli(rd: GPR, imm: i64) -> Instruction
    inst_c_slli_gpr_imm6u(rd: GPR, imm: i64) -> Instruction
    inst_c_srai(rd: GPR, imm: i64) -> Instruction
    inst_c_srai_gpr_imm6u(rd: GPR, imm: i64) -> Instruction
    inst_c_srli(rd: GPR, imm: i64) -> Instruction
    inst_c_srli_gpr_imm6u(rd: GPR, imm: i64) -> Instruction
    inst_c_sub(rd: GPR, rs1: GPR) -> Instruction
    inst_c_sub_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_subw(rd: GPR, rs1: GPR) -> Instruction
    inst_c_subw_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_c_sw(rd: GPR, mem: Memory) -> Instruction
    inst_c_sw_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_swsp(rd: GPR, mem: Memory) -> Instruction
    inst_c_swsp_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_c_xor(rd: GPR, rs1: GPR) -> Instruction
    inst_c_xor_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_clmul(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clmul_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clmulh(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clmulh_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clmulr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clmulr_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_clz(rd: GPR, rs1: GPR) -> Instruction
    inst_clz_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_clzw(rd: GPR, rs1: GPR) -> Instruction
    inst_clzw_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_cpop(rd: GPR, rs1: GPR) -> Instruction
    inst_cpop_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_cpopw(rd: GPR, rs1: GPR) -> Instruction
    inst_cpopw_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_csr(m: Mnemonic, rd: Register, csr: u16, rs1: Register) -> Instruction
    CSR ops: rd, csr, rs1
    inst_csr_i(m: Mnemonic, rd: Register, csr: u16, zimm5: u8) -> Instruction
    CSR immediate ops: rd, csr, zimm5
    inst_csrrc(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrc_gpr_csr_gpr(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrci(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_csrrci_gpr_csr_zimm5(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_csrrs(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrs_gpr_csr_gpr(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrsi(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_csrrsi_gpr_csr_zimm5(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_csrrw(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrw_gpr_csr_gpr(rd: GPR, imm: i64, rs1: GPR) -> Instruction
    inst_csrrwi(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_csrrwi_gpr_csr_zimm5(rd: GPR, imm: i64, imm2: i64) -> Instruction
    inst_ctz(rd: GPR, rs1: GPR) -> Instruction
    inst_ctz_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_ctzw(rd: GPR, rs1: GPR) -> Instruction
    inst_ctzw_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_czero_eqz(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_czero_eqz_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_czero_nez(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_czero_nez_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_div(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_div_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divuw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divuw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_divw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_ebreak() -> Instruction
    inst_ebreak_none() -> Instruction
    inst_ecall() -> Instruction
    inst_ecall_none() -> Instruction
    inst_fadd_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fadd_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fadd_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fadd_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fadd_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fadd_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fclass_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fclass_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fclass_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fclass_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fclass_s(rd: GPR, rs1: FPR) -> Instruction
    inst_fclass_s_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_d_h(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_d_h_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_d_l(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_l_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_lu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_lu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_s(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_d_s_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_d_w(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_w_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_wu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_d_wu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_d(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_h_d_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_h_l(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_l_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_lu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_lu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_s(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_h_s_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_h_w(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_w_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_wu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_h_wu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_l_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_l_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_l_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_l_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_l_s(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_l_s_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_s(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_lu_s_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_s_d(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_s_d_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_s_h(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_s_h_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fcvt_s_l(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_l_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_lu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_lu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_w(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_w_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_wu(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_s_wu_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fcvt_w_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_w_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_w_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_w_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_w_s(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_w_s_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_s(rd: GPR, rs1: FPR) -> Instruction
    inst_fcvt_wu_s_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fdiv_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fdiv_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fdiv_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fdiv_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fdiv_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fdiv_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fence(imm: i64, imm2: i64) -> Instruction
    inst_fence_fence_fence(imm: i64, imm2: i64) -> Instruction
    inst_fence_i() -> Instruction
    inst_fence_i_none() -> Instruction
    inst_feq_d(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_feq_d_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_feq_h(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_feq_h_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_feq_s(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_feq_s_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fld(rd: FPR, mem: Memory) -> Instruction
    inst_fld_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_fle_d(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fle_d_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fle_h(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fle_h_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fle_s(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fle_s_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flh(rd: FPR, mem: Memory) -> Instruction
    inst_flh_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_flt_d(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flt_d_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flt_h(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flt_h_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flt_s(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flt_s_gpr_fpr_fpr(rd: GPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_flw(rd: FPR, mem: Memory) -> Instruction
    inst_flw_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_fmadd_d(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmadd_d_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmadd_h(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmadd_h_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmadd_s(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmadd_s_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmax_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmax_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmax_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmax_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmax_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmax_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmin_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmsub_d(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmsub_d_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmsub_h(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmsub_h_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmsub_s(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmsub_s_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fmul_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmul_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmul_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmul_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmul_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmul_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fmv_d_x(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_d_x_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_h_x(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_h_x_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_w_x(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_w_x_fpr_gpr(rd: FPR, rs1: GPR) -> Instruction
    inst_fmv_x_d(rd: GPR, rs1: FPR) -> Instruction
    inst_fmv_x_d_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fmv_x_h(rd: GPR, rs1: FPR) -> Instruction
    inst_fmv_x_h_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fmv_x_w(rd: GPR, rs1: FPR) -> Instruction
    inst_fmv_x_w_gpr_fpr(rd: GPR, rs1: FPR) -> Instruction
    inst_fnmadd_d(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmadd_d_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmadd_h(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmadd_h_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmadd_s(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmadd_s_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_d(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_d_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_h(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_h_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_s(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fnmsub_s_fpr_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR, rs3: FPR) -> Instruction
    inst_fsd(rd: FPR, mem: Memory) -> Instruction
    inst_fsd_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_fsgnj_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnj_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnj_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnj_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnj_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnj_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjn_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsgnjx_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsh(rd: FPR, mem: Memory) -> Instruction
    inst_fsh_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_fsqrt_d(rd: FPR, rs1: FPR) -> Instruction
    inst_fsqrt_d_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fsqrt_h(rd: FPR, rs1: FPR) -> Instruction
    inst_fsqrt_h_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fsqrt_s(rd: FPR, rs1: FPR) -> Instruction
    inst_fsqrt_s_fpr_fpr(rd: FPR, rs1: FPR) -> Instruction
    inst_fsub_d(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsub_d_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsub_h(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsub_h_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsub_s(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsub_s_fpr_fpr_fpr(rd: FPR, rs1: FPR, rs2: FPR) -> Instruction
    inst_fsw(rd: FPR, mem: Memory) -> Instruction
    inst_fsw_fpr_mem(rd: FPR, mem: Memory) -> Instruction
    inst_jal(rd: GPR, label: u32) -> Instruction
    inst_jal_gpr_label(rd: GPR, label: u32) -> Instruction
    inst_jalr(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_jalr_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_lb(rd: GPR, mem: Memory) -> Instruction
    inst_lb_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lbu(rd: GPR, mem: Memory) -> Instruction
    inst_lbu_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_ld(rd: GPR, mem: Memory) -> Instruction
    inst_ld_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lh(rd: GPR, mem: Memory) -> Instruction
    inst_lh_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lhu(rd: GPR, mem: Memory) -> Instruction
    inst_lhu_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_load(m: Mnemonic, rd: Register, mm: Memory) -> Instruction
    I-type load: rd, disp(base)
    inst_lr_d(rd: GPR, mem: Memory) -> Instruction
    inst_lr_d_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lr_w(rd: GPR, mem: Memory) -> Instruction
    inst_lr_w_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lui(rd: GPR, imm: i64) -> Instruction
    inst_lui_gpr_imm20(rd: GPR, imm: i64) -> Instruction
    inst_lw(rd: GPR, mem: Memory) -> Instruction
    inst_lw_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_lwu(rd: GPR, mem: Memory) -> Instruction
    inst_lwu_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_max(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_max_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_maxu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_maxu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_min(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_min_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_minu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_minu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mret() -> Instruction
    inst_mret_none() -> Instruction
    inst_mul(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mul_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulh(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulh_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulhsu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulhsu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulhu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulhu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_mulw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_none(m: Mnemonic) -> Instruction
    inst_or(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_or_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_orc_b(rd: GPR, rs1: GPR) -> Instruction
    inst_orc_b_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_ori(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_ori_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_orn(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_orn_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_r4(m: Mnemonic, rd, rs1, rs2, rs3: Register) -> Instruction
    FP R4-type: rd, rs1, rs2, rs3 (FMADD/FMSUB/FNMADD/FNMSUB)
    inst_r_r(m: Mnemonic, rd, rs1: Register) -> Instruction
    FP R-type with 2 regs: rd, rs1 (FSQRT, FCVT, FMV, FCLASS, ...)
    inst_r_r_i(m: Mnemonic, rd, rs1: Register, imm: i64) -> Instruction
    I-type (ALU): rd, rs1, imm12
    inst_r_r_r(m: Mnemonic, rd, rs1, rs2: Register) -> Instruction
    R-type: rd, rs1, rs2
    inst_rem(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rem_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remuw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remuw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_remw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rev8(rd: GPR, rs1: GPR) -> Instruction
    inst_rev8_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_rol(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rol_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rolw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rolw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_ror(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_ror_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rori(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_rori_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_roriw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_roriw_gpr_gpr_imm5(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_rorw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_rorw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sb(rd: GPR, mem: Memory) -> Instruction
    inst_sb_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_sc_d(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_sc_d_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_sc_w(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_sc_w_gpr_gpr_mem(rd: GPR, rs1: GPR, mem: Memory) -> Instruction
    inst_sd(rd: GPR, mem: Memory) -> Instruction
    inst_sd_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_sext_b(rd: GPR, rs1: GPR) -> Instruction
    inst_sext_b_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_sext_h(rd: GPR, rs1: GPR) -> Instruction
    inst_sext_h_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_sfence_vma(rd: GPR, rs1: GPR) -> Instruction
    inst_sfence_vma_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    inst_sh(rd: GPR, mem: Memory) -> Instruction
    inst_sh1add(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh1add_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh1add_uw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh1add_uw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh2add(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh2add_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh2add_uw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh2add_uw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh3add(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh3add_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh3add_uw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh3add_uw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sh_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_shift(m: Mnemonic, rd, rs1: Register, shamt: u8) -> Instruction
    I-type (shift): rd, rs1, shamt
    inst_size_from_bits(bits: u32) -> u8
    inst_size_from_bits returns 2 for compressed (RVC) instructions, 4 for the standard 32-bit base ISA.

    inst_size_from_bits returns 2 for compressed (RVC) instructions, 4 for the standard 32-bit base ISA. RISC-V uses a length-encoding convention where the low 2 bits of the first halfword identify the instruction length: 11 = 32-bit (the standard base ISA), anything else = 16-bit (compressed).

    inst_sll(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sll_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_slli(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slli_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slli_uw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slli_uw_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slliw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slliw_gpr_gpr_imm5(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sllw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sllw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_slt(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_slt_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_slti(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_slti_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sltiu(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sltiu_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sltu(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sltu_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sra(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sra_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_srai(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_srai_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sraiw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sraiw_gpr_gpr_imm5(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_sraw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sraw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sret() -> Instruction
    inst_sret_none() -> Instruction
    inst_srl(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_srl_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_srli(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_srli_gpr_gpr_imm6(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_srliw(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_srliw_gpr_gpr_imm5(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_srlw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_srlw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_store(m: Mnemonic, rs2: Register, mm: Memory) -> Instruction
    S-type store: rs2 (data), disp(base)
    inst_sub(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sub_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_subw(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_subw_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_sw(rd: GPR, mem: Memory) -> Instruction
    inst_sw_gpr_mem(rd: GPR, mem: Memory) -> Instruction
    inst_u(m: Mnemonic, rd: Register, imm: i64) -> Instruction
    U-type: rd, imm20
    inst_wfi() -> Instruction
    inst_wfi_none() -> Instruction
    inst_xnor(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_xnor_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_xor(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_xor_gpr_gpr_gpr(rd: GPR, rs1: GPR, rs2: GPR) -> Instruction
    inst_xori(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_xori_gpr_gpr_imm12(rd: GPR, rs1: GPR, imm: i64) -> Instruction
    inst_zext_h(rd: GPR, rs1: GPR) -> Instruction
    inst_zext_h_gpr_gpr(rd: GPR, rs1: GPR) -> Instruction
    is_implicit_op_inline(op: Operand_Type) -> bool
    mem(base: Register, disp: i32) -> Memory
    mnemonic_to_stringproc(m: Mnemonic, lowercase: bool = true, allocator := context.temp_allocator) -> string
    op_fpr(f: FPR) -> Operand
    op_gpr(g: GPR) -> Operand
    Typed constructors
    op_imm(v: i64, size: u8) -> Operand
    op_label(label_id: u32, size: u8 = 2) -> Operand
    op_mem(m: Memory) -> Operand
    op_reg(r: Register) -> Operand
    op_rel_offset(off: i64) -> Operand
    printproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    printlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    reg_class(r: Register) -> u16
    reg_hw(r: Register) -> u8
    reg_is_fpr(r: Register) -> bool
    reg_is_gpr(r: Register) -> bool
    register_nameproc(r: Register, lowercase: bool = true, allocator := context.temp_allocator) -> string
    sbprintproc(sb: ^strings.Builder, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    sbprintlnproc(sb: ^strings.Builder, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    tprintproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    tprintlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    wprintproc(w: io.Stream, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    wprintlnproc(w: io.Stream, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-10 00:25:51.511820200 +0000 UTC