42 #include "elf/nds32.h" 43 #include "opcode/nds32.h" 49 #define CHOP_BITS(insn, n) (insn & ~__MASK (n)) 50 #define N32_LSMW_ENABLE4(insn) (((insn) >> 6) & 0xf) 52 N32_TYPE4 (LSMW, 0, 0, 0, 1, (N32_LSMW_ADM << 2) | N32_LSMW_LSMW) 54 N32_TYPE4 (LSMW, 0, 0, 0, 0, (N32_LSMW_BIM << 2) | N32_LSMW_LSMW) 56 N32_TYPE2 (LDC, 0, REG_SP, 0) 82 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
83 "r8",
"r9",
"r10",
"r11",
"r12",
"r13",
"r14",
"r15",
84 "r16",
"r17",
"r18",
"r19",
"r20",
"r21",
"r22",
"r23",
85 "r24",
"r25",
"r26",
"r27",
"fp",
"gp",
"lp",
"sp",
92 "fd0",
"fd1",
"fd2",
"fd3",
"fd4",
"fd5",
"fd6",
"fd7",
93 "fd8",
"fd9",
"fd10",
"fd11",
"fd12",
"fd13",
"fd14",
"fd15",
94 "fd16",
"fd17",
"fd18",
"fd19",
"fd20",
"fd21",
"fd22",
"fd23",
95 "fd24",
"fd25",
"fd26",
"fd27",
"fd28",
"fd29",
"fd30",
"fd31" 100 "fs0",
"fs1",
"fs2",
"fs3",
"fs4",
"fs5",
"fs6",
"fs7",
101 "fs8",
"fs9",
"fs10",
"fs11",
"fs12",
"fs13",
"fs14",
"fs15",
102 "fs16",
"fs17",
"fs18",
"fs19",
"fs20",
"fs21",
"fs22",
"fs23",
103 "fs24",
"fs25",
"fs26",
"fs27",
"fs28",
"fs29",
"fs30",
"fs31" 131 {
"cr6",
"fucop_exist"},
148 {
"ir14",
"int_mask"},
149 {
"ir15",
"int_pend"},
153 {
"ir19",
"int_ctrl"},
155 {
"ir21",
"sp_priv1"},
157 {
"ir23",
"sp_priv2"},
159 {
"ir25",
"sp_priv3"},
160 {
"ir26",
"int_mask2"},
161 {
"ir27",
"int_pend2"},
162 {
"ir28",
"int_pri2"},
163 {
"ir29",
"int_trigger"},
173 {
"mr8",
"cache_ctl"},
174 {
"mr9",
"hsmp_saddr"},
175 {
"mr10",
"hsmp_eaddr"},
176 {
"mr11",
"bg_region"},
227 {
"hspr0",
"hsp_ctl"},
228 {
"hspr1",
"sp_bound"},
229 {
"hspr2",
"sp_bound_priv"},
237 {
"dmar0",
"dma_cfg"},
238 {
"dmar1",
"dma_gcsw"},
239 {
"dmar2",
"dma_chnsel"},
240 {
"dmar3",
"dma_act"},
241 {
"dmar4",
"dma_setup"},
242 {
"dmar5",
"dma_isaddr"},
243 {
"dmar6",
"dma_esaddr"},
244 {
"dmar7",
"dma_tcnt"},
245 {
"dmar8",
"dma_status"},
246 {
"dmar9",
"dma_2dset"},
247 {
"dmar10",
"dma_2dsctl"},
248 {
"dmar11",
"dma_rcnt"},
249 {
"dmar12",
"dma_hstatus"},
251 {
"racr0",
"prusr_acc_ctl"},
252 {
"fucpr",
"fucop_ctl"},
255 {
"idr1",
"misc_ctl"},
256 {
"idr2",
"ecc_misc"},
261 {
"secur3",
"p_isign"},
267 static struct value *
294 const int FDR = FSR + 32;
296 if (num >= 0 && num < 32)
301 else if (num >= FSR && num < FSR + 32)
306 else if (num >= FDR && num < FDR + 32)
373 const char *reg_name;
374 const char *group_name;
402 return !strncmp (reg_name, group_name, strlen (group_name));
467 memcpy (buf, reg_buf +
offset, 4);
504 memcpy (reg_buf +
offset, buf, 4);
518 return elf_abi == E_NDS_ABI_V2FP_PLUS;
527 return elf_abi == E_NDS_ABI_AABI;
530 #define NDS32_NUM_SAVED_REGS (NDS32_LP_REGNUM + 1) 587 for (i = 1; i <= 3; i++)
589 if ((enable4 >> i) & 0x1)
597 if ((rb < REG_FP) && (re < REG_FP))
599 for (i = re; i >= rb; i--)
622 int in_prologue_bb = 0;
624 uint32_t insn, insn_len;
626 for (;
pc < limit_pc;
pc += insn_len)
630 if ((insn & 0x80000000) == 0)
635 if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_SP, 0))
638 int imm15s = N32_IMM15S (insn);
649 else if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_FP, REG_SP, 0))
652 int imm15s = N32_IMM15S (insn);
663 else if ((insn & ~(__MASK (19) << 6)) ==
N32_SMW_ADM 664 && N32_RA5 (insn) == REG_SP)
674 else if (insn == N32_ALU1 (
ADD, REG_SP, REG_SP, REG_TA)
675 || insn == N32_ALU1 (
ADD, REG_SP, REG_TA, REG_SP))
688 else if (
CHOP_BITS (insn, 20) == N32_TYPE1 (MOVI, REG_TA, 0))
692 val_ta = N32_IMM20S (insn);
696 else if (
CHOP_BITS (insn, 20) == N32_TYPE1 (SETHI, REG_TA, 0))
700 val_ta = N32_IMM20U (insn) << 12;
704 else if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ORI, REG_TA, REG_TA, 0))
708 val_ta |= N32_IMM15U (insn);
712 else if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_TA, REG_TA, 0))
716 val_ta += N32_IMM15S (insn);
720 if (insn == N32_ALU1 (
ADD, REG_GP, REG_TA, REG_GP)
721 || insn == N32_ALU1 (
ADD, REG_GP, REG_GP, REG_TA))
728 else if (
CHOP_BITS (insn, 20) == N32_TYPE1 (MOVI, REG_GP, 0))
734 else if (
CHOP_BITS (insn, 20) == N32_TYPE1 (SETHI, REG_GP, 0))
740 else if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ORI, REG_GP, REG_GP, 0))
750 if (in_prologue_bb == 1)
752 int op = N32_OP6 (insn);
755 || op == N32_OP6_JREG
758 || op == N32_OP6_BR3)
763 if (abi_use_fpr && N32_OP6 (insn) == N32_OP6_SDC
764 && __GF (insn, 12, 3) == 0)
770 if (N32_RA5 (insn) == REG_SP)
790 if (
CHOP_BITS (insn, 10) == N16_TYPE10 (ADDI10S, 0))
793 int imm10s = N16_IMM10S (insn);
804 else if (__GF (insn, 7, 8) == N16_T25_PUSH25)
809 int imm8u = (insn & 0x1f) << 3;
810 int re = (insn >> 5) & 0x3;
811 const int reg_map[] = { 6, 8, 10, 14 };
823 else if (insn == N16_TYPE5 (ADD5PC, REG_GP))
829 else if (
CHOP_BITS (insn, 5) == N16_TYPE55 (MOVI55, REG_GP, 0))
839 if (in_prologue_bb == 1)
845 if (insn5 == N16_TYPE5 (JR5, 0)
846 || insn5 == N16_TYPE5 (JRAL5, 0)
847 || insn5 == N16_TYPE5 (RET5, 0)
848 || insn8 == N16_TYPE8 (J8, 0)
849 || insn8 == N16_TYPE8 (BEQZS8, 0)
850 || insn8 == N16_TYPE8 (BNEZS8, 0)
851 || insn38 == N16_TYPE38 (BEQZ38, 0, 0)
852 || insn38 == N16_TYPE38 (BNEZ38, 0, 0)
853 || insn38 == N16_TYPE38 (BEQS38, 0, 0)
854 || insn38 == N16_TYPE38 (BNES38, 0, 0))
889 if (post_prologue_pc != 0)
890 return std::max (
pc, post_prologue_pc);
946 cache->
base = this_base;
964 void **this_cache,
struct frame_id *this_id)
977 static struct value *
1036 if ((rb < REG_FP) && (re < REG_FP))
1038 for (i = rb; i <= re; i++)
1046 for (i = 3; i >= 1; i--)
1048 if ((enable4 >> i) & 0x1)
1074 if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_SP, 0)
1075 && N32_IMM15S (insn) > 0)
1078 else if (
CHOP_BITS (insn, 15) == N32_TYPE2 (ADDI, REG_SP, REG_FP, 0)
1079 && N32_IMM15S (insn) < 0)
1082 else if ((insn & ~(__MASK (19) << 6)) ==
N32_LMW_BIM 1083 && N32_RA5 (insn) == REG_SP)
1092 else if (insn == N32_JREG (JR, 0, REG_LP, 0, 1))
1095 else if (insn == N32_ALU1 (
ADD, REG_SP, REG_SP, REG_TA)
1096 || insn == N32_ALU1 (
ADD, REG_SP, REG_TA, REG_SP))
1100 else if (abi_use_fpr
1101 && (insn & ~(__MASK (5) << 20 | __MASK (13))) ==
N32_FLDI_SP)
1103 if (__GF (insn, 12, 1) == 0)
1109 int offset = N32_IMM12S (insn) << 2;
1130 if (insn == N16_TYPE5 (RET5, REG_LP))
1133 else if (
CHOP_BITS (insn, 10) == N16_TYPE10 (ADDI10S, 0))
1136 int imm10s = N16_IMM10S (insn);
1146 else if (__GF (insn, 7, 8) == N16_T25_POP25)
1151 int imm8u = (insn & 0x1f) << 3;
1152 int re = (insn >> 5) & 0x3;
1153 const int reg_map[] = { 6, 8, 10, 14 };
1182 uint32_t insn, insn_len;
1190 for (;
pc < limit_pc;
pc += insn_len)
1194 if ((insn & 0x80000000) == 0)
1238 if ((insn & 0x80000000) == 0)
1267 if ((insn & 0x80000000) != 0)
1281 if ((insn & 0x80000000) == 0)
1297 struct frame_info *this_frame,
void **this_cache)
1323 *this_cache = cache;
1345 void **this_cache,
struct frame_id *this_id)
1359 static struct value *
1361 void **this_cache,
int regnum)
1521 for (i = 0; i < nargs; i++)
1539 for (i = 0; i < nargs; i++)
1544 int calling_use_fpr;
1574 use_fpr = abi_use_fpr && calling_use_fpr;
1582 if ((align >> 2) > 0)
1583 foff =
align_up (foff, align >> 2);
1602 "Do not know how to handle %d-byte double.\n",
1639 if ((align >> 2) > 0)
1640 goff =
align_up (goff, align >> 2);
1642 if (len <= (REND - goff) * 4)
1700 int rlen = (len > 4) ? 4 : len;
1702 if (byte_order == BFD_ENDIAN_BIG)
1721 error (
_(
"Fail to call. FPU registers are required."));
1734 int calling_use_fpr;
1740 if (abi_use_fpr && calling_use_fpr)
1748 _(
"Cannot extract return value of %d bytes " 1749 "long floating-point."), len);
1797 len1 = byte_order == BFD_ENDIAN_BIG ? len - 4 : 4;
1824 int calling_use_fpr;
1830 if (abi_use_fpr && calling_use_fpr)
1838 _(
"Cannot store return value of %d bytes " 1839 "long floating-point."), len);
1858 len1 = byte_order == BFD_ENDIAN_BIG ? len - 4 : 4;
1895 if (readbuf != NULL)
1897 if (writebuf != NULL)
1930 int *fpu_freg,
int *use_pseudo_fsrs)
1936 if (feature == NULL)
1962 if (feature != NULL)
1964 int num_fdr_regs, num_fsr_regs, fs0_regnum, num_listed_fsr;
1985 for (i = 0; i < num_fdr_regs; i++)
1996 for (i = 0; i < num_fsr_regs; i++)
2001 if (num_listed_fsr == 0)
2004 *use_pseudo_fsrs = 1;
2005 else if (num_listed_fsr == num_fsr_regs)
2007 *use_pseudo_fsrs = 0;
2031 int elf_abi = E_NDS_ABI_AABI;
2033 int use_pseudo_fsrs = 0;
2034 int i, num_regs, maxregs;
2037 if (info.
abfd && bfd_get_flavour (info.
abfd) == bfd_target_elf_flavour)
2038 elf_abi = elf_elfheader (info.
abfd)->e_flags & EF_NDS_ABI;
2054 if (best_arch != NULL)
2111 for (j = 0; j < maxregs; j++)
2155 nds32_breakpoint::kind_from_pc);
2157 nds32_breakpoint::bp_from_kind);
void reggroup_add(struct gdbarch *gdbarch, struct reggroup *group)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
static enum return_value_convention nds32_return_value(struct gdbarch *gdbarch, struct value *func_type, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static struct reggroup * nds32_cr_reggroup
typedef BP_MANIPULATION(nds32_break_insn)
static struct reggroup * nds32_pfr_reggroup
static struct value * nds32_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
#define N32_LSMW_ENABLE4(insn)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
void set_gdbarch_get_longjmp_target(struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype get_longjmp_target)
int tdesc_register_in_reggroup_p(struct gdbarch *gdbarch, int regno, struct reggroup *reggroup)
static int nds32_epilogue_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache)
static void nds32_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct gdbarch * nds32_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static void nds32_add_reggroups(struct gdbarch *gdbarch)
void set_tdesc_pseudo_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *pseudo_name)
CORE_ADDR get_frame_pc(struct frame_info *frame)
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
static struct reggroup * nds32_dr_reggroup
struct reggroup * reggroup_new(const char *name, enum reggroup_type type)
void set_gdbarch_wchar_bit(struct gdbarch *gdbarch, int wchar_bit)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
void set_tdesc_pseudo_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *pseudo_type)
void warning(const char *fmt,...)
ULONGEST align_down(ULONGEST v, int n)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
static void nds32_epilogue_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
void internal_error(const char *file, int line, const char *fmt,...)
struct target_desc * tdesc_nds32
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype register_reggroup_p)
static int nds32_analyze_epilogue(struct gdbarch *gdbarch, CORE_ADDR pc, struct nds32_frame_cache *cache)
static struct nds32_frame_cache * nds32_frame_cache(struct frame_info *this_frame, void **this_cache)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
struct gdbarch_list * next
struct reggroup *const restore_reggroup
int gdbarch_num_regs(struct gdbarch *gdbarch)
static struct reggroup * nds32_ir_reggroup
struct reggroup *const all_reggroup
static int nds32_abi_split(int elf_abi)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
static int nds32_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR addr)
static void nds32_store_return_value(struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
void tdesc_data_cleanup(void *data_untyped)
#define TYPE_FIELD_TYPE(thistype, n)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
#define FRAME_OBSTACK_ZALLOC(TYPE)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
static void nds32_init_reggroups(void)
static int nds32_check_calling_use_fpr(struct type *type)
static struct reggroup * nds32_hspr_reggroup
int gdbarch_num_pseudo_regs(struct gdbarch *gdbarch)
static int nds32_abi_use_fpr(int elf_abi)
struct reggroup *const float_reggroup
int tdesc_numbered_register(const struct tdesc_feature *feature, struct tdesc_arch_data *data, int regno, const char *name)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
static void nds32_push_multiple_words(struct nds32_frame_cache *cache, int rb, int re, int enable4)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
struct type * check_typedef(struct type *type)
const gdb_byte * value_contents(struct value *value)
struct reggroup *const general_reggroup
static const struct frame_base nds32_frame_base
static struct reggroup * nds32_racr_reggroup
void set_gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
struct reggroup *const system_reggroup
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, const char *name, const struct floatformat **floatformats)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
#define gdb_assert_not_reached(message)
static int nds32_type_align(struct type *type)
#define NDS32_NUM_SAVED_REGS
static struct reggroup * nds32_secur_reggroup
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
static const char *const nds32_fsr_register_names[]
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
static CORE_ADDR nds32_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit_pc, struct nds32_frame_cache *cache)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
static CORE_ADDR nds32_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static const char *const nds32_fdr_register_names[]
static void initialize_tdesc_nds32(void)
static struct reggroup * nds32_mr_reggroup
static const struct @132 nds32_register_aliases[]
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static CORE_ADDR nds32_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
static struct nds32_frame_cache * nds32_epilogue_frame_cache(struct frame_info *this_frame, void **this_cache)
static int nds32_validate_tdesc_p(const struct target_desc *tdesc, struct tdesc_arch_data *tdesc_data, int *fpu_freg, int *use_pseudo_fsrs)
static struct nds32_frame_cache * nds32_alloc_frame_cache(void)
int user_reg_map_name_to_regnum(struct gdbarch *gdbarch, const char *name, int len)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
static struct reggroup * nds32_idr_reggroup
static CORE_ADDR nds32_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
const struct target_desc * target_desc
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
static void nds32_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
void tdesc_use_registers(struct gdbarch *gdbarch, const struct target_desc *target_desc, struct tdesc_arch_data *early_data)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
static CORE_ADDR nds32_frame_base_address(struct frame_info *this_frame, void **this_cache)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype pseudo_register_read)
ULONGEST align_up(ULONGEST v, int n)
#define CHOP_BITS(insn, n)
#define TYPE_TARGET_TYPE(thistype)
int frame_relative_level(struct frame_info *fi)
#define TYPE_CODE(thistype)
struct value * value_of_register(int regnum, struct frame_info *frame)
enum register_status regcache_raw_read(struct regcache *regcache, int regnum, gdb_byte *buf)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct value * frame_unwind_got_register(struct frame_info *frame, int regnum, int new_regnum)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static enum register_status nds32_pseudo_register_read(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, gdb_byte *buf)
static const struct frame_unwind nds32_frame_unwind
static CORE_ADDR nds32_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
static const struct frame_unwind nds32_epilogue_frame_unwind
static struct frame_id nds32_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
#define TYPE_NFIELDS(thistype)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
static int nds32_analyze_epilogue_insn32(int abi_use_fpr, uint32_t insn, struct nds32_frame_cache *cache)
const struct target_desc * tdesc
static int nds32_analyze_epilogue_insn16(uint32_t insn, struct nds32_frame_cache *cache)
static CORE_ADDR nds32_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
struct tdesc_arch_data * tdesc_data_alloc(void)
static int nds32_get_longjmp_target(struct frame_info *frame, CORE_ADDR *pc)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
const struct tdesc_feature * tdesc_find_feature(const struct target_desc *target_desc, const char *name)
void user_reg_add(struct gdbarch *gdbarch, const char *name, user_reg_read_ftype *read, const void *baton)
struct type * value_type(const struct value *value)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
static int nds32_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
static const char *const nds32_register_names[]
static const char * nds32_pseudo_register_name(struct gdbarch *gdbarch, int regnum)
int default_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
struct reggroup *const save_reggroup
#define TYPE_LENGTH(thistype)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
static struct type * nds32_pseudo_register_type(struct gdbarch *gdbarch, int regnum)
static struct reggroup * nds32_dmar_reggroup
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
CORE_ADDR saved_regs[NDS32_NUM_SAVED_REGS]
static struct value * value_of_nds32_reg(struct frame_info *frame, const void *baton)
void register_gdbarch_init(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init)
void _initialize_nds32_tdep(void)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
static struct gdbarch_data * tdesc_data
static void nds32_pop_multiple_words(struct nds32_frame_cache *cache, int rb, int re, int enable4)
struct tdesc_arch_data * tdesc_data
enum bfd_endian byte_order
static struct value * nds32_epilogue_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
int tdesc_has_registers(const struct target_desc *target_desc)
static void nds32_extract_return_value(struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
void error(const char *fmt,...)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
const char * reggroup_name(struct reggroup *group)
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
int tdesc_unnumbered_register(const struct tdesc_feature *feature, const char *name)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
constexpr gdb_byte nds32_break_insn[]