This article needs additional citations for verification .(February 2025) |
The RISC-V instruction set refers to the set of instructions that RISC-V compatible microprocessors support. The instructions are usually part of an executable program, often stored as a computer file and executed on the processor.
The table below contains a list of the RV32I Base Integer Instructions. [1]
Instruction | Name | Format | Opcode |
---|---|---|---|
add | ADD | R | 0110011 |
sub | SUB | R | 0110011 |
xor | XOR | R | 0110011 |
or | OR | R | 0110011 |
and | AND | R | 0110011 |
sll | Shift Left Logical | R | 0110011 |
srl | Shift Right Logical | R | 0110011 |
sra | Shift Right Arith* | R | 0110011 |
slt | Set Less Than | R | 0110011 |
sltu | Set Less Than (U) | R | 0110011 |
addi | ADD Immediate | I | 0010011 |
xori | XOR Immediate | I | 0010011 |
ori | OR Immediate | I | 0010011 |
andi | AND Immediate | I | 0010011 |
slli | Shift Left Logical Immediate | I | 0010011 |
srli | Shift Right Logical Immediate | I | 0010011 |
srai | Shift Left Arith Immediate | I | 0010011 |
slti | Set Less Than Immediate | I | 0010011 |
sltiu | Set Less Than Immediate (U) | I | 0010011 |
lb | Load Byte | I | 0000011 |
lh | Load Half | I | 0000011 |
lw | Load Word | I | 0000011 |
lbu | Load Byte (U) | I | 0000011 |
lhu | Load Half (U) | I | 0000011 |
sb | Store Byte | S | 0100011 |
sh | Store Half | S | 0100011 |
sw | Store Word | S | 0100011 |
beq | Branch == | B | 1100011 |
bne | Branch != | B | 1100011 |
blt | Branch < | B | 1100011 |
bge | Branch > | B | 1100011 |
bltu | Branch < (U) | B | 1100011 |
bgeu | Branch > (U) | B | 1100011 |