Skip to content

Latest commit

 

History

History
306 lines (304 loc) · 10.8 KB

Instructions.md

File metadata and controls

306 lines (304 loc) · 10.8 KB

32 Bit

Data operation

add-subtract
  • ADDU32 Add unsigned
  • ADDC32 Add with carry unsigned
  • ADDI32 Add immediate unsigned
  • SUBU32 Subtract unsigned
  • SUBC32 Subtract with borrow unsigned
  • SUBI32 Subtract immediate unsigned
  • RSUB32 Reverse subtract
  • IXH32 Index half-word
  • IXW32 Index word
  • IXD32 Index double word
  • INCF32 C=0 add immediate
  • INCT32 C=1 add immediate
  • DECF32 C=0 subtract immediate
  • DECT32 C=1 subtract immediate
  • DECGT32 Set C bit when greater than zero in subtraction
  • DECLT32 Set C bit when smaller than zero in subtraction
  • DECNE32 Set C bit when not equal to zero in subtraction
logical operation
  • AND32 Bitwise AND
  • ANDI32 Bitwise AND immediate
  • ANDN32 Bitwise AND-NOT
  • ANDNI32 Bitwise AND-NOT immediate
  • OR32 Bitwise OR
  • ORI32 Bitwise OR immediate
  • XOR32 Bitwise XOR
  • XORI32 Bitwise XOR immediate
  • NOR32 Bitwise NOT-OR
  • NOT32 Bitwise NOT
shift
  • LSL32 Logical shift left
  • LSLI32 Logical shift left immediate
  • LSLC32 Logical shift left immediate to C
  • LSR32 Logical shift right
  • LSRI32 Logical shift right immediate
  • LSRC32 Logical shift right immediate to C
  • ASR32 Arithmetic shift right
  • ASRI32 Arithmetic shift right immediate
  • ASRC32 Arithmetic shift right immediate to C
  • ROTL32 Rotate left
  • ROTLI32 Rotate left immediate
  • XSR32 Extended shift right
compare
  • CMPNE32 Compare unequal
  • CMPNEI32 Compare unequal immediate
  • CMPHS32 Compare unsigned when greater or equal
  • CMPHSI32 Compare immediate unsigned when greater or equal
  • CMPLT32 Compare signed when smaller
  • CMPLTI32 Compare immediate signed when smaller
  • TST32 Null-test
  • TSTNBZ32 Register test without byte equal to zero
data transfer
  • MOV32 Move
  • MOVF32 C=0 Move
  • MOVT32 C=1 Move
  • MOVI32 Move immediate
  • MOVIH32 Move immediate high
  • MTHI32 Write transfer to high bit of accumulator
  • MTLO32 Write transfer to low bit of accumulator
  • MFHI32 Read transfer from high bit of accumulator
  • MFLO32 Read transfer from low bit of accumulator
  • MFHIS32 Read transfer saturate from high bit of accumulator
  • MFLOS32 Read transfer saturate from low bit of accumulator
  • MVCV32 C bit reverse move
  • MVC32 C bit move
  • MVTC32 Copy overflow bit to C bit
  • CLRF32 C=0 clear
  • CLRT32 C=1 clear
  • LRW32 Memory read-in
  • GRS32 Sign generation
bit operation
  • BCLRI32 Bit clear immediate
  • BSETI32 Bit set immediate
  • BTSTI32 Bit test immediate
extract and insert
  • ZEXT32 Extract bit and extend unsigned
  • SEXT32 Extract bit and extend signed
  • INS32 Bit insert
  • ZEXTB32 Extract byte and extend unsigned
  • ZEXTH32 Extract half-word and extend unsigned
  • SEXTB32 Extract byte and extend signed
  • SEXTH32 Extract half-word and extend signed
  • XTRB0.32 Extract byte 0 and extend unsigned
  • XTRB1.32 Extract byte 1 and extend unsigned
  • XTRB2.32 Extract byte 2 and extend unsigned
  • XTRB3.32 Extract byte 3 and extend unsigned
  • BREV32 Bit-reverse
  • REVB32 Byte-reverse
  • REVH32 Half-word byte-reverse
Mutliply-divide
  • MULU32 Multiply unsigned
  • MULUA32 Multiply-accumulate unsigned
  • MULUS32 Multiply-subtract unsigned
  • MULS32 Multiply signed
  • MULSA32 Multiply-accumulate signed
  • MULSS32 Multiply-subtract signed
  • MULSH32 16-bit multiply signed
  • MULSHA32 16-bit multiply-accumulate signed
  • MULSHS32 16-bit multiply-subtract signed
  • MULSW32 16x32 multiply signed
  • MULSWA32 16x32 multiply-accumulate signed
  • MULSWS32 16x32 multiply-subtract signed
  • VMULSH32 16-bit multiply signed in two branches
  • VMULSHA32 16-bit multiply-accumulate signed in two branches
  • VMULSHS32 16-bit multiply-subtract signed in two branches
  • VMULSW32 16x32 multiply signed in two branches
  • VMULSWA32 16x32 multiply-accumulate signed in two branches
  • VMULSWS32 16x32 multiply-subtract signed in two branches
  • MULT32 Multiply
  • DIVU32 Divide unsigned
  • DIVS32 Divide signed
miscellaneous operation
  • ABS32 Absolute value
  • FF0. 32 Fast find 0
  • FF1. 32 Fast find 1
  • BMASKI32 Bit mask generation immediate
  • BGENR32 Register bit generation
  • BGENI32 Bit generation immediate

Branch Jump

branch
  • BT32 C=1 branch instruction
  • BF32 C=0 branch instruction
  • BEZ32 Branch instruction when register is equal to zero
  • BNEZ32 Branch instruction when register is not equal to zero
  • BHZ32 Branch instruction when register is greater than zero
  • BLSZ32 Branch instruction when register is smaller than or equal to zero
  • BLZ32 Branch instruction when register is smaller than zero
  • BHSZ32 Branch instruction when register is greater than or equal to zero
jump
  • BR32 Unconditional jump
  • BSR32 Jump to subprogram
  • JMPI32 Jump indirect
  • JSRI32 Jump to subprogram indirect
  • JMP32 Register jump
  • JSR32 Register jump to subprogram
  • RTS32 Link register jump
  • JMPIX32 Register index jump

Memory Access

Immediate operand offset access
  • LD32.B Load unsigned and extended byte
  • LD32.BS Load signed and extended byte
  • LD32.H Load unsigned and extended half-word
  • LD32.HS Load signed and extended half-word
  • LD32.W Load word
  • LD32.D Load double word
  • ST32.B Store byte
  • ST32.H Store half-word
  • ST32.W Store word
  • ST32.D Store double word
Vector register offset access
  • LDR32.B Load unsigned and extended byte in register offset addressing
  • LDR32.BS Load signed and extended byte in register offset addressing
  • LDR32.H Load unsigned and extended half-word in register offset addressing
  • LDR32.HS Load signed and extended half-word in register offset addressing
  • LDR32.W Load word in register offset addressing
  • STR32.B Store byte in register offset addressing
  • STR32.H Store half-word in register offset addressing
  • STR32.W Store word in register offset addressing
Multi-register access
  • LDQ32 Load consecutive quad word
  • LDM32 Load consecutive multiword
  • STQ32 Store consecutive quad word
  • STM32 Store consecutive multiword
  • PUSH32 Push
  • POP32 Pop
Exclusive access
  • LDEX32.W Load word exclusive
  • STEX32.W Store word exclusive
  • LRS32.B Load byte sign
  • LRS32.H Load half-word sign
  • LRS32.W Load word sign
  • SRS32.B Store byte sign
  • SRS32.H Store half-word sign
  • SRS32.W Store word sign

Co-processor

co-processor data transfer
  • CPRGR32 Read transfer from general-purpose register of co-processor
  • CPWGR32 Write transfer to general-purpose register of co-processor
  • CPRCR32 Read transfer from control register of co-processor
  • CPWCR32 Write transfer to control register of co-processor
  • CPRC32 Read transfer from condition bit of co-processor
co-processor memory access
  • LDCPR32 Load word to co-processor
  • STCPR32 Store word in co-processor
co-processor operation
  • CPOP32 Co-processor operation instruction

Privileged instruction

control register operation
  • MFCR32 Read from control register
  • MTCR32 Write to control register
  • PSRSET32 Set PSR bit
  • PSRCLR32 Clear PSR bit
Low power consumption
  • WAIT32 Enter low power consumption wait mode
  • DOZE32 Enter low power consumption doze mode
  • STOP32 Enter low power consumption stop mode
Abnormal return
  • RTE32 Return from abnormal and normal interrupt
  • RFI32 Return from fast interrupt
Safe state
  • STRAP32 Enter safe state
  • SRTE32 Return from safe state

Special Function

  • SYNC32 Synchronize CPU
  • BKPT32 Breakpoint instruction
  • SCE32 Set conditional execution
  • IDLY32 Ban interrupt identification
  • TRAP32 Unconditional operating system trap
  • PLDR32 Prefetch read data
  • PLDW32 Prefetch write data
  • WE32 Wait event
  • SE32 Send event
  • BMSET32 Set BCTM bit
  • BMCLR32 Clear BCTM bit

16 Bit

Data Operation

add- substract
  • ADDU16 Add unsigned
  • ADDC16 Add with carry unsigned
  • ADDI16 Add immediate unsigned
    • ADDI16 (sp)
  • SUBU16 Subtract unsigned
  • SUBC16 Subtract with borrow unsigned
  • SUBI16 Subtract immediate unsigned
logcial operation
  • AND16 Bitwise AND
  • ANDN16 Bitwise AND-NOT
  • OR16 Bitwise OR
  • XOR16 Bitwise XOR
  • NOR16 Bitwise NOT-OR
  • NOT16 Bitwise NOT
shift
  • LSL16 Logical shift left
  • LSLI16 Logical shift left immediate
  • LSR16 Logical shift right
  • LSRI16 Logical shift right immediate
  • ASR16 Arithmetic shift right
  • ASRI16 Arithmetic shift right immediate
  • ROTL16 Rotate left
compare
  • CMPNE16 Compare unequal
  • CMPNEI16 Compare unequal immediate
  • CMPHS16 Compare unsigned when greater or equal
  • CMPHSI16 Compare immediate unsigned when greater or equal
  • CMPLT16 Compare signed when smaller
  • CMPLTI16 Compare immediate signed when smaller
  • TST16 Null-test
  • TSTNBZ16 Register test without byte equal to zero
data transfer
  • MOV16 Move
  • MOVI16 Move immediate
  • MVCV16 C bit reverse move
  • LRW16 Memory read-in
bit operation
  • BCLRI16 Bit clear immediate
  • BSETI16 Bit set immediate
  • BTSTI16 Bit test immediate
extract and insert
  • ZEXTB16 Extract byte and extend unsigned
  • ZEXTH16 Extract half-word and extend unsigned
  • SEXTB16 Extract byte and extend signed
  • SEXTH16 Extract half-word and extend signed
  • REVB16 Byte-reverse
  • REVH16 Half-word byte-reverse
multiply-divide
  • MULT16 Multiply
  • MULSH16 16-bit multiply signed

Branch jump

branch
  • BT16 C=1 branch instruction
  • BF16 C=0 branch instruction
jump
  • BR16 Unconditional jump
  • JMP16 Register jump
  • JSR16 Register jump to subprogram
  • RTS16 Link register jump
  • JMPIX16 Register index jump

Memory Access

immediate operand offset access
  • LD16.B Load unsigned and extended byte
  • LD16.H Load unsigned and extended half-word
  • LD16.W Load word
    • LD16.W (SP)
  • ST16.B Store byte
  • ST16.H Store half-word
  • ST16.W Store word
    • ST16.W (SP)
multi-register access
  • POP16 Pop
  • PUSH16 Push
Binary translated stack
  • BPUSH16.H Binary push of translated half-word
  • BPUSH16.W Binary push of translated word
  • BPOP16.H Binary pop of translated half-word
  • BPOP16.W Binary pop of translated word
interrupt nesting acceleration
  • NIE Interrupt nesting enable
  • NIR Interrupt nesting return
  • IPUSH Interrupt push
  • IPOP Interrupt pop

Float

TBD