|
1 | 1 | # `mipsevm`
|
2 | 2 |
|
3 |
| -Supported 55 instructions: |
| 3 | +Supported 63 instructions: |
4 | 4 | | Category | Instruction | Description |
|
5 | 5 | |----------------------|---------------|----------------------------------------------|
|
| 6 | +| `Arithmetic` | `add` | Add. | |
6 | 7 | | `Arithmetic` | `addi` | Add immediate (with sign-extension). |
|
7 |
| -| `Arithmetic` | `addiu` | Add immediate unsigned (no overflow). | |
8 |
| -| `Arithmetic` | `addu` | Add unsigned (no overflow). | |
| 8 | +| `Arithmetic` | `addiu` | Add immediate unsigned. | |
| 9 | +| `Arithmetic` | `addu` | Add unsigned. | |
9 | 10 | | `Logical` | `and` | Bitwise AND. |
|
10 | 11 | | `Logical` | `andi` | Bitwise AND immediate. |
|
11 |
| -| `Branch` | `b` | Unconditional branch. | |
12 | 12 | | `Conditional Branch` | `beq` | Branch on equal. |
|
13 |
| -| `Conditional Branch` | `beqz` | Branch if equal to zero. | |
14 | 13 | | `Conditional Branch` | `bgez` | Branch on greater than or equal to zero. |
|
15 | 14 | | `Conditional Branch` | `bgtz` | Branch on greater than zero. |
|
16 | 15 | | `Conditional Branch` | `blez` | Branch on less than or equal to zero. |
|
17 | 16 | | `Conditional Branch` | `bltz` | Branch on less than zero. |
|
18 | 17 | | `Conditional Branch` | `bne` | Branch on not equal. |
|
19 |
| -| `Conditional Branch` | `bnez` | Branch if not equal to zero. | |
| 18 | +| `Logical` | `clo` | Count leading ones. | |
20 | 19 | | `Logical` | `clz` | Count leading zeros. |
|
| 20 | +| `Arithmetic` | `div` | Divide. | |
21 | 21 | | `Arithmetic` | `divu` | Divide unsigned. |
|
22 | 22 | | `Unconditional Jump` | `j` | Jump. |
|
23 | 23 | | `Unconditional Jump` | `jal` | Jump and link. |
|
24 | 24 | | `Unconditional Jump` | `jalr` | Jump and link register. |
|
25 | 25 | | `Unconditional Jump` | `jr` | Jump register. |
|
26 | 26 | | `Data Transfer` | `lb` | Load byte. |
|
27 | 27 | | `Data Transfer` | `lbu` | Load byte unsigned. |
|
| 28 | +| `Data Transfer` | `lh` | Load halfword. | |
| 29 | +| `Data Transfer` | `lhu` | Load halfword unsigned. | |
| 30 | +| `Data Transfer` | `ll` | Load linked word. | |
28 | 31 | | `Data Transfer` | `lui` | Load upper immediate. |
|
29 | 32 | | `Data Transfer` | `lw` | Load word. |
|
| 33 | +| `Data Transfer` | `lwl` | Load word left. | |
30 | 34 | | `Data Transfer` | `lwr` | Load word right. |
|
31 | 35 | | `Data Transfer` | `mfhi` | Move from HI register. |
|
32 | 36 | | `Data Transfer` | `mflo` | Move from LO register. |
|
33 |
| -| `Data Transfer` | `move` | Move between registers. | |
34 | 37 | | `Data Transfer` | `movn` | Move conditional on not zero. |
|
35 | 38 | | `Data Transfer` | `movz` | Move conditional on zero. |
|
| 39 | +| `Data Transfer` | `mthi` | Move to HI register. | |
36 | 40 | | `Data Transfer` | `mtlo` | Move to LO register. |
|
37 | 41 | | `Arithmetic` | `mul` | Multiply (to produce a word result). |
|
| 42 | +| `Arithmetic` | `mult` | Multiply. | |
38 | 43 | | `Arithmetic` | `multu` | Multiply unsigned. |
|
39 |
| -| `Arithmetic` | `negu` | Negate unsigned. | |
40 |
| -| `No Op` | `nop` | No operation. | |
41 |
| -| `Logical` | `not` | Bitwise NOT (pseudo-instruction in MIPS). | |
| 44 | +| `Logical` | `nor` | Bitwise NOR. | |
42 | 45 | | `Logical` | `or` | Bitwise OR. |
|
43 | 46 | | `Logical` | `ori` | Bitwise OR immediate. |
|
44 | 47 | | `Data Transfer` | `sb` | Store byte. |
|
| 48 | +| `Data Transfer` | `sc` | Store conditional. | |
| 49 | +| `Data Transfer` | `sh` | Store halfword. | |
45 | 50 | | `Logical` | `sll` | Shift left logical. |
|
46 | 51 | | `Logical` | `sllv` | Shift left logical variable. |
|
47 | 52 | | `Comparison` | `slt` | Set on less than (signed). |
|
48 | 53 | | `Comparison` | `slti` | Set on less than immediate. |
|
49 |
| -| `Comparison` | `sltiu` | Set on less than immediate unsigned. | |
| 54 | +| `Comparison` | `sltiu` | Set on less than immediate unsigned. | |
50 | 55 | | `Comparison` | `sltu` | Set on less than unsigned. |
|
51 | 56 | | `Logical` | `sra` | Shift right arithmetic. |
|
| 57 | +| `Logical` | `srav` | Shift right arithmetic variable. | |
52 | 58 | | `Logical` | `srl` | Shift right logical. |
|
53 | 59 | | `Logical` | `srlv` | Shift right logical variable. |
|
| 60 | +| `Arithmetic` | `sub` | Subtract. | |
54 | 61 | | `Arithmetic` | `subu` | Subtract unsigned. |
|
55 | 62 | | `Data Transfer` | `sw` | Store word. |
|
| 63 | +| `Data Transfer` | `swl` | Store word left. | |
56 | 64 | | `Data Transfer` | `swr` | Store word right. |
|
57 | 65 | | `Serialization` | `sync` | Synchronize shared memory. |
|
58 | 66 | | `System Calls` | `syscall` | System call. |
|
|
0 commit comments