OpenOCD
nds32_disassembler.c File Reference
Include dependency graph for nds32_disassembler.c:

Go to the source code of this file.

Functions

static int nds32_calculate_lsmw_access_range (struct nds32 *nds32, struct nds32_instruction *instruction)
 
int nds32_evaluate_opcode (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static uint8_t nds32_extract_field_8u (uint16_t opcode, uint32_t start, uint32_t length)
 
static int nds32_parse_alu_1 (uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_alu_2 (uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_0_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_0_insn_16 (struct nds32 *nds32, uint16_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_1_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_1_insn_16 (struct nds32 *nds32, uint16_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_2_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_2_insn_16 (struct nds32 *nds32, uint16_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_3_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_3_insn_16 (struct nds32 *nds32, uint16_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_4_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_5_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_group_6_insn (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_hwgp (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_lsmw (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_mem (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_sbgp (struct nds32 *nds32, uint32_t opcode, uint32_t address, struct nds32_instruction *instruction)
 
static int nds32_parse_type_0 (uint32_t opcode, int32_t *imm)
 
static int nds32_parse_type_1 (uint32_t opcode, uint8_t *rt, int32_t *imm)
 
static int nds32_parse_type_2 (uint32_t opcode, uint8_t *rt, uint8_t *ra, int32_t *imm)
 
static int nds32_parse_type_3 (uint32_t opcode, uint8_t *rt, uint8_t *ra, uint8_t *rb, int32_t *imm)
 
static int nds32_parse_type_4 (uint32_t opcode, uint8_t *rt, uint8_t *ra, uint8_t *rb, uint8_t *rd, uint8_t *sub_opc)
 
int nds32_read_opcode (struct nds32 *nds32, uint32_t address, uint32_t *value)
 

Variables

static const int enable4_bits [] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}
 
static uint32_t field_mask [9]
 

Function Documentation

◆ nds32_calculate_lsmw_access_range()

static int nds32_calculate_lsmw_access_range ( struct nds32 nds32,
struct nds32_instruction instruction 
)
static

◆ nds32_evaluate_opcode()

◆ nds32_extract_field_8u()

static uint8_t nds32_extract_field_8u ( uint16_t  opcode,
uint32_t  start,
uint32_t  length 
)
static

◆ nds32_parse_alu_1()

◆ nds32_parse_alu_2()

◆ nds32_parse_group_0_insn()

◆ nds32_parse_group_0_insn_16()

static int nds32_parse_group_0_insn_16 ( struct nds32 nds32,
uint16_t  opcode,
uint32_t  address,
struct nds32_instruction instruction 
)
static

◆ nds32_parse_group_1_insn()

◆ nds32_parse_group_1_insn_16()

◆ nds32_parse_group_2_insn()

◆ nds32_parse_group_2_insn_16()

static int nds32_parse_group_2_insn_16 ( struct nds32 nds32,
uint16_t  opcode,
uint32_t  address,
struct nds32_instruction instruction 
)
static

◆ nds32_parse_group_3_insn()

static int nds32_parse_group_3_insn ( struct nds32 nds32,
uint32_t  opcode,
uint32_t  address,
struct nds32_instruction instruction 
)
static

◆ nds32_parse_group_3_insn_16()

◆ nds32_parse_group_4_insn()

◆ nds32_parse_group_5_insn()

static int nds32_parse_group_5_insn ( struct nds32 nds32,
uint32_t  opcode,
uint32_t  address,
struct nds32_instruction instruction 
)
static

◆ nds32_parse_group_6_insn()

◆ nds32_parse_hwgp()

◆ nds32_parse_lsmw()

◆ nds32_parse_mem()

◆ nds32_parse_sbgp()

◆ nds32_parse_type_0()

static int nds32_parse_type_0 ( uint32_t  opcode,
int32_t *  imm 
)
static

Definition at line 46 of file nds32_disassembler.c.

References ERROR_OK.

Referenced by nds32_parse_group_4_insn(), and nds32_parse_group_6_insn().

◆ nds32_parse_type_1()

static int nds32_parse_type_1 ( uint32_t  opcode,
uint8_t *  rt,
int32_t *  imm 
)
static

◆ nds32_parse_type_2()

static int nds32_parse_type_2 ( uint32_t  opcode,
uint8_t *  rt,
uint8_t *  ra,
int32_t *  imm 
)
static

◆ nds32_parse_type_3()

static int nds32_parse_type_3 ( uint32_t  opcode,
uint8_t *  rt,
uint8_t *  ra,
uint8_t *  rb,
int32_t *  imm 
)
static

Definition at line 70 of file nds32_disassembler.c.

References ERROR_OK.

Referenced by nds32_parse_alu_1(), nds32_parse_alu_2(), nds32_parse_lsmw(), and nds32_parse_mem().

◆ nds32_parse_type_4()

static int nds32_parse_type_4 ( uint32_t  opcode,
uint8_t *  rt,
uint8_t *  ra,
uint8_t *  rb,
uint8_t *  rd,
uint8_t *  sub_opc 
)
static

Definition at line 81 of file nds32_disassembler.c.

References ERROR_OK.

Referenced by nds32_parse_alu_1().

◆ nds32_read_opcode()

int nds32_read_opcode ( struct nds32 nds32,
uint32_t  address,
uint32_t *  value 
)

Variable Documentation

◆ enable4_bits

const int enable4_bits[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}
static

Definition at line 16 of file nds32_disassembler.c.

Referenced by nds32_calculate_lsmw_access_range().

◆ field_mask

uint32_t field_mask[9]
static
Initial value:
= {
0x0,
0x1,
0x3,
0x7,
0xF,
0x1F,
0x3F,
0x7F,
0xFF,
}

Definition at line 2827 of file nds32_disassembler.c.

Referenced by nds32_extract_field_8u().