Right now the parser in zkir-assembler/src/parser.rs only handles 3 instructions (ecall, ebreak, halt). Everything else is missing. Need to add all the R-type instructions (add, sub, mul, div, and, or, xor, sll, srl, sra, slt, sltu), I-type ALU stuff (addi, andi, ori, xori, slli, srli, srai, slti, sltiu), I-type loads (lb, lh, lw, lbu, lhu), S-type stores (sb, sh, sw), B-type branches (beq, bne, blt, bge, bltu, bgeu), J-type jumps (jal, jalr), U-type (lui, auipc), and all the ZK-specific instructions (zk_input, zk_output, zk_hint, zk_commit, etc.).
Each instruction type has different operand formats so need to handle registers, immediates, offsets properly. Would be good to add tests for each type, both valid and invalid cases.
Right now the parser in
zkir-assembler/src/parser.rsonly handles 3 instructions (ecall, ebreak, halt). Everything else is missing. Need to add all the R-type instructions (add, sub, mul, div, and, or, xor, sll, srl, sra, slt, sltu), I-type ALU stuff (addi, andi, ori, xori, slli, srli, srai, slti, sltiu), I-type loads (lb, lh, lw, lbu, lhu), S-type stores (sb, sh, sw), B-type branches (beq, bne, blt, bge, bltu, bgeu), J-type jumps (jal, jalr), U-type (lui, auipc), and all the ZK-specific instructions (zk_input, zk_output, zk_hint, zk_commit, etc.).Each instruction type has different operand formats so need to handle registers, immediates, offsets properly. Would be good to add tests for each type, both valid and invalid cases.