Rizin
unix-like reverse engineering framework and cli tools
nios2.h File Reference
#include "mybfd.h"

Go to the source code of this file.

Classes

struct  nios2_opcode
 
struct  nios2_reg
 

Macros

#define NIOS2_INSN_MACRO   0x80000000
 
#define NIOS2_INSN_MACRO_MOV   0x80000001
 
#define NIOS2_INSN_MACRO_MOVI   0x80000002
 
#define NIOS2_INSN_MACRO_MOVIA   0x80000004
 
#define NIOS2_INSN_RELAXABLE   0x40000000
 
#define NIOS2_INSN_UBRANCH   0x00000010
 
#define NIOS2_INSN_CBRANCH   0x00000020
 
#define NIOS2_INSN_CALL   0x00000040
 
#define NIOS2_INSN_ADDI   0x00000080
 
#define NIOS2_INSN_ANDI   0x00000100
 
#define NIOS2_INSN_ORI   0x00000200
 
#define NIOS2_INSN_XORI   0x00000400
 
#define GET_INSN_FIELD(X, i)    (((i)&OP_MASK_##X) >> OP_SH_##X)
 
#define SET_INSN_FIELD(X, i, j)    ((i) = (((i) & ~OP_MASK_##X) | (((j) << OP_SH_##X) & OP_MASK_##X)))
 
#define IW_A_LSB   27
 
#define IW_A_MSB   31
 
#define IW_A_SZ   5
 
#define IW_A_MASK   0x1f
 
#define IW_B_LSB   22
 
#define IW_B_MSB   26
 
#define IW_B_SZ   5
 
#define IW_B_MASK   0x1f
 
#define IW_C_LSB   17
 
#define IW_C_MSB   21
 
#define IW_C_SZ   5
 
#define IW_C_MASK   0x1f
 
#define IW_IMM16_LSB   6
 
#define IW_IMM16_MSB   21
 
#define IW_IMM16_SZ   16
 
#define IW_IMM16_MASK   0xffff
 
#define IW_IMM26_LSB   6
 
#define IW_IMM26_MSB   31
 
#define IW_IMM26_SZ   26
 
#define IW_IMM26_MASK   0x3ffffff
 
#define IW_OP_LSB   0
 
#define IW_OP_MSB   5
 
#define IW_OP_SZ   6
 
#define IW_OP_MASK   0x3f
 
#define IW_OPX_LSB   11
 
#define IW_OPX_MSB   16
 
#define IW_OPX_SZ   6
 
#define IW_OPX_MASK   0x3f
 
#define IW_SHIFT_IMM5_LSB   6
 
#define IW_SHIFT_IMM5_MSB   10
 
#define IW_SHIFT_IMM5_SZ   5
 
#define IW_SHIFT_IMM5_MASK   0x1f
 
#define IW_CONTROL_REGNUM_LSB   6
 
#define IW_CONTROL_REGNUM_MSB   9
 
#define IW_CONTROL_REGNUM_SZ   4
 
#define IW_CONTROL_REGNUM_MASK   0xf
 
#define OP_MASK_OP   (IW_OP_MASK << IW_OP_LSB)
 
#define OP_SH_OP   IW_OP_LSB
 
#define OP_MASK_IOP   (IW_OP_MASK << IW_OP_LSB)
 
#define OP_SH_IOP   IW_OP_LSB
 
#define OP_MASK_IMM16   (IW_IMM16_MASK << IW_IMM16_LSB)
 
#define OP_SH_IMM16   IW_IMM16_LSB
 
#define OP_MASK_IRD   (IW_B_MASK << IW_B_LSB)
 
#define OP_SH_IRD   IW_B_LSB /* The same as T for I-type. */
 
#define OP_MASK_IRT   (IW_B_MASK << IW_B_LSB)
 
#define OP_SH_IRT   IW_B_LSB
 
#define OP_MASK_IRS   (IW_A_MASK << IW_A_LSB)
 
#define OP_SH_IRS   IW_A_LSB
 
#define OP_MASK_ROP   (IW_OP_MASK << IW_OP_LSB)
 
#define OP_SH_ROP   IW_OP_LSB
 
#define OP_MASK_ROPX   (IW_OPX_MASK << IW_OPX_LSB)
 
#define OP_SH_ROPX   IW_OPX_LSB
 
#define OP_MASK_RRD   (IW_C_MASK << IW_C_LSB)
 
#define OP_SH_RRD   IW_C_LSB
 
#define OP_MASK_RRT   (IW_B_MASK << IW_B_LSB)
 
#define OP_SH_RRT   IW_B_LSB
 
#define OP_MASK_RRS   (IW_A_MASK << IW_A_LSB)
 
#define OP_SH_RRS   IW_A_LSB
 
#define OP_MASK_JOP   (IW_OP_MASK << IW_OP_LSB)
 
#define OP_SH_JOP   IW_OP_LSB
 
#define OP_MASK_IMM26   (IW_IMM26_MASK << IW_IMM26_LSB)
 
#define OP_SH_IMM26   IW_IMM26_LSB
 
#define OP_MASK_RCTL   0x000007c0
 
#define OP_SH_RCTL   6
 
#define OP_MASK_TRAP_IMM5   0x000007c0
 
#define OP_SH_TRAP_IMM5   6
 
#define OP_MASK_IMM5   (IW_SHIFT_IMM5_MASK << IW_SHIFT_IMM5_LSB)
 
#define OP_SH_IMM5   IW_SHIFT_IMM5_LSB
 
#define OP_MASK_CACHE_OPX   (IW_B_MASK << IW_B_LSB)
 
#define OP_SH_CACHE_OPX   IW_B_LSB
 
#define OP_MASK_CACHE_RRS   (IW_A_MASK << IW_A_LSB)
 
#define OP_SH_CACHE_RRS   IW_A_LSB
 
#define OP_MASK_CUSTOM_A   0x00010000
 
#define OP_SH_CUSTOM_A   16
 
#define OP_MASK_CUSTOM_B   0x00008000
 
#define OP_SH_CUSTOM_B   15
 
#define OP_MASK_CUSTOM_C   0x00004000
 
#define OP_SH_CUSTOM_C   14
 
#define OP_MASK_CUSTOM_N   0x00003fc0
 
#define OP_SH_CUSTOM_N   6
 
#define OP_MAX_CUSTOM_N   255
 
#define OP_ADDI   4
 
#define OP_ANDHI   44
 
#define OP_ANDI   12
 
#define OP_BEQ   38
 
#define OP_BGE   14
 
#define OP_BGEU   46
 
#define OP_BLT   22
 
#define OP_BLTU   54
 
#define OP_BNE   30
 
#define OP_BR   6
 
#define OP_CALL   0
 
#define OP_CMPEQI   32
 
#define OP_CMPGEI   8
 
#define OP_CMPGEUI   40
 
#define OP_CMPLTI   16
 
#define OP_CMPLTUI   48
 
#define OP_CMPNEI   24
 
#define OP_CUSTOM   50
 
#define OP_FLUSHD   59
 
#define OP_FLUSHDA   27
 
#define OP_INITD   51
 
#define OP_INITDA   19
 
#define OP_JMPI   1
 
#define OP_LDB   7
 
#define OP_LDBIO   39
 
#define OP_LDBU   3
 
#define OP_LDBUIO   35
 
#define OP_LDH   15
 
#define OP_LDHIO   47
 
#define OP_LDHU   11
 
#define OP_LDHUIO   43
 
#define OP_LDL   31
 
#define OP_LDW   23
 
#define OP_LDWIO   55
 
#define OP_MULI   36
 
#define OP_OPX   58
 
#define OP_ORHI   52
 
#define OP_ORI   20
 
#define OP_RDPRS   56
 
#define OP_STB   5
 
#define OP_STBIO   37
 
#define OP_STC   29
 
#define OP_STH   13
 
#define OP_STHIO   45
 
#define OP_STW   21
 
#define OP_STWIO   53
 
#define OP_XORHI   60
 
#define OP_XORI   28
 
#define OPX_ADD   49
 
#define OPX_AND   14
 
#define OPX_BREAK   52
 
#define OPX_BRET   9
 
#define OPX_CALLR   29
 
#define OPX_CMPEQ   32
 
#define OPX_CMPGE   8
 
#define OPX_CMPGEU   40
 
#define OPX_CMPLT   16
 
#define OPX_CMPLTU   48
 
#define OPX_CMPNE   24
 
#define OPX_CRST   62
 
#define OPX_DIV   37
 
#define OPX_DIVU   36
 
#define OPX_ERET   1
 
#define OPX_FLUSHI   12
 
#define OPX_FLUSHP   4
 
#define OPX_HBREAK   53
 
#define OPX_INITI   41
 
#define OPX_INTR   61
 
#define OPX_JMP   13
 
#define OPX_MUL   39
 
#define OPX_MULXSS   31
 
#define OPX_MULXSU   23
 
#define OPX_MULXUU   7
 
#define OPX_NEXTPC   28
 
#define OPX_NOR   6
 
#define OPX_OR   22
 
#define OPX_RDCTL   38
 
#define OPX_RET   5
 
#define OPX_ROL   3
 
#define OPX_ROLI   2
 
#define OPX_ROR   11
 
#define OPX_SLL   19
 
#define OPX_SLLI   18
 
#define OPX_SRA   59
 
#define OPX_SRAI   58
 
#define OPX_SRL   27
 
#define OPX_SRLI   26
 
#define OPX_SUB   57
 
#define OPX_SYNC   54
 
#define OPX_TRAP   45
 
#define OPX_WRCTL   46
 
#define OPX_WRPRS   20
 
#define OPX_XOR   30
 
#define OP_MATCH_ADDI   OP_ADDI
 
#define OP_MATCH_ANDHI   OP_ANDHI
 
#define OP_MATCH_ANDI   OP_ANDI
 
#define OP_MATCH_BEQ   OP_BEQ
 
#define OP_MATCH_BGE   OP_BGE
 
#define OP_MATCH_BGEU   OP_BGEU
 
#define OP_MATCH_BLT   OP_BLT
 
#define OP_MATCH_BLTU   OP_BLTU
 
#define OP_MATCH_BNE   OP_BNE
 
#define OP_MATCH_BR   OP_BR
 
#define OP_MATCH_FLUSHD   OP_FLUSHD
 
#define OP_MATCH_FLUSHDA   OP_FLUSHDA
 
#define OP_MATCH_INITD   OP_INITD
 
#define OP_MATCH_INITDA   OP_INITDA
 
#define OP_MATCH_CALL   OP_CALL
 
#define OP_MATCH_CMPEQI   OP_CMPEQI
 
#define OP_MATCH_CMPGEI   OP_CMPGEI
 
#define OP_MATCH_CMPGEUI   OP_CMPGEUI
 
#define OP_MATCH_CMPLTI   OP_CMPLTI
 
#define OP_MATCH_CMPLTUI   OP_CMPLTUI
 
#define OP_MATCH_CMPNEI   OP_CMPNEI
 
#define OP_MATCH_JMPI   OP_JMPI
 
#define OP_MATCH_LDB   OP_LDB
 
#define OP_MATCH_LDBIO   OP_LDBIO
 
#define OP_MATCH_LDBU   OP_LDBU
 
#define OP_MATCH_LDBUIO   OP_LDBUIO
 
#define OP_MATCH_LDH   OP_LDH
 
#define OP_MATCH_LDHIO   OP_LDHIO
 
#define OP_MATCH_LDHU   OP_LDHU
 
#define OP_MATCH_LDHUIO   OP_LDHUIO
 
#define OP_MATCH_LDL   OP_LDL
 
#define OP_MATCH_LDW   OP_LDW
 
#define OP_MATCH_LDWIO   OP_LDWIO
 
#define OP_MATCH_MULI   OP_MULI
 
#define OP_MATCH_OPX   OP_OPX
 
#define OP_MATCH_ORHI   OP_ORHI
 
#define OP_MATCH_ORI   OP_ORI
 
#define OP_MATCH_RDPRS   OP_RDPRS
 
#define OP_MATCH_STB   OP_STB
 
#define OP_MATCH_STBIO   OP_STBIO
 
#define OP_MATCH_STC   OP_STC
 
#define OP_MATCH_STH   OP_STH
 
#define OP_MATCH_STHIO   OP_STHIO
 
#define OP_MATCH_STW   OP_STW
 
#define OP_MATCH_STWIO   OP_STWIO
 
#define OP_MATCH_CUSTOM   OP_CUSTOM
 
#define OP_MATCH_XORHI   OP_XORHI
 
#define OP_MATCH_XORI   OP_XORI
 
#define OP_MATCH_OPX   OP_OPX
 
#define OPX_MATCH(code)   ((code << IW_OPX_LSB) | OP_OPX)
 
#define OP_MATCH_ADD   OPX_MATCH(OPX_ADD)
 
#define OP_MATCH_AND   OPX_MATCH(OPX_AND)
 
#define OP_MATCH_BREAK   ((0x1e << 17) | OPX_MATCH(OPX_BREAK))
 
#define OP_MATCH_BRET   (0xf0000000 | OPX_MATCH(OPX_BRET))
 
#define OP_MATCH_CALLR   ((0x1f << 17) | OPX_MATCH(OPX_CALLR))
 
#define OP_MATCH_CMPEQ   OPX_MATCH(OPX_CMPEQ)
 
#define OP_MATCH_CMPGE   OPX_MATCH(OPX_CMPGE)
 
#define OP_MATCH_CMPGEU   OPX_MATCH(OPX_CMPGEU)
 
#define OP_MATCH_CMPLT   OPX_MATCH(OPX_CMPLT)
 
#define OP_MATCH_CMPLTU   OPX_MATCH(OPX_CMPLTU)
 
#define OP_MATCH_CMPNE   OPX_MATCH(OPX_CMPNE)
 
#define OP_MATCH_DIV   OPX_MATCH(OPX_DIV)
 
#define OP_MATCH_DIVU   OPX_MATCH(OPX_DIVU)
 
#define OP_MATCH_JMP   OPX_MATCH(OPX_JMP)
 
#define OP_MATCH_MUL   OPX_MATCH(OPX_MUL)
 
#define OP_MATCH_MULXSS   OPX_MATCH(OPX_MULXSS)
 
#define OP_MATCH_MULXSU   OPX_MATCH(OPX_MULXSU)
 
#define OP_MATCH_MULXUU   OPX_MATCH(OPX_MULXUU)
 
#define OP_MATCH_NEXTPC   OPX_MATCH(OPX_NEXTPC)
 
#define OP_MATCH_NOR   OPX_MATCH(OPX_NOR)
 
#define OP_MATCH_OR   OPX_MATCH(OPX_OR)
 
#define OP_MATCH_RDCTL   OPX_MATCH(OPX_RDCTL)
 
#define OP_MATCH_RET   (0xf8000000 | OPX_MATCH(OPX_RET))
 
#define OP_MATCH_ROL   OPX_MATCH(OPX_ROL)
 
#define OP_MATCH_ROLI   OPX_MATCH(OPX_ROLI)
 
#define OP_MATCH_ROR   OPX_MATCH(OPX_ROR)
 
#define OP_MATCH_SLL   OPX_MATCH(OPX_SLL)
 
#define OP_MATCH_SLLI   OPX_MATCH(OPX_SLLI)
 
#define OP_MATCH_SRA   OPX_MATCH(OPX_SRA)
 
#define OP_MATCH_SRAI   OPX_MATCH(OPX_SRAI)
 
#define OP_MATCH_SRL   OPX_MATCH(OPX_SRL)
 
#define OP_MATCH_SRLI   OPX_MATCH(OPX_SRLI)
 
#define OP_MATCH_SUB   OPX_MATCH(OPX_SUB)
 
#define OP_MATCH_SYNC   OPX_MATCH(OPX_SYNC)
 
#define OP_MATCH_TRAP   ((0x1d << 17) | OPX_MATCH(OPX_TRAP))
 
#define OP_MATCH_ERET   (0xef800000 | OPX_MATCH(OPX_ERET))
 
#define OP_MATCH_WRCTL   OPX_MATCH(OPX_WRCTL)
 
#define OP_MATCH_WRPRS   OPX_MATCH(OPX_WRPRS)
 
#define OP_MATCH_XOR   OPX_MATCH(OPX_XOR)
 
#define OP_MATCH_FLUSHI   OPX_MATCH(OPX_FLUSHI)
 
#define OP_MATCH_FLUSHP   OPX_MATCH(OPX_FLUSHP)
 
#define OP_MATCH_INITI   OPX_MATCH(OPX_INITI)
 
#define OP_MASK_BREAK   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff03f)
 
#define OP_MASK_CALLR   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_JMP   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_SYNC   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_TRAP   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff83f)
 
#define OP_MASK_WRCTL   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */
 
#define OP_MASK_NEXTPC   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_FLUSHI   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_INITI   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_ROLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_SLLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_SRAI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_SRLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
 
#define OP_MASK_RDCTL   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */
 
#define OP_MASK   0xffffffff
 
#define GET_IW_A(Iw)    (((Iw) >> IW_A_LSB) & IW_A_MASK)
 
#define GET_IW_B(Iw)    (((Iw) >> IW_B_LSB) & IW_B_MASK)
 
#define GET_IW_C(Iw)    (((Iw) >> IW_C_LSB) & IW_C_MASK)
 
#define GET_IW_CONTROL_REGNUM(Iw)    (((Iw) >> IW_CONTROL_REGNUM_LSB) & IW_CONTROL_REGNUM_MASK)
 
#define GET_IW_IMM16(Iw)    (((Iw) >> IW_IMM16_LSB) & IW_IMM16_MASK)
 
#define GET_IW_IMM26(Iw)    (((Iw) >> IW_IMM26_LSB) & IW_IMM26_MASK)
 
#define GET_IW_OP(Iw)    (((Iw) >> IW_OP_LSB) & IW_OP_MASK)
 
#define GET_IW_OPX(Iw)    (((Iw) >> IW_OPX_LSB) & IW_OPX_MASK)
 
#define NUMOPCODES   bfd_nios2_num_opcodes
 
#define NUMREGISTERS   nios2_num_regs;
 

Enumerations

enum  overflow_type {
  call_target_overflow = 0 , branch_target_overflow , address_offset_overflow , signed_immed16_overflow ,
  unsigned_immed16_overflow , unsigned_immed5_overflow , custom_opcode_overflow , no_overflow
}
 

Functions

const struct nios2_opcodenios2_find_opcode_hash (unsigned long)
 

Variables

const struct nios2_opcode nios2_builtin_opcodes []
 
const int bfd_nios2_num_builtin_opcodes
 
struct nios2_opcodenios2_opcodes
 
int bfd_nios2_num_opcodes
 
const struct nios2_reg nios2_builtin_regs []
 
struct nios2_regnios2_regs
 
const int nios2_num_builtin_regs
 
int nios2_num_regs
 

Macro Definition Documentation

◆ GET_INSN_FIELD

#define GET_INSN_FIELD (   X,
  i 
)     (((i)&OP_MASK_##X) >> OP_SH_##X)

Definition at line 126 of file nios2.h.

◆ GET_IW_A

#define GET_IW_A (   Iw)     (((Iw) >> IW_A_LSB) & IW_A_MASK)

Definition at line 471 of file nios2.h.

◆ GET_IW_B

#define GET_IW_B (   Iw)     (((Iw) >> IW_B_LSB) & IW_B_MASK)

Definition at line 473 of file nios2.h.

◆ GET_IW_C

#define GET_IW_C (   Iw)     (((Iw) >> IW_C_LSB) & IW_C_MASK)

Definition at line 475 of file nios2.h.

◆ GET_IW_CONTROL_REGNUM

#define GET_IW_CONTROL_REGNUM (   Iw)     (((Iw) >> IW_CONTROL_REGNUM_LSB) & IW_CONTROL_REGNUM_MASK)

Definition at line 477 of file nios2.h.

◆ GET_IW_IMM16

#define GET_IW_IMM16 (   Iw)     (((Iw) >> IW_IMM16_LSB) & IW_IMM16_MASK)

Definition at line 479 of file nios2.h.

◆ GET_IW_IMM26

#define GET_IW_IMM26 (   Iw)     (((Iw) >> IW_IMM26_LSB) & IW_IMM26_MASK)

Definition at line 481 of file nios2.h.

◆ GET_IW_OP

#define GET_IW_OP (   Iw)     (((Iw) >> IW_OP_LSB) & IW_OP_MASK)

Definition at line 483 of file nios2.h.

◆ GET_IW_OPX

#define GET_IW_OPX (   Iw)     (((Iw) >> IW_OPX_LSB) & IW_OPX_MASK)

Definition at line 485 of file nios2.h.

◆ IW_A_LSB

#define IW_A_LSB   27

Definition at line 132 of file nios2.h.

◆ IW_A_MASK

#define IW_A_MASK   0x1f

Definition at line 135 of file nios2.h.

◆ IW_A_MSB

#define IW_A_MSB   31

Definition at line 133 of file nios2.h.

◆ IW_A_SZ

#define IW_A_SZ   5

Definition at line 134 of file nios2.h.

◆ IW_B_LSB

#define IW_B_LSB   22

Definition at line 137 of file nios2.h.

◆ IW_B_MASK

#define IW_B_MASK   0x1f

Definition at line 140 of file nios2.h.

◆ IW_B_MSB

#define IW_B_MSB   26

Definition at line 138 of file nios2.h.

◆ IW_B_SZ

#define IW_B_SZ   5

Definition at line 139 of file nios2.h.

◆ IW_C_LSB

#define IW_C_LSB   17

Definition at line 142 of file nios2.h.

◆ IW_C_MASK

#define IW_C_MASK   0x1f

Definition at line 145 of file nios2.h.

◆ IW_C_MSB

#define IW_C_MSB   21

Definition at line 143 of file nios2.h.

◆ IW_C_SZ

#define IW_C_SZ   5

Definition at line 144 of file nios2.h.

◆ IW_CONTROL_REGNUM_LSB

#define IW_CONTROL_REGNUM_LSB   6

Definition at line 172 of file nios2.h.

◆ IW_CONTROL_REGNUM_MASK

#define IW_CONTROL_REGNUM_MASK   0xf

Definition at line 175 of file nios2.h.

◆ IW_CONTROL_REGNUM_MSB

#define IW_CONTROL_REGNUM_MSB   9

Definition at line 173 of file nios2.h.

◆ IW_CONTROL_REGNUM_SZ

#define IW_CONTROL_REGNUM_SZ   4

Definition at line 174 of file nios2.h.

◆ IW_IMM16_LSB

#define IW_IMM16_LSB   6

Definition at line 147 of file nios2.h.

◆ IW_IMM16_MASK

#define IW_IMM16_MASK   0xffff

Definition at line 150 of file nios2.h.

◆ IW_IMM16_MSB

#define IW_IMM16_MSB   21

Definition at line 148 of file nios2.h.

◆ IW_IMM16_SZ

#define IW_IMM16_SZ   16

Definition at line 149 of file nios2.h.

◆ IW_IMM26_LSB

#define IW_IMM26_LSB   6

Definition at line 152 of file nios2.h.

◆ IW_IMM26_MASK

#define IW_IMM26_MASK   0x3ffffff

Definition at line 155 of file nios2.h.

◆ IW_IMM26_MSB

#define IW_IMM26_MSB   31

Definition at line 153 of file nios2.h.

◆ IW_IMM26_SZ

#define IW_IMM26_SZ   26

Definition at line 154 of file nios2.h.

◆ IW_OP_LSB

#define IW_OP_LSB   0

Definition at line 157 of file nios2.h.

◆ IW_OP_MASK

#define IW_OP_MASK   0x3f

Definition at line 160 of file nios2.h.

◆ IW_OP_MSB

#define IW_OP_MSB   5

Definition at line 158 of file nios2.h.

◆ IW_OP_SZ

#define IW_OP_SZ   6

Definition at line 159 of file nios2.h.

◆ IW_OPX_LSB

#define IW_OPX_LSB   11

Definition at line 162 of file nios2.h.

◆ IW_OPX_MASK

#define IW_OPX_MASK   0x3f

Definition at line 165 of file nios2.h.

◆ IW_OPX_MSB

#define IW_OPX_MSB   16

Definition at line 163 of file nios2.h.

◆ IW_OPX_SZ

#define IW_OPX_SZ   6

Definition at line 164 of file nios2.h.

◆ IW_SHIFT_IMM5_LSB

#define IW_SHIFT_IMM5_LSB   6

Definition at line 167 of file nios2.h.

◆ IW_SHIFT_IMM5_MASK

#define IW_SHIFT_IMM5_MASK   0x1f

Definition at line 170 of file nios2.h.

◆ IW_SHIFT_IMM5_MSB

#define IW_SHIFT_IMM5_MSB   10

Definition at line 168 of file nios2.h.

◆ IW_SHIFT_IMM5_SZ

#define IW_SHIFT_IMM5_SZ   5

Definition at line 169 of file nios2.h.

◆ NIOS2_INSN_ADDI

#define NIOS2_INSN_ADDI   0x00000080

Definition at line 111 of file nios2.h.

◆ NIOS2_INSN_ANDI

#define NIOS2_INSN_ANDI   0x00000100

Definition at line 112 of file nios2.h.

◆ NIOS2_INSN_CALL

#define NIOS2_INSN_CALL   0x00000040

Definition at line 109 of file nios2.h.

◆ NIOS2_INSN_CBRANCH

#define NIOS2_INSN_CBRANCH   0x00000020

Definition at line 108 of file nios2.h.

◆ NIOS2_INSN_MACRO

#define NIOS2_INSN_MACRO   0x80000000

Definition at line 101 of file nios2.h.

◆ NIOS2_INSN_MACRO_MOV

#define NIOS2_INSN_MACRO_MOV   0x80000001

Definition at line 102 of file nios2.h.

◆ NIOS2_INSN_MACRO_MOVI

#define NIOS2_INSN_MACRO_MOVI   0x80000002

Definition at line 103 of file nios2.h.

◆ NIOS2_INSN_MACRO_MOVIA

#define NIOS2_INSN_MACRO_MOVIA   0x80000004

Definition at line 104 of file nios2.h.

◆ NIOS2_INSN_ORI

#define NIOS2_INSN_ORI   0x00000200

Definition at line 113 of file nios2.h.

◆ NIOS2_INSN_RELAXABLE

#define NIOS2_INSN_RELAXABLE   0x40000000

Definition at line 106 of file nios2.h.

◆ NIOS2_INSN_UBRANCH

#define NIOS2_INSN_UBRANCH   0x00000010

Definition at line 107 of file nios2.h.

◆ NIOS2_INSN_XORI

#define NIOS2_INSN_XORI   0x00000400

Definition at line 114 of file nios2.h.

◆ NUMOPCODES

#define NUMOPCODES   bfd_nios2_num_opcodes

Definition at line 501 of file nios2.h.

◆ NUMREGISTERS

#define NUMREGISTERS   nios2_num_regs;

Definition at line 502 of file nios2.h.

◆ OP_ADDI

#define OP_ADDI   4

Definition at line 253 of file nios2.h.

◆ OP_ANDHI

#define OP_ANDHI   44

Definition at line 254 of file nios2.h.

◆ OP_ANDI

#define OP_ANDI   12

Definition at line 255 of file nios2.h.

◆ OP_BEQ

#define OP_BEQ   38

Definition at line 256 of file nios2.h.

◆ OP_BGE

#define OP_BGE   14

Definition at line 257 of file nios2.h.

◆ OP_BGEU

#define OP_BGEU   46

Definition at line 258 of file nios2.h.

◆ OP_BLT

#define OP_BLT   22

Definition at line 259 of file nios2.h.

◆ OP_BLTU

#define OP_BLTU   54

Definition at line 260 of file nios2.h.

◆ OP_BNE

#define OP_BNE   30

Definition at line 261 of file nios2.h.

◆ OP_BR

#define OP_BR   6

Definition at line 262 of file nios2.h.

◆ OP_CALL

#define OP_CALL   0

Definition at line 263 of file nios2.h.

◆ OP_CMPEQI

#define OP_CMPEQI   32

Definition at line 264 of file nios2.h.

◆ OP_CMPGEI

#define OP_CMPGEI   8

Definition at line 265 of file nios2.h.

◆ OP_CMPGEUI

#define OP_CMPGEUI   40

Definition at line 266 of file nios2.h.

◆ OP_CMPLTI

#define OP_CMPLTI   16

Definition at line 267 of file nios2.h.

◆ OP_CMPLTUI

#define OP_CMPLTUI   48

Definition at line 268 of file nios2.h.

◆ OP_CMPNEI

#define OP_CMPNEI   24

Definition at line 269 of file nios2.h.

◆ OP_CUSTOM

#define OP_CUSTOM   50

Definition at line 270 of file nios2.h.

◆ OP_FLUSHD

#define OP_FLUSHD   59

Definition at line 271 of file nios2.h.

◆ OP_FLUSHDA

#define OP_FLUSHDA   27

Definition at line 272 of file nios2.h.

◆ OP_INITD

#define OP_INITD   51

Definition at line 273 of file nios2.h.

◆ OP_INITDA

#define OP_INITDA   19

Definition at line 274 of file nios2.h.

◆ OP_JMPI

#define OP_JMPI   1

Definition at line 275 of file nios2.h.

◆ OP_LDB

#define OP_LDB   7

Definition at line 276 of file nios2.h.

◆ OP_LDBIO

#define OP_LDBIO   39

Definition at line 277 of file nios2.h.

◆ OP_LDBU

#define OP_LDBU   3

Definition at line 278 of file nios2.h.

◆ OP_LDBUIO

#define OP_LDBUIO   35

Definition at line 279 of file nios2.h.

◆ OP_LDH

#define OP_LDH   15

Definition at line 280 of file nios2.h.

◆ OP_LDHIO

#define OP_LDHIO   47

Definition at line 281 of file nios2.h.

◆ OP_LDHU

#define OP_LDHU   11

Definition at line 282 of file nios2.h.

◆ OP_LDHUIO

#define OP_LDHUIO   43

Definition at line 283 of file nios2.h.

◆ OP_LDL

#define OP_LDL   31

Definition at line 284 of file nios2.h.

◆ OP_LDW

#define OP_LDW   23

Definition at line 285 of file nios2.h.

◆ OP_LDWIO

#define OP_LDWIO   55

Definition at line 286 of file nios2.h.

◆ OP_MASK

#define OP_MASK   0xffffffff

Definition at line 467 of file nios2.h.

◆ OP_MASK_BREAK

#define OP_MASK_BREAK   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff03f)

Definition at line 450 of file nios2.h.

◆ OP_MASK_CACHE_OPX

#define OP_MASK_CACHE_OPX   (IW_B_MASK << IW_B_LSB)

Definition at line 233 of file nios2.h.

◆ OP_MASK_CACHE_RRS

#define OP_MASK_CACHE_RRS   (IW_A_MASK << IW_A_LSB)

Definition at line 235 of file nios2.h.

◆ OP_MASK_CALLR

#define OP_MASK_CALLR   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 451 of file nios2.h.

◆ OP_MASK_CUSTOM_A

#define OP_MASK_CUSTOM_A   0x00010000

Definition at line 239 of file nios2.h.

◆ OP_MASK_CUSTOM_B

#define OP_MASK_CUSTOM_B   0x00008000

Definition at line 242 of file nios2.h.

◆ OP_MASK_CUSTOM_C

#define OP_MASK_CUSTOM_C   0x00004000

Definition at line 245 of file nios2.h.

◆ OP_MASK_CUSTOM_N

#define OP_MASK_CUSTOM_N   0x00003fc0

Definition at line 248 of file nios2.h.

◆ OP_MASK_FLUSHI

#define OP_MASK_FLUSHI   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 457 of file nios2.h.

◆ OP_MASK_IMM16

#define OP_MASK_IMM16   (IW_IMM16_MASK << IW_IMM16_LSB)

Definition at line 185 of file nios2.h.

◆ OP_MASK_IMM26

#define OP_MASK_IMM26   (IW_IMM26_MASK << IW_IMM26_LSB)

Definition at line 217 of file nios2.h.

◆ OP_MASK_IMM5

#define OP_MASK_IMM5   (IW_SHIFT_IMM5_MASK << IW_SHIFT_IMM5_LSB)

Definition at line 229 of file nios2.h.

◆ OP_MASK_INITI

#define OP_MASK_INITI   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 458 of file nios2.h.

◆ OP_MASK_IOP

#define OP_MASK_IOP   (IW_OP_MASK << IW_OP_LSB)

Definition at line 182 of file nios2.h.

◆ OP_MASK_IRD

#define OP_MASK_IRD   (IW_B_MASK << IW_B_LSB)

Definition at line 188 of file nios2.h.

◆ OP_MASK_IRS

#define OP_MASK_IRS   (IW_A_MASK << IW_A_LSB)

Definition at line 194 of file nios2.h.

◆ OP_MASK_IRT

#define OP_MASK_IRT   (IW_B_MASK << IW_B_LSB)

Definition at line 191 of file nios2.h.

◆ OP_MASK_JMP

#define OP_MASK_JMP   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 452 of file nios2.h.

◆ OP_MASK_JOP

#define OP_MASK_JOP   (IW_OP_MASK << IW_OP_LSB)

Definition at line 214 of file nios2.h.

◆ OP_MASK_NEXTPC

#define OP_MASK_NEXTPC   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 456 of file nios2.h.

◆ OP_MASK_OP

#define OP_MASK_OP   (IW_OP_MASK << IW_OP_LSB)

Definition at line 178 of file nios2.h.

◆ OP_MASK_RCTL

#define OP_MASK_RCTL   0x000007c0

Definition at line 221 of file nios2.h.

◆ OP_MASK_RDCTL

#define OP_MASK_RDCTL   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */

Definition at line 464 of file nios2.h.

◆ OP_MASK_ROLI

#define OP_MASK_ROLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 460 of file nios2.h.

◆ OP_MASK_ROP

#define OP_MASK_ROP   (IW_OP_MASK << IW_OP_LSB)

Definition at line 198 of file nios2.h.

◆ OP_MASK_ROPX

#define OP_MASK_ROPX   (IW_OPX_MASK << IW_OPX_LSB)

Definition at line 201 of file nios2.h.

◆ OP_MASK_RRD

#define OP_MASK_RRD   (IW_C_MASK << IW_C_LSB)

Definition at line 204 of file nios2.h.

◆ OP_MASK_RRS

#define OP_MASK_RRS   (IW_A_MASK << IW_A_LSB)

Definition at line 210 of file nios2.h.

◆ OP_MASK_RRT

#define OP_MASK_RRT   (IW_B_MASK << IW_B_LSB)

Definition at line 207 of file nios2.h.

◆ OP_MASK_SLLI

#define OP_MASK_SLLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 461 of file nios2.h.

◆ OP_MASK_SRAI

#define OP_MASK_SRAI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 462 of file nios2.h.

◆ OP_MASK_SRLI

#define OP_MASK_SRLI   ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 463 of file nios2.h.

◆ OP_MASK_SYNC

#define OP_MASK_SYNC   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))

Definition at line 453 of file nios2.h.

◆ OP_MASK_TRAP

#define OP_MASK_TRAP   ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff83f)

Definition at line 454 of file nios2.h.

◆ OP_MASK_TRAP_IMM5

#define OP_MASK_TRAP_IMM5   0x000007c0

Definition at line 225 of file nios2.h.

◆ OP_MASK_WRCTL

#define OP_MASK_WRCTL   ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */

Definition at line 455 of file nios2.h.

◆ OP_MATCH_ADD

#define OP_MATCH_ADD   OPX_MATCH(OPX_ADD)

Definition at line 406 of file nios2.h.

◆ OP_MATCH_ADDI

#define OP_MATCH_ADDI   OP_ADDI

Definition at line 353 of file nios2.h.

◆ OP_MATCH_AND

#define OP_MATCH_AND   OPX_MATCH(OPX_AND)

Definition at line 407 of file nios2.h.

◆ OP_MATCH_ANDHI

#define OP_MATCH_ANDHI   OP_ANDHI

Definition at line 354 of file nios2.h.

◆ OP_MATCH_ANDI

#define OP_MATCH_ANDI   OP_ANDI

Definition at line 355 of file nios2.h.

◆ OP_MATCH_BEQ

#define OP_MATCH_BEQ   OP_BEQ

Definition at line 356 of file nios2.h.

◆ OP_MATCH_BGE

#define OP_MATCH_BGE   OP_BGE

Definition at line 357 of file nios2.h.

◆ OP_MATCH_BGEU

#define OP_MATCH_BGEU   OP_BGEU

Definition at line 358 of file nios2.h.

◆ OP_MATCH_BLT

#define OP_MATCH_BLT   OP_BLT

Definition at line 359 of file nios2.h.

◆ OP_MATCH_BLTU

#define OP_MATCH_BLTU   OP_BLTU

Definition at line 360 of file nios2.h.

◆ OP_MATCH_BNE

#define OP_MATCH_BNE   OP_BNE

Definition at line 361 of file nios2.h.

◆ OP_MATCH_BR

#define OP_MATCH_BR   OP_BR

Definition at line 362 of file nios2.h.

◆ OP_MATCH_BREAK

#define OP_MATCH_BREAK   ((0x1e << 17) | OPX_MATCH(OPX_BREAK))

Definition at line 408 of file nios2.h.

◆ OP_MATCH_BRET

#define OP_MATCH_BRET   (0xf0000000 | OPX_MATCH(OPX_BRET))

Definition at line 409 of file nios2.h.

◆ OP_MATCH_CALL

#define OP_MATCH_CALL   OP_CALL

Definition at line 367 of file nios2.h.

◆ OP_MATCH_CALLR

#define OP_MATCH_CALLR   ((0x1f << 17) | OPX_MATCH(OPX_CALLR))

Definition at line 410 of file nios2.h.

◆ OP_MATCH_CMPEQ

#define OP_MATCH_CMPEQ   OPX_MATCH(OPX_CMPEQ)

Definition at line 411 of file nios2.h.

◆ OP_MATCH_CMPEQI

#define OP_MATCH_CMPEQI   OP_CMPEQI

Definition at line 368 of file nios2.h.

◆ OP_MATCH_CMPGE

#define OP_MATCH_CMPGE   OPX_MATCH(OPX_CMPGE)

Definition at line 412 of file nios2.h.

◆ OP_MATCH_CMPGEI

#define OP_MATCH_CMPGEI   OP_CMPGEI

Definition at line 369 of file nios2.h.

◆ OP_MATCH_CMPGEU

#define OP_MATCH_CMPGEU   OPX_MATCH(OPX_CMPGEU)

Definition at line 413 of file nios2.h.

◆ OP_MATCH_CMPGEUI

#define OP_MATCH_CMPGEUI   OP_CMPGEUI

Definition at line 370 of file nios2.h.

◆ OP_MATCH_CMPLT

#define OP_MATCH_CMPLT   OPX_MATCH(OPX_CMPLT)

Definition at line 414 of file nios2.h.

◆ OP_MATCH_CMPLTI

#define OP_MATCH_CMPLTI   OP_CMPLTI

Definition at line 371 of file nios2.h.

◆ OP_MATCH_CMPLTU

#define OP_MATCH_CMPLTU   OPX_MATCH(OPX_CMPLTU)

Definition at line 415 of file nios2.h.

◆ OP_MATCH_CMPLTUI

#define OP_MATCH_CMPLTUI   OP_CMPLTUI

Definition at line 372 of file nios2.h.

◆ OP_MATCH_CMPNE

#define OP_MATCH_CMPNE   OPX_MATCH(OPX_CMPNE)

Definition at line 416 of file nios2.h.

◆ OP_MATCH_CMPNEI

#define OP_MATCH_CMPNEI   OP_CMPNEI

Definition at line 373 of file nios2.h.

◆ OP_MATCH_CUSTOM

#define OP_MATCH_CUSTOM   OP_CUSTOM

Definition at line 398 of file nios2.h.

◆ OP_MATCH_DIV

#define OP_MATCH_DIV   OPX_MATCH(OPX_DIV)

Definition at line 417 of file nios2.h.

◆ OP_MATCH_DIVU

#define OP_MATCH_DIVU   OPX_MATCH(OPX_DIVU)

Definition at line 418 of file nios2.h.

◆ OP_MATCH_ERET

#define OP_MATCH_ERET   (0xef800000 | OPX_MATCH(OPX_ERET))

Definition at line 441 of file nios2.h.

◆ OP_MATCH_FLUSHD

#define OP_MATCH_FLUSHD   OP_FLUSHD

Definition at line 363 of file nios2.h.

◆ OP_MATCH_FLUSHDA

#define OP_MATCH_FLUSHDA   OP_FLUSHDA

Definition at line 364 of file nios2.h.

◆ OP_MATCH_FLUSHI

#define OP_MATCH_FLUSHI   OPX_MATCH(OPX_FLUSHI)

Definition at line 445 of file nios2.h.

◆ OP_MATCH_FLUSHP

#define OP_MATCH_FLUSHP   OPX_MATCH(OPX_FLUSHP)

Definition at line 446 of file nios2.h.

◆ OP_MATCH_INITD

#define OP_MATCH_INITD   OP_INITD

Definition at line 365 of file nios2.h.

◆ OP_MATCH_INITDA

#define OP_MATCH_INITDA   OP_INITDA

Definition at line 366 of file nios2.h.

◆ OP_MATCH_INITI

#define OP_MATCH_INITI   OPX_MATCH(OPX_INITI)

Definition at line 447 of file nios2.h.

◆ OP_MATCH_JMP

#define OP_MATCH_JMP   OPX_MATCH(OPX_JMP)

Definition at line 419 of file nios2.h.

◆ OP_MATCH_JMPI

#define OP_MATCH_JMPI   OP_JMPI

Definition at line 374 of file nios2.h.

◆ OP_MATCH_LDB

#define OP_MATCH_LDB   OP_LDB

Definition at line 375 of file nios2.h.

◆ OP_MATCH_LDBIO

#define OP_MATCH_LDBIO   OP_LDBIO

Definition at line 376 of file nios2.h.

◆ OP_MATCH_LDBU

#define OP_MATCH_LDBU   OP_LDBU

Definition at line 377 of file nios2.h.

◆ OP_MATCH_LDBUIO

#define OP_MATCH_LDBUIO   OP_LDBUIO

Definition at line 378 of file nios2.h.

◆ OP_MATCH_LDH

#define OP_MATCH_LDH   OP_LDH

Definition at line 379 of file nios2.h.

◆ OP_MATCH_LDHIO

#define OP_MATCH_LDHIO   OP_LDHIO

Definition at line 380 of file nios2.h.

◆ OP_MATCH_LDHU

#define OP_MATCH_LDHU   OP_LDHU

Definition at line 381 of file nios2.h.

◆ OP_MATCH_LDHUIO

#define OP_MATCH_LDHUIO   OP_LDHUIO

Definition at line 382 of file nios2.h.

◆ OP_MATCH_LDL

#define OP_MATCH_LDL   OP_LDL

Definition at line 383 of file nios2.h.

◆ OP_MATCH_LDW

#define OP_MATCH_LDW   OP_LDW

Definition at line 384 of file nios2.h.

◆ OP_MATCH_LDWIO

#define OP_MATCH_LDWIO   OP_LDWIO

Definition at line 385 of file nios2.h.

◆ OP_MATCH_MUL

#define OP_MATCH_MUL   OPX_MATCH(OPX_MUL)

Definition at line 420 of file nios2.h.

◆ OP_MATCH_MULI

#define OP_MATCH_MULI   OP_MULI

Definition at line 386 of file nios2.h.

◆ OP_MATCH_MULXSS

#define OP_MATCH_MULXSS   OPX_MATCH(OPX_MULXSS)

Definition at line 421 of file nios2.h.

◆ OP_MATCH_MULXSU

#define OP_MATCH_MULXSU   OPX_MATCH(OPX_MULXSU)

Definition at line 422 of file nios2.h.

◆ OP_MATCH_MULXUU

#define OP_MATCH_MULXUU   OPX_MATCH(OPX_MULXUU)

Definition at line 423 of file nios2.h.

◆ OP_MATCH_NEXTPC

#define OP_MATCH_NEXTPC   OPX_MATCH(OPX_NEXTPC)

Definition at line 424 of file nios2.h.

◆ OP_MATCH_NOR

#define OP_MATCH_NOR   OPX_MATCH(OPX_NOR)

Definition at line 425 of file nios2.h.

◆ OP_MATCH_OPX [1/2]

#define OP_MATCH_OPX   OP_OPX

Definition at line 401 of file nios2.h.

◆ OP_MATCH_OPX [2/2]

#define OP_MATCH_OPX   OP_OPX

Definition at line 401 of file nios2.h.

◆ OP_MATCH_OR

#define OP_MATCH_OR   OPX_MATCH(OPX_OR)

Definition at line 426 of file nios2.h.

◆ OP_MATCH_ORHI

#define OP_MATCH_ORHI   OP_ORHI

Definition at line 388 of file nios2.h.

◆ OP_MATCH_ORI

#define OP_MATCH_ORI   OP_ORI

Definition at line 389 of file nios2.h.

◆ OP_MATCH_RDCTL

#define OP_MATCH_RDCTL   OPX_MATCH(OPX_RDCTL)

Definition at line 427 of file nios2.h.

◆ OP_MATCH_RDPRS

#define OP_MATCH_RDPRS   OP_RDPRS

Definition at line 390 of file nios2.h.

◆ OP_MATCH_RET

#define OP_MATCH_RET   (0xf8000000 | OPX_MATCH(OPX_RET))

Definition at line 428 of file nios2.h.

◆ OP_MATCH_ROL

#define OP_MATCH_ROL   OPX_MATCH(OPX_ROL)

Definition at line 429 of file nios2.h.

◆ OP_MATCH_ROLI

#define OP_MATCH_ROLI   OPX_MATCH(OPX_ROLI)

Definition at line 430 of file nios2.h.

◆ OP_MATCH_ROR

#define OP_MATCH_ROR   OPX_MATCH(OPX_ROR)

Definition at line 431 of file nios2.h.

◆ OP_MATCH_SLL

#define OP_MATCH_SLL   OPX_MATCH(OPX_SLL)

Definition at line 432 of file nios2.h.

◆ OP_MATCH_SLLI

#define OP_MATCH_SLLI   OPX_MATCH(OPX_SLLI)

Definition at line 433 of file nios2.h.

◆ OP_MATCH_SRA

#define OP_MATCH_SRA   OPX_MATCH(OPX_SRA)

Definition at line 434 of file nios2.h.

◆ OP_MATCH_SRAI

#define OP_MATCH_SRAI   OPX_MATCH(OPX_SRAI)

Definition at line 435 of file nios2.h.

◆ OP_MATCH_SRL

#define OP_MATCH_SRL   OPX_MATCH(OPX_SRL)

Definition at line 436 of file nios2.h.

◆ OP_MATCH_SRLI

#define OP_MATCH_SRLI   OPX_MATCH(OPX_SRLI)

Definition at line 437 of file nios2.h.

◆ OP_MATCH_STB

#define OP_MATCH_STB   OP_STB

Definition at line 391 of file nios2.h.

◆ OP_MATCH_STBIO

#define OP_MATCH_STBIO   OP_STBIO

Definition at line 392 of file nios2.h.

◆ OP_MATCH_STC

#define OP_MATCH_STC   OP_STC

Definition at line 393 of file nios2.h.

◆ OP_MATCH_STH

#define OP_MATCH_STH   OP_STH

Definition at line 394 of file nios2.h.

◆ OP_MATCH_STHIO

#define OP_MATCH_STHIO   OP_STHIO

Definition at line 395 of file nios2.h.

◆ OP_MATCH_STW

#define OP_MATCH_STW   OP_STW

Definition at line 396 of file nios2.h.

◆ OP_MATCH_STWIO

#define OP_MATCH_STWIO   OP_STWIO

Definition at line 397 of file nios2.h.

◆ OP_MATCH_SUB

#define OP_MATCH_SUB   OPX_MATCH(OPX_SUB)

Definition at line 438 of file nios2.h.

◆ OP_MATCH_SYNC

#define OP_MATCH_SYNC   OPX_MATCH(OPX_SYNC)

Definition at line 439 of file nios2.h.

◆ OP_MATCH_TRAP

#define OP_MATCH_TRAP   ((0x1d << 17) | OPX_MATCH(OPX_TRAP))

Definition at line 440 of file nios2.h.

◆ OP_MATCH_WRCTL

#define OP_MATCH_WRCTL   OPX_MATCH(OPX_WRCTL)

Definition at line 442 of file nios2.h.

◆ OP_MATCH_WRPRS

#define OP_MATCH_WRPRS   OPX_MATCH(OPX_WRPRS)

Definition at line 443 of file nios2.h.

◆ OP_MATCH_XOR

#define OP_MATCH_XOR   OPX_MATCH(OPX_XOR)

Definition at line 444 of file nios2.h.

◆ OP_MATCH_XORHI

#define OP_MATCH_XORHI   OP_XORHI

Definition at line 399 of file nios2.h.

◆ OP_MATCH_XORI

#define OP_MATCH_XORI   OP_XORI

Definition at line 400 of file nios2.h.

◆ OP_MAX_CUSTOM_N

#define OP_MAX_CUSTOM_N   255

Definition at line 250 of file nios2.h.

◆ OP_MULI

#define OP_MULI   36

Definition at line 287 of file nios2.h.

◆ OP_OPX

#define OP_OPX   58

Definition at line 288 of file nios2.h.

◆ OP_ORHI

#define OP_ORHI   52

Definition at line 289 of file nios2.h.

◆ OP_ORI

#define OP_ORI   20

Definition at line 290 of file nios2.h.

◆ OP_RDPRS

#define OP_RDPRS   56

Definition at line 291 of file nios2.h.

◆ OP_SH_CACHE_OPX

#define OP_SH_CACHE_OPX   IW_B_LSB

Definition at line 234 of file nios2.h.

◆ OP_SH_CACHE_RRS

#define OP_SH_CACHE_RRS   IW_A_LSB

Definition at line 236 of file nios2.h.

◆ OP_SH_CUSTOM_A

#define OP_SH_CUSTOM_A   16

Definition at line 240 of file nios2.h.

◆ OP_SH_CUSTOM_B

#define OP_SH_CUSTOM_B   15

Definition at line 243 of file nios2.h.

◆ OP_SH_CUSTOM_C

#define OP_SH_CUSTOM_C   14

Definition at line 246 of file nios2.h.

◆ OP_SH_CUSTOM_N

#define OP_SH_CUSTOM_N   6

Definition at line 249 of file nios2.h.

◆ OP_SH_IMM16

#define OP_SH_IMM16   IW_IMM16_LSB

Definition at line 186 of file nios2.h.

◆ OP_SH_IMM26

#define OP_SH_IMM26   IW_IMM26_LSB

Definition at line 218 of file nios2.h.

◆ OP_SH_IMM5

#define OP_SH_IMM5   IW_SHIFT_IMM5_LSB

Definition at line 230 of file nios2.h.

◆ OP_SH_IOP

#define OP_SH_IOP   IW_OP_LSB

Definition at line 183 of file nios2.h.

◆ OP_SH_IRD

#define OP_SH_IRD   IW_B_LSB /* The same as T for I-type. */

Definition at line 189 of file nios2.h.

◆ OP_SH_IRS

#define OP_SH_IRS   IW_A_LSB

Definition at line 195 of file nios2.h.

◆ OP_SH_IRT

#define OP_SH_IRT   IW_B_LSB

Definition at line 192 of file nios2.h.

◆ OP_SH_JOP

#define OP_SH_JOP   IW_OP_LSB

Definition at line 215 of file nios2.h.

◆ OP_SH_OP

#define OP_SH_OP   IW_OP_LSB

Definition at line 179 of file nios2.h.

◆ OP_SH_RCTL

#define OP_SH_RCTL   6

Definition at line 222 of file nios2.h.

◆ OP_SH_ROP

#define OP_SH_ROP   IW_OP_LSB

Definition at line 199 of file nios2.h.

◆ OP_SH_ROPX

#define OP_SH_ROPX   IW_OPX_LSB

Definition at line 202 of file nios2.h.

◆ OP_SH_RRD

#define OP_SH_RRD   IW_C_LSB

Definition at line 205 of file nios2.h.

◆ OP_SH_RRS

#define OP_SH_RRS   IW_A_LSB

Definition at line 211 of file nios2.h.

◆ OP_SH_RRT

#define OP_SH_RRT   IW_B_LSB

Definition at line 208 of file nios2.h.

◆ OP_SH_TRAP_IMM5

#define OP_SH_TRAP_IMM5   6

Definition at line 226 of file nios2.h.

◆ OP_STB

#define OP_STB   5

Definition at line 292 of file nios2.h.

◆ OP_STBIO

#define OP_STBIO   37

Definition at line 293 of file nios2.h.

◆ OP_STC

#define OP_STC   29

Definition at line 294 of file nios2.h.

◆ OP_STH

#define OP_STH   13

Definition at line 295 of file nios2.h.

◆ OP_STHIO

#define OP_STHIO   45

Definition at line 296 of file nios2.h.

◆ OP_STW

#define OP_STW   21

Definition at line 297 of file nios2.h.

◆ OP_STWIO

#define OP_STWIO   53

Definition at line 298 of file nios2.h.

◆ OP_XORHI

#define OP_XORHI   60

Definition at line 299 of file nios2.h.

◆ OP_XORI

#define OP_XORI   28

Definition at line 300 of file nios2.h.

◆ OPX_ADD

#define OPX_ADD   49

Definition at line 303 of file nios2.h.

◆ OPX_AND

#define OPX_AND   14

Definition at line 304 of file nios2.h.

◆ OPX_BREAK

#define OPX_BREAK   52

Definition at line 305 of file nios2.h.

◆ OPX_BRET

#define OPX_BRET   9

Definition at line 306 of file nios2.h.

◆ OPX_CALLR

#define OPX_CALLR   29

Definition at line 307 of file nios2.h.

◆ OPX_CMPEQ

#define OPX_CMPEQ   32

Definition at line 308 of file nios2.h.

◆ OPX_CMPGE

#define OPX_CMPGE   8

Definition at line 309 of file nios2.h.

◆ OPX_CMPGEU

#define OPX_CMPGEU   40

Definition at line 310 of file nios2.h.

◆ OPX_CMPLT

#define OPX_CMPLT   16

Definition at line 311 of file nios2.h.

◆ OPX_CMPLTU

#define OPX_CMPLTU   48

Definition at line 312 of file nios2.h.

◆ OPX_CMPNE

#define OPX_CMPNE   24

Definition at line 313 of file nios2.h.

◆ OPX_CRST

#define OPX_CRST   62

Definition at line 314 of file nios2.h.

◆ OPX_DIV

#define OPX_DIV   37

Definition at line 315 of file nios2.h.

◆ OPX_DIVU

#define OPX_DIVU   36

Definition at line 316 of file nios2.h.

◆ OPX_ERET

#define OPX_ERET   1

Definition at line 317 of file nios2.h.

◆ OPX_FLUSHI

#define OPX_FLUSHI   12

Definition at line 318 of file nios2.h.

◆ OPX_FLUSHP

#define OPX_FLUSHP   4

Definition at line 319 of file nios2.h.

◆ OPX_HBREAK

#define OPX_HBREAK   53

Definition at line 320 of file nios2.h.

◆ OPX_INITI

#define OPX_INITI   41

Definition at line 321 of file nios2.h.

◆ OPX_INTR

#define OPX_INTR   61

Definition at line 322 of file nios2.h.

◆ OPX_JMP

#define OPX_JMP   13

Definition at line 323 of file nios2.h.

◆ OPX_MATCH

#define OPX_MATCH (   code)    ((code << IW_OPX_LSB) | OP_OPX)

Definition at line 404 of file nios2.h.

◆ OPX_MUL

#define OPX_MUL   39

Definition at line 324 of file nios2.h.

◆ OPX_MULXSS

#define OPX_MULXSS   31

Definition at line 325 of file nios2.h.

◆ OPX_MULXSU

#define OPX_MULXSU   23

Definition at line 326 of file nios2.h.

◆ OPX_MULXUU

#define OPX_MULXUU   7

Definition at line 327 of file nios2.h.

◆ OPX_NEXTPC

#define OPX_NEXTPC   28

Definition at line 328 of file nios2.h.

◆ OPX_NOR

#define OPX_NOR   6

Definition at line 329 of file nios2.h.

◆ OPX_OR

#define OPX_OR   22

Definition at line 330 of file nios2.h.

◆ OPX_RDCTL

#define OPX_RDCTL   38

Definition at line 331 of file nios2.h.

◆ OPX_RET

#define OPX_RET   5

Definition at line 332 of file nios2.h.

◆ OPX_ROL

#define OPX_ROL   3

Definition at line 333 of file nios2.h.

◆ OPX_ROLI

#define OPX_ROLI   2

Definition at line 334 of file nios2.h.

◆ OPX_ROR

#define OPX_ROR   11

Definition at line 335 of file nios2.h.

◆ OPX_SLL

#define OPX_SLL   19

Definition at line 336 of file nios2.h.

◆ OPX_SLLI

#define OPX_SLLI   18

Definition at line 337 of file nios2.h.

◆ OPX_SRA

#define OPX_SRA   59

Definition at line 338 of file nios2.h.

◆ OPX_SRAI

#define OPX_SRAI   58

Definition at line 339 of file nios2.h.

◆ OPX_SRL

#define OPX_SRL   27

Definition at line 340 of file nios2.h.

◆ OPX_SRLI

#define OPX_SRLI   26

Definition at line 341 of file nios2.h.

◆ OPX_SUB

#define OPX_SUB   57

Definition at line 342 of file nios2.h.

◆ OPX_SYNC

#define OPX_SYNC   54

Definition at line 343 of file nios2.h.

◆ OPX_TRAP

#define OPX_TRAP   45

Definition at line 344 of file nios2.h.

◆ OPX_WRCTL

#define OPX_WRCTL   46

Definition at line 345 of file nios2.h.

◆ OPX_WRPRS

#define OPX_WRPRS   20

Definition at line 346 of file nios2.h.

◆ OPX_XOR

#define OPX_XOR   30

Definition at line 347 of file nios2.h.

◆ SET_INSN_FIELD

#define SET_INSN_FIELD (   X,
  i,
 
)     ((i) = (((i) & ~OP_MASK_##X) | (((j) << OP_SH_##X) & OP_MASK_##X)))

Definition at line 128 of file nios2.h.

Enumeration Type Documentation

◆ overflow_type

Enumerator
call_target_overflow 
branch_target_overflow 
address_offset_overflow 
signed_immed16_overflow 
unsigned_immed16_overflow 
unsigned_immed5_overflow 
custom_opcode_overflow 
no_overflow 

Definition at line 38 of file nios2.h.

38  {
47 };
@ signed_immed16_overflow
Definition: nios2.h:42
@ branch_target_overflow
Definition: nios2.h:40
@ custom_opcode_overflow
Definition: nios2.h:45
@ address_offset_overflow
Definition: nios2.h:41
@ unsigned_immed5_overflow
Definition: nios2.h:44
@ call_target_overflow
Definition: nios2.h:39
@ no_overflow
Definition: nios2.h:46
@ unsigned_immed16_overflow
Definition: nios2.h:43

Function Documentation

◆ nios2_find_opcode_hash()

const struct nios2_opcode* nios2_find_opcode_hash ( unsigned long  opcode)

Definition at line 126 of file nios2-dis.c.

127 {
129 
130  /* Build a hash table to shorten the search time. */
131  if (!nios2_hash_init) {
133  }
134 
135  /* First look in the pseudo-op hashtable. */
136  for (entry = nios2_ps_hash[(opcode >> OP_SH_OP) & OP_MASK_OP];
137  entry; entry = entry->next) {
138  if (entry->opcode->match == (opcode & entry->opcode->mask)) {
139  return entry->opcode;
140  }
141  }
142 
143  /* Otherwise look in the main hashtable. */
144  for (entry = nios2_hash[(opcode >> OP_SH_OP) & OP_MASK_OP];
145  entry; entry = entry->next) {
146  if (entry->opcode->match == (opcode & entry->opcode->mask)) {
147  return entry->opcode;
148  }
149  }
150 
151  return NULL;
152 }
#define NULL
Definition: cris-opc.c:27
#define OP_MASK_OP
Definition: mips.h:64
#define OP_SH_OP
Definition: mips.h:65
static void nios2_init_opcode_hash(void)
Definition: nios2-dis.c:57
static nios2_opcode_hash * nios2_ps_hash[(OP_MASK_OP)+1]
Definition: nios2-dis.c:53
static bfd_boolean nios2_hash_init
Definition: nios2-dis.c:49
static nios2_opcode_hash * nios2_hash[(OP_MASK_OP)+1]
Definition: nios2-dis.c:50
Definition: zipcmp.c:77

References nios2_hash, nios2_hash_init, nios2_init_opcode_hash(), nios2_ps_hash, NULL, OP_MASK_OP, and OP_SH_OP.

Referenced by nios2_disassemble().

Variable Documentation

◆ bfd_nios2_num_builtin_opcodes

const int bfd_nios2_num_builtin_opcodes
extern

Definition at line 408 of file nios2-opc.c.

◆ bfd_nios2_num_opcodes

int bfd_nios2_num_opcodes
extern

Definition at line 414 of file nios2-opc.c.

◆ nios2_builtin_opcodes

const struct nios2_opcode nios2_builtin_opcodes[]
extern

Definition at line 170 of file nios2-opc.c.

◆ nios2_builtin_regs

const struct nios2_reg nios2_builtin_regs[]
extern

Definition at line 1 of file nios2-opc.c.

◆ nios2_num_builtin_regs

const int nios2_num_builtin_regs
extern

Definition at line 165 of file nios2-opc.c.

◆ nios2_num_regs

int nios2_num_regs
extern

Definition at line 170 of file nios2-opc.c.

Referenced by nios2_control_regs(), and nios2_coprocessor_regs().

◆ nios2_opcodes

struct nios2_opcode* nios2_opcodes
extern

Definition at line 412 of file nios2-opc.c.

Referenced by nios2_init_opcode_hash().

◆ nios2_regs

struct nios2_reg* nios2_regs
extern

Definition at line 169 of file nios2-opc.c.

Referenced by nios2_control_regs(), nios2_coprocessor_regs(), and nios2_print_insn_arg().