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

master
Alessandro Mauri 2 years ago
parent a57deccd4e
commit 397aa880f8
  1. 105
      INSTRUCTIONS.md

@ -28,7 +28,7 @@ always referred to as `A`. The possible pairs are:
- P = R31:R30 - P = R31:R30
## LD load value into register ### LD load value into register
post increment/decrement post increment/decrement
syntax: `LD Rd, A+q` syntax: `LD Rd, A+q`
action: `Rd = [A]; A += q` action: `Rd = [A]; A += q`
@ -37,15 +37,15 @@ pre increment/decrement
syntax: `LD Rd, q+A` syntax: `LD Rd, q+A`
action: `A += q; Rd = [A]` action: `A += q; Rd = [A]`
## LDI load immediate into register ### LDI load immediate into register
syntax: `LDI Rd, imm` syntax: `LDI Rd, imm`
action: `Rd = imm` action: `Rd = imm`
## LDIL load long immediate into register ### LDIL load long immediate into register
syntax: `LDIL Rd, imm32` syntax: `LDIL Rd, imm32`
action: `Rd = imm32` action: `Rd = imm32`
## ST store value from register ### ST store value from register
post increment/decrement post increment/decrement
syntax: `ST A+q, Rd` syntax: `ST A+q, Rd`
action: `[A] = Rd; A += q` action: `[A] = Rd; A += q`
@ -54,7 +54,7 @@ pre increment/decrement
syntax: `ST q+A, Rd` syntax: `ST q+A, Rd`
action: `A += q; [A] = Rd` action: `A += q; [A] = Rd`
## STI store immediate into memory ### STI store immediate into memory
post increment/decrement post increment/decrement
syntax: `STI A+q, imm` syntax: `STI A+q, imm`
action: `[A] = imm; A += q` action: `[A] = imm; A += q`
@ -63,7 +63,7 @@ pre increment/decrement
syntax: `STI q+A, imm` syntax: `STI q+A, imm`
action: `A += q; [A] = imm` action: `A += q; [A] = imm`
## STIL store long immediate into memory ### STIL store long immediate into memory
post increment/decrement post increment/decrement
syntax: `STIL A+q, imm32` syntax: `STIL A+q, imm32`
action: `[A] = imm32; A += q` action: `[A] = imm32; A += q`
@ -75,81 +75,108 @@ action: `A += q; [A] = imm32`
# Arithmetic operations # Arithmetic operations
## ADD ### ADD
## ADDC ### ADDC
## ADDI ### ADDI
## ADDIC ### ADDIC
## MLA Multiply and add ### MLA Multiply and add
syntax: `MLA A, Ra, Rb, Rc` syntax: `MLA A, Ra, Rb, Rc`
action: `A = Rc + (Ra * Rb)` action: `A = Rc + (Ra * Rb)`
## MLAI Multiply and add immediate ### MLAI Multiply and add immediate
syntax: `MLAI A, Ra, Rb, imm` syntax: `MLAI A, Ra, Rb, imm`
action: `A = imm + (Ra * Rb)` action: `A = imm + (Ra * Rb)`
## MLIA Multiply immediate and add ### MLIA Multiply immediate and add
syntax: `MLIA A, Ra, imm, Rc` syntax: `MLIA A, Ra, imm, Rc`
action: `A = Rc + (Ra * imm)` action: `A = Rc + (Ra * imm)`
## MLAC Multiply and add with carry ### MLAC Multiply and add with carry
syntax: `MLAC A, Ra, Rb, Rc` syntax: `MLAC A, Ra, Rb, Rc`
action: `A = F.C + Rc + (Ra * Rb)` 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` syntax: `MLAIC A, Ra, Rb, imm`
action: `A = F.C + imm + (Ra * Rb)` 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` syntax: `MLIAC A, Ra, imm, Rc`
action: `A = F.C + Rc + (Ra * imm)` action: `A = F.C + Rc + (Ra * imm)`
## SMLA Signed multiply and add ### SMLA Signed multiply and add
syntax: `SMLA A, Ra, Rb, Rc` syntax: `SMLA A, Ra, Rb, Rc`
action: `A = Rc + (Ra * Rb)` action: `A = Rc + (Ra * Rb)`
## SMLAI Signed multiply and add immediate ### SMLAI Signed multiply and add immediate
syntax: `SMLAI A, Ra, Rb, imm` syntax: `SMLAI A, Ra, Rb, imm`
action: `A = imm + (Ra * Rb)` action: `A = imm + (Ra * Rb)`
## SMLIA Signed multiply immediate and add ### SMLIA Signed multiply immediate and add
syntax: `SMLIA A, Ra, imm, Rc` syntax: `SMLIA A, Ra, imm, Rc`
action: `A = Rc + (Ra * imm)` 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` syntax: `SMLAC A, Ra, Rb, Rc`
action: `A = F.C + Rc + (Ra * Rb)` 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` syntax: `SMLAIC A, Ra, Rb, imm`
action: `A = F.C + imm + (Ra * Rb)` 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` syntax: `SMLIAC A, Ra, imm, Rc`
action: `A = F.C + Rc + (Ra * imm)` action: `A = F.C + Rc + (Ra * imm)`
## SUB Subtract ### SUB Subtract
## SUBC Subtract with carry ### SUBC Subtract with carry
## SUBI Subtract immediate ### SUBI Subtract immediate
## SBIC Subtract immediate with carry ### SBIC Subtract immediate with carry
## AND ### AND
## ANDI with immediate ### ANDI with immediate
## OR ### OR
## ORI with immediate ### ORI with immediate
## XOR ### XOR
## XORI with immediate ### XORI with immediate
## NEG negate (two's complement) ### NEG negate (two's complement)
## ROR Rotate right ### ROR Rotate right
## ROL Rotate left ### ROL Rotate left
## SHR Shift right ### SHR Shift right
## SHRC Shift right through carry ### SHRC Shift right through carry
## SHL Shift left ### SHL Shift left
## SHLC Shift left through carry ### SHLC Shift left through carry
# Conditional operations # 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