You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
597 B
597 B
The CPU
The CPU emulates some RISC-V instructions:
- all loads/stores:
lb, lh, lw, lbu, lhu, sw, sh, sb
- supported arg format is either
rd, imm(reg)
orreg, reg, imm
- supported arg format is either
- all branch statements:
beq, bne, blt, bge, bltu, bgeu
- all jumps
j, jal, jalr, ret
- basic arithmetic:
add, addi, sub
(notlui, auipc
) - shifts:
sll, slli, srl, srli, sra, srai
scall, ecall, sbreak, ebreak
(boths
ande
version are the same instrcution)- compares (non immediate):
slt, sltu
, notslti, sltiu
- logiacl (non immediate):
and, or, xor
not (andi, ori, xori
)