Assembly
Assembly tokenization should be working completely. It knows what instructions the CPU implementation supports and parses based on them.
Instruction sets:
RV32I
Loads/Stores:
lb, lh, lw, lbu, lhu, sw, sh, sb(supported arg format is eitherrd, imm(reg)orrd, reg, imm)Branch statements:
beq, bne, blt, bge, bltu, bgeuJumps
j, jal, jalr, retBasic arithmetic:
add, addi, sub, lui, auipcShifts:
sll, slli, srl, srli, sra, sraiSyscall/Debugging:
scall, ecall, sbreak, ebreak(bothsandeversion are the same instruction)Compares:
slt, sltu, slti, sltiuLogical:
and, or, xor, andi, ori, xoriNot implemented:
fence, fence.i, rdcycle, rdcycleh, rdtime, rdtimeh, rdinstret, rdinstreth
RV32M
Multiplication:
mul, mulh, not implemented yet aremulhsu, mulhuDivision:
div, divu, rem, remu
Pseudo-ops
The following pseudo-ops are implemented as of yet:
.space <len>reversebytes of zero .ascii 'text'put text into memory.asciiz 'text'put text into memory (null terminated).section .<name>same as.<name>, see sections.set <name>, <value>to create a const symbol with a given value.global <name>mark symbol<name>as a global symbol. It is available from all loaded programs.align <bytes>currently a nop as cpu does not care about alignment as of now
Sections:
Currently only these three sections are supported:
dataread-write data (non-executable)rodataread-only data (non-executable)textexecutable data (read-only)