Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ad4e5180
Commit
ad4e5180
authored
Sep 21, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
Improve `mipsevm` list of supported instructions
parent
27d12ea5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
11 deletions
+57
-11
README.md
cannon/mipsevm/README.md
+57
-11
No files found.
cannon/mipsevm/README.md
View file @
ad4e5180
# `mipsevm`
# `mipsevm`
Supported 55 instructions:
Supported 55 instructions:
```
| Category | Instruction | Description |
'addi', 'addiu', 'addu', 'and', 'andi',
|----------------------|---------------|----------------------------------------------|
'b', 'beq', 'beqz', 'bgez', 'bgtz', 'blez', 'bltz', 'bne', 'bnez',
|
`Arithmetic`
|
`addi`
| Add immediate (with sign-extension). |
'clz', 'divu',
|
`Arithmetic`
|
`addiu`
| Add immediate unsigned (no overflow). |
'j', 'jal', 'jalr', 'jr',
|
`Arithmetic`
|
`addu`
| Add unsigned (no overflow). |
'lb', 'lbu', 'lui', 'lw', 'lwr',
|
`Logical`
|
`and`
| Bitwise AND. |
'mfhi', 'mflo', 'move', 'movn', 'movz', 'mtlo', 'mul', 'multu',
|
`Logical`
|
`andi`
| Bitwise AND immediate. |
'negu', 'nop', 'not', 'or', 'ori',
|
`Branch`
|
`b`
| Unconditional branch. |
'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall',
|
`Conditional Branch`
|
`beq`
| Branch on equal. |
'xor', 'xori'
|
`Conditional Branch`
|
`beqz`
| Branch if equal to zero. |
```
|
`Conditional Branch`
|
`bgez`
| Branch on greater than or equal to zero. |
|
`Conditional Branch`
|
`bgtz`
| Branch on greater than zero. |
|
`Conditional Branch`
|
`blez`
| Branch on less than or equal to zero. |
|
`Conditional Branch`
|
`bltz`
| Branch on less than zero. |
|
`Conditional Branch`
|
`bne`
| Branch on not equal. |
|
`Conditional Branch`
|
`bnez`
| Branch if not equal to zero. |
|
`Logical`
|
`clz`
| Count leading zeros. |
|
`Arithmetic`
|
`divu`
| Divide unsigned. |
|
`Unconditional Jump`
|
`j`
| Jump. |
|
`Unconditional Jump`
|
`jal`
| Jump and link. |
|
`Unconditional Jump`
|
`jalr`
| Jump and link register. |
|
`Unconditional Jump`
|
`jr`
| Jump register. |
|
`Data Transfer`
|
`lb`
| Load byte. |
|
`Data Transfer`
|
`lbu`
| Load byte unsigned. |
|
`Data Transfer`
|
`lui`
| Load upper immediate. |
|
`Data Transfer`
|
`lw`
| Load word. |
|
`Data Transfer`
|
`lwr`
| Load word right. |
|
`Data Transfer`
|
`mfhi`
| Move from HI register. |
|
`Data Transfer`
|
`mflo`
| Move from LO register. |
|
`Data Transfer`
|
`move`
| Move between registers. |
|
`Data Transfer`
|
`movn`
| Move conditional on not zero. |
|
`Data Transfer`
|
`movz`
| Move conditional on zero. |
|
`Data Transfer`
|
`mtlo`
| Move to LO register. |
|
`Arithmetic`
|
`mul`
| Multiply (to produce a word result). |
|
`Arithmetic`
|
`multu`
| Multiply unsigned. |
|
`Arithmetic`
|
`negu`
| Negate unsigned. |
|
`No Op`
|
`nop`
| No operation. |
|
`Logical`
|
`not`
| Bitwise NOT (pseudo-instruction in MIPS). |
|
`Logical`
|
`or`
| Bitwise OR. |
|
`Logical`
|
`ori`
| Bitwise OR immediate. |
|
`Data Transfer`
|
`sb`
| Store byte. |
|
`Logical`
|
`sll`
| Shift left logical. |
|
`Logical`
|
`sllv`
| Shift left logical variable. |
|
`Comparison`
|
`slt`
| Set on less than (signed). |
|
`Comparison`
|
`slti`
| Set on less than immediate. |
|
`Comparison`
|
`sltiu`
| Set on less than immediate unsigned. |
|
`Comparison`
|
`sltu`
| Set on less than unsigned. |
|
`Logical`
|
`sra`
| Shift right arithmetic. |
|
`Logical`
|
`srl`
| Shift right logical. |
|
`Logical`
|
`srlv`
| Shift right logical variable. |
|
`Arithmetic`
|
`subu`
| Subtract unsigned. |
|
`Data Transfer`
|
`sw`
| Store word. |
|
`Data Transfer`
|
`swr`
| Store word right. |
|
`Serialization`
|
`sync`
| Synchronize shared memory. |
|
`System Calls`
|
`syscall`
| System call. |
|
`Logical`
|
`xor`
| Bitwise XOR. |
|
`Logical`
|
`xori`
| Bitwise XOR immediate. |
To run:
To run:
1.
Load a program into a state, e.g. using
`LoadELF`
.
1.
Load a program into a state, e.g. using
`LoadELF`
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment