Update Instruction Set
+1
-5
@@ -9,11 +9,7 @@ Also note that immediate (constant/literal) arguments are 16-bits long in I (imm
|
||||
| -- | -- |
|
||||
| R | Used when an instruction takes one or more register arguments, but no immediates. This type is also used by shift and rotation operations, as it contains a 5 bit shift amount field. |
|
||||
| I | Used when an instruction takes at most two register arguments as well as a halfword immediate argument. This is typically used by immediate arithmetic operations e.g. addi, as well as loads and stores (where a base register and immediate offset are passed). Also used by branching instructions. The operand is a signed offset from the current value of PCX. |
|
||||
| J | Used by jumps excluding jr, which uses a register as its argument.
|
||||
|
||||
Jumps are absolute addresses, but there is a 256MB region around PCX since the argument is 26 bits.
|
||||
|
||||
Since arguments are always word aligned, we bitshift left twice and set the upper 4 bits to match that of the value in PCX. This then forms a valid word-sized address. |
|
||||
| J | Used by jumps excluding jr, which uses a register as its argument. Jumps are absolute addresses, but there is a 256MB region around PCX since the argument is 26 bits. Since arguments are always word aligned, we bitshift left twice and set the upper 4 bits to match that of the value in PCX. This then forms a valid word-sized address. |
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user