Fyntv Instruction Set Architecture

Reference Manual

Version: 0.0.0.1  |  Date: June 2026

Registers

RegisterABI NameDescriptionSaved
x0zeroAlways-zero register — reads return 0, writes are discardedNo
x1raReturn address link registerNo
x2spStack pointerYes
x3gpGlobal pointerYes
x4tpThread pointerYes
x5t0Temporary register 0No
x6t1Temporary register 1No
x7t2Temporary register 2No
x8s0Saved register 0 / frame pointerYes
x9s1Saved register 1Yes
x10a0Function argument 0 / return value 0No
x11a1Function argument 1 / return value 1No
x12a2Function argument 2No
x13a3Function argument 3No
x14a4Function argument 4No
x15a5Function argument 5No
x16a6Function argument 6No
x17a7Function argument 7No
x18s2Saved register 2Yes
x19s3Saved register 3Yes
x20s4Saved register 4Yes
x21s5Saved register 5Yes
x22s6Saved register 6Yes
x23s7Saved register 7Yes
x24s8Saved register 8Yes
x25s9Saved register 9Yes
x26s10Saved register 10Yes
x27s11Saved register 11Yes
x28t3Temporary register 3No
x29t4Temporary register 4No
x30t5Temporary register 5No
x31t6Temporary register 6No

Instruction Set

MnemonicFormatOpcodeOperandsDescription
ADDR0x33rd, rs1, rs2Add registers
SUBR0x33rd, rs1, rs2Subtract registers
ADDII0x13rd, rs1, imm12Add sign-extended 12-bit immediate to register rs1
SLTR0x33rd, rs1, rs2Set if rs1 is less than rs2 (signed)
SLTUR0x33rd, rs1, rs2Set if rs1 is less than rs2 (unsigned)
SLTII0x13rd, rs1, imm12Set if rs1 is less than immediate (signed)
SLTIUI0x13rd, rs1, imm12Set if rs1 is less than immediate (unsigned)
LUIU0x37rd, imm20Load upper immediate — places 20-bit immediate in upper 20 bits of rd
AUIPCU0x17rd, imm20Add upper immediate to PC — forms PC-relative address
ANDR0x33rd, rs1, rs2Bitwise AND
ORR0x33rd, rs1, rs2Bitwise OR
XORR0x33rd, rs1, rs2Bitwise XOR
ANDII0x13rd, rs1, imm12Bitwise AND with immediate
ORII0x13rd, rs1, imm12Bitwise OR with immediate
XORII0x13rd, rs1, imm12Bitwise XOR with immediate
SLLR0x33rd, rs1, rs2Logical left shift by lower 5 bits of rs2
SRLR0x33rd, rs1, rs2Logical right shift by lower 5 bits of rs2
SRAR0x33rd, rs1, rs2Arithmetic right shift by lower 5 bits of rs2
SLLII0x13rd, rs1, shamt5Logical left shift by immediate shift amount
SRLII0x13rd, rs1, shamt5Logical right shift by immediate shift amount
SRAII0x13rd, rs1, shamt5Arithmetic right shift by immediate shift amount
LBI0x03rd, offset(rs1)Load byte (sign-extended)
LHI0x03rd, offset(rs1)Load halfword (sign-extended)
LWI0x03rd, offset(rs1)Load word
LBUI0x03rd, offset(rs1)Load byte (zero-extended)
LHUI0x03rd, offset(rs1)Load halfword (zero-extended)
SBS0x23rs2, offset(rs1)Store byte
SHS0x23rs2, offset(rs1)Store halfword
SWS0x23rs2, offset(rs1)Store word
BEQB0x63rs1, rs2, labelBranch equal
BNEB0x63rs1, rs2, labelBranch not equal
BLTB0x63rs1, rs2, labelBranch less than (signed)
BGEB0x63rs1, rs2, labelBranch greater than or equal (signed)
BLTUB0x63rs1, rs2, labelBranch less than (unsigned)
BGEUB0x63rs1, rs2, labelBranch greater than or equal (unsigned)
JALJ0x6Frd, labelJump and link — jump to PC+offset, save return address to rd
JALRI0x67rd, rs1, offsetJump and link register — jump to rs1+offset, save return address
FENCEI0x0Fpred, succMemory ordering fence
FENCEII0x0FInstruction fence — synchronizes instruction and data streams
ECALLI0x73Environment call — raises a system call exception
EBREAKI0x73Breakpoint — raises a breakpoint exception
CSRRWI0x73rd, csr, rs1Atomic read/write CSR — writes rs1 to CSR, returns old value in rd
CSRRSI0x73rd, csr, rs1Atomic read and set bits in CSR
CSRRCI0x73rd, csr, rs1Atomic read and clear bits in CSR
CSRRWII0x73rd, csr, uimm5Atomic read/write CSR with immediate
CSRRSII0x73rd, csr, uimm5Atomic read and set bits in CSR with immediate
CSRRCII0x73rd, csr, uimm5Atomic read and clear bits in CSR with immediate