Browse Source

lun 31 ott 2022, 00:23:48, CET

master
Alessandro Mauri 3 months ago
parent
commit
397aa880f8
  1. 105
      INSTRUCTIONS.md

105
INSTRUCTIONS.md

@ -28,7 +28,7 @@ always referred to as `A`. The possible pairs are:
- P = R31:R30
## LD load value into register
### LD load value into register
post increment/decrement
syntax: `LD Rd, A+q`
action: `Rd = [A]; A += q`
@ -37,15 +37,15 @@ pre increment/decrement
syntax: `LD Rd, q+A`
action: `A += q; Rd = [A]`
## LDI load immediate into register
### LDI load immediate into register
syntax: `LDI Rd, imm`
action: `Rd = imm`
## LDIL load long immediate into register
### LDIL load long immediate into register
syntax: `LDIL Rd, imm32`
action: `Rd = imm32`
## ST store value from register
### ST store value from register
post increment/decrement
syntax: `ST A+q, Rd`
action: `[A] = Rd; A += q`
@ -54,7 +54,7 @@ pre increment/decrement
syntax: `ST q+A, Rd`
action: `A += q; [A] = Rd`
## STI store immediate into memory
### STI store immediate into memory
post increment/decrement
syntax: `STI A+q, imm`
action: `[A] = imm; A += q`
@ -63,7 +63,7 @@ pre increment/decrement
syntax: `STI q+A, imm`
action: `A += q; [A] = imm`
## STIL store long immediate into memory
### STIL store long immediate into memory
post increment/decrement
syntax: `STIL A+q, imm32`
action: `[A] = imm32; A += q`
@ -75,81 +75,108 @@ action: `A += q; [A] = imm32`
# Arithmetic operations
## ADD
## ADDC
## ADDI
## ADDIC
### ADD
### ADDC
### ADDI
### ADDIC
## MLA Multiply and add
### MLA Multiply and add
syntax: `MLA A, Ra, Rb, Rc`
action: `A = Rc + (Ra * Rb)`
## MLAI Multiply and add immediate
### MLAI Multiply and add immediate
syntax: `MLAI A, Ra, Rb, imm`
action: `A = imm + (Ra * Rb)`
## MLIA Multiply immediate and add
### MLIA Multiply immediate and add
syntax: `MLIA A, Ra, imm, Rc`
action: `A = Rc + (Ra * imm)`
## MLAC Multiply and add with carry
### MLAC Multiply and add with carry
syntax: `MLAC A, Ra, Rb, Rc`
action: `A = F.C + Rc + (Ra * Rb)`
## MLAIC Multiply and add immediate with carry
### MLAIC Multiply and add immediate with carry
syntax: `MLAIC A, Ra, Rb, imm`
action: `A = F.C + imm + (Ra * Rb)`
## MLIAC Multiply immediate and add with carry
### MLIAC Multiply immediate and add with carry
syntax: `MLIAC A, Ra, imm, Rc`
action: `A = F.C + Rc + (Ra * imm)`
## SMLA Signed multiply and add
### SMLA Signed multiply and add
syntax: `SMLA A, Ra, Rb, Rc`
action: `A = Rc + (Ra * Rb)`
## SMLAI Signed multiply and add immediate
### SMLAI Signed multiply and add immediate
syntax: `SMLAI A, Ra, Rb, imm`
action: `A = imm + (Ra * Rb)`
## SMLIA Signed multiply immediate and add
### SMLIA Signed multiply immediate and add
syntax: `SMLIA A, Ra, imm, Rc`
action: `A = Rc + (Ra * imm)`
## SMLAC Signed multiply and add with carry
### SMLAC Signed multiply and add with carry
syntax: `SMLAC A, Ra, Rb, Rc`
action: `A = F.C + Rc + (Ra * Rb)`
## SMLAIC Signed multiply and add immediate with carry
### SMLAIC Signed multiply and add immediate with carry
syntax: `SMLAIC A, Ra, Rb, imm`
action: `A = F.C + imm + (Ra * Rb)`
## SMLIAC Signed multiply immediate and add with carry
### SMLIAC Signed multiply immediate and add with carry
syntax: `SMLIAC A, Ra, imm, Rc`
action: `A = F.C + Rc + (Ra * imm)`
## SUB Subtract
## SUBC Subtract with carry
## SUBI Subtract immediate
## SBIC Subtract immediate with carry
### SUB Subtract
### SUBC Subtract with carry
### SUBI Subtract immediate
### SBIC Subtract immediate with carry
## AND
## ANDI with immediate
## OR
## ORI with immediate
## XOR
## XORI with immediate
### AND
### ANDI with immediate
### OR
### ORI with immediate
### XOR
### XORI with immediate
## NEG negate (two's complement)
### NEG negate (two's complement)
## ROR Rotate right
## ROL Rotate left
## SHR Shift right
## SHRC Shift right through carry
## SHL Shift left
## SHLC Shift left through carry
### ROR Rotate right
### ROL Rotate left
### SHR Shift right
### SHRC Shift right through carry
### SHL Shift left
### SHLC Shift left through carry
# Conditional operations
### JZS Jump on zero set
syntax: `JZS imm32`
### JZC Jump on zero clear
### RJZS Relative jump on zero set
syntax: `RJZS imm`
### RJZC Relative jump on zero clear
### JNS Jump on negative set
### JNC Jump on negative clear
### RJNS Relative jump on negative set
### RJNC Relative jump on negative clear
### JCS Jump on carry set
### JCC Jump on carry clear
### RJCS Relative jump on carry set
### RJCC Relative jump on carry clear
### JVS Jump on overflow set
### JVC Jump on overflow clear
### RJVS Relative jump on overflow set
### RJVC Relative jump on overflow clear
# Stack manipulation
### CALL
### RCALL
### PUSH
### POP

Loading…
Cancel
Save