46 #include "cgen/bitset.h" 51 #include "opcodes/mep-desc.h" 52 #include "opcodes/mep-opc.h" 155 static const CGEN_HW_ENTRY *
158 CGEN_BITSET *copro_isa_mask,
159 CGEN_BITSET *generic_isa_mask)
161 int prefix_len = strlen (prefix);
164 for (i = 0; i < desc->hw_table.num_entries; i++)
166 const CGEN_HW_ENTRY *hw = desc->hw_table.entries[i];
167 if (strncmp (prefix, hw->name, prefix_len) == 0)
169 CGEN_BITSET *hw_isa_mask
171 &CGEN_ATTR_CGEN_HW_ISA_VALUE (CGEN_HW_ATTRS (hw)));
173 if (cgen_bitset_intersect_p (hw_isa_mask, copro_isa_mask)
174 && ! cgen_bitset_intersect_p (hw_isa_mask, generic_isa_mask))
185 static const CGEN_HW_ENTRY *
190 for (i = 0; i < desc->hw_table.num_entries; i++)
192 const CGEN_HW_ENTRY *hw = desc->hw_table.entries[i];
194 if (hw->type ==
type)
207 static const CGEN_HW_ENTRY *
210 CGEN_HW_TYPE generic_type)
263 const CGEN_HW_ENTRY *hw;
265 if (me_module == CONFIG_NONE)
269 CGEN_BITSET *cop = &mep_config_map[me_module].cop_isa;
270 CGEN_BITSET *core = &mep_config_map[me_module].core_isa;
271 CGEN_BITSET *
generic = &mep_config_map[CONFIG_NONE].core_isa;
272 CGEN_BITSET *cop_and_core;
276 cop_and_core = cgen_bitset_copy (cop);
277 cgen_bitset_union (cop, core, cop_and_core);
289 static CGEN_KEYWORD *
296 gdb_assert (hw->asm_type == CGEN_ASM_KEYWORD);
300 return (CGEN_KEYWORD *) hw->asm_data;
310 const CGEN_KEYWORD_ENTRY *entry
311 = cgen_keyword_lookup_value (keyword_table,
regnum);
315 char *
name = entry->name;
360 unsigned int opt_bit, option_mask_bit;
365 {
MEP_OPT_DBG, 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN },
369 {
MEP_OPT_MIN, 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN },
370 {
MEP_OPT_CLP, 1 << CGEN_INSN_OPTIONAL_CLIP_INSN },
378 unsigned int opt = 0;
380 for (i = 0; i < (
sizeof (
bits) /
sizeof (
bits[0])); i++)
381 if (option_mask &
bits[i].option_mask_bit)
382 opt |=
bits[i].opt_bit;
402 if (mep_config_map[me_module].option_mask
403 & (1 << CGEN_INSN_OPTIONAL_CP64_INSN))
414 return mep_config_map[me_module].big_endian;
424 if (! mep_config_map[me_module].
name 425 || mep_config_map[me_module].
name[0] ==
'\0')
428 return mep_config_map[me_module].name;
613 #define IN_SET(set, n) \ 614 (MEP_FIRST_ ## set ## _REGNUM <= (n) && (n) <= MEP_LAST_ ## set ## _REGNUM) 616 #define IS_GPR_REGNUM(n) (IN_SET (GPR, (n))) 617 #define IS_RAW_CSR_REGNUM(n) (IN_SET (RAW_CSR, (n))) 618 #define IS_RAW_CR_REGNUM(n) (IN_SET (RAW_CR, (n))) 619 #define IS_RAW_CCR_REGNUM(n) (IN_SET (RAW_CCR, (n))) 621 #define IS_CSR_REGNUM(n) (IN_SET (CSR, (n))) 622 #define IS_CR32_REGNUM(n) (IN_SET (CR32, (n))) 623 #define IS_FP_CR32_REGNUM(n) (IN_SET (FP_CR32, (n))) 624 #define IS_CR64_REGNUM(n) (IN_SET (CR64, (n))) 625 #define IS_FP_CR64_REGNUM(n) (IN_SET (FP_CR64, (n))) 626 #define IS_CR_REGNUM(n) (IS_CR32_REGNUM (n) || IS_FP_CR32_REGNUM (n) \ 627 || IS_CR64_REGNUM (n) || IS_FP_CR64_REGNUM (n)) 628 #define IS_CCR_REGNUM(n) (IN_SET (CCR, (n))) 630 #define IS_RAW_REGNUM(n) (IN_SET (RAW, (n))) 631 #define IS_PSEUDO_REGNUM(n) (IN_SET (PSEUDO, (n))) 633 #define NUM_REGS_IN_SET(set) \ 634 (MEP_LAST_ ## set ## _REGNUM - MEP_FIRST_ ## set ## _REGNUM + 1) 636 #define MEP_GPR_SIZE (4) 637 #define MEP_PSW_SIZE (4) 638 #define MEP_LP_SIZE (4) 663 #define CSR(name) MEP_RAW_ ## name ## _REGNUM, MEP_ ## name ## _REGNUM 665 {
CSR(
PC), 0xffffffff },
666 {
CSR(LP), 0xffffffff },
667 {
CSR(SAR), 0x0000003f },
668 {
CSR(CSR3), 0xffffffff },
669 {
CSR(RPB), 0xfffffffe },
670 {
CSR(RPE), 0xffffffff },
671 {
CSR(RPC), 0xffffffff },
672 {
CSR(HI), 0xffffffff },
673 {
CSR(LO), 0xffffffff },
674 {
CSR(CSR9), 0xffffffff },
675 {
CSR(CSR10), 0xffffffff },
676 {
CSR(CSR11), 0xffffffff },
677 {
CSR(MB0), 0x0000ffff },
678 {
CSR(ME0), 0x0000ffff },
679 {
CSR(MB1), 0x0000ffff },
680 {
CSR(ME1), 0x0000ffff },
681 {
CSR(PSW), 0x000003ff },
682 {
CSR(ID), 0x00000000 },
683 {
CSR(TMP), 0xffffffff },
684 {
CSR(EPC), 0xffffffff },
685 {
CSR(EXC), 0x000030f0 },
686 {
CSR(CFG), 0x00c0001b },
687 {
CSR(CSR22), 0xffffffff },
688 {
CSR(NPC), 0xffffffff },
689 {
CSR(DBG), 0x00000580 },
690 {
CSR(DEPC), 0xffffffff },
691 {
CSR(OPT), 0x00000000 },
692 {
CSR(RCFG), 0x00000000 },
693 {
CSR(CCFG), 0x00000000 },
694 {
CSR(CSR29), 0xffffffff },
695 {
CSR(CSR30), 0xffffffff },
696 {
CSR(CSR31), 0xffffffff },
852 return (CONFIG_ATTR) regval;
893 static CGEN_KEYWORD *
896 const CGEN_HW_ENTRY *hw
908 const CGEN_HW_ENTRY *hw
911 return CGEN_ATTR_CGEN_HW_IS_FLOAT_VALUE (CGEN_HW_ATTRS (hw));
917 static CGEN_KEYWORD *
920 const CGEN_HW_ENTRY *hw
931 static const char *gpr_names[] = {
932 "r0",
"r1",
"r2",
"r3",
933 "r4",
"r5",
"r6",
"r7",
934 "fp",
"r9",
"r10",
"r11",
935 "r12",
"tp",
"gp",
"sp" 939 static const char *csr_names[] = {
940 "pc",
"lp",
"sar",
"",
941 "rpb",
"rpe",
"rpc",
"hi",
943 "mb0",
"me0",
"mb1",
"me1",
945 "psw",
"id",
"tmp",
"epc",
946 "exc",
"cfg",
"",
"npc",
947 "dbg",
"depc",
"opt",
"rcfg",
1074 static struct type *
1099 else if (
size == 64)
1271 info->arch = bfd_arch_mep;
1281 return print_insn_mep (pc, info);
1415 int pc_in_vliw_section;
1424 if (pc_in_vliw_section)
1457 if ((*insn & 0xc0000000) == 0xc0000000)
1485 else if ((*insn & 0xc0000000) == 0xc0000000)
1490 return pc + insn_len;
1495 #define SEXT(n, len) ((((int) (n)) ^ (1 << ((len) - 1))) - (1 << ((len) - 1))) 1498 #define FIELD(i, pos, len) (((i) >> (pos)) & ((1 << (len)) - 1)) 1501 #define SFIELD(i, pos, len) (SEXT (FIELD ((i), (pos), (len)), (len))) 1517 #define IS_SW(i) (((i) & 0xf00f0000) == 0xc00a0000) 1519 #define IS_SB(i) (((i) & 0xf00f0000) == 0xc0080000) 1521 #define IS_SH(i) (((i) & 0xf00f0000) == 0xc0090000) 1522 #define SWBH_32_BASE(i) (FIELD (i, 20, 4)) 1523 #define SWBH_32_SOURCE(i) (FIELD (i, 24, 4)) 1524 #define SWBH_32_OFFSET(i) (SFIELD (i, 0, 16)) 1527 #define IS_SW_IMMD(i) (((i) & 0xf0830000) == 0x40020000) 1528 #define SW_IMMD_SOURCE(i) (FIELD (i, 24, 4)) 1529 #define SW_IMMD_OFFSET(i) (FIELD (i, 18, 5) << 2) 1532 #define IS_SW_REG(i) (((i) & 0xf00f0000) == 0x000a0000) 1533 #define SW_REG_SOURCE(i) (FIELD (i, 24, 4)) 1534 #define SW_REG_BASE(i) (FIELD (i, 20, 4)) 1537 #define IS_ADD3_16_REG(i) (((i) & 0xf0000000) == 0x90000000) 1538 #define ADD3_16_REG_SRC1(i) (FIELD (i, 20, 4)) 1539 #define ADD3_16_REG_SRC2(i) (FIELD (i, 24, 4)) 1542 #define IS_ADD3_32(i) (((i) & 0xf00f0000) == 0xc0000000) 1543 #define ADD3_32_TARGET(i) (FIELD (i, 24, 4)) 1544 #define ADD3_32_SOURCE(i) (FIELD (i, 20, 4)) 1545 #define ADD3_32_OFFSET(i) (SFIELD (i, 0, 16)) 1548 #define IS_ADD3_16(i) (((i) & 0xf0830000) == 0x40000000) 1549 #define ADD3_16_TARGET(i) (FIELD (i, 24, 4)) 1550 #define ADD3_16_OFFSET(i) (FIELD (i, 18, 5) << 2) 1553 #define IS_ADD(i) (((i) & 0xf0030000) == 0x60000000) 1554 #define ADD_TARGET(i) (FIELD (i, 24, 4)) 1555 #define ADD_OFFSET(i) (SFIELD (i, 18, 6)) 1559 #define IS_LDC(i) (((i) & 0xf00e0000) == 0x700a0000) 1560 #define LDC_IMM(i) ((FIELD (i, 16, 1) << 4) | FIELD (i, 20, 4)) 1561 #define LDC_TARGET(i) (FIELD (i, 24, 4)) 1564 #define IS_LW(i) (((i) & 0xf00f0000) == 0xc00e0000) 1565 #define LW_TARGET(i) (FIELD (i, 24, 4)) 1566 #define LW_BASE(i) (FIELD (i, 20, 4)) 1567 #define LW_OFFSET(i) (SFIELD (i, 0, 16)) 1570 #define IS_MOV(i) (((i) & 0xf00f0000) == 0x00000000) 1571 #define MOV_TARGET(i) (FIELD (i, 24, 4)) 1572 #define MOV_SOURCE(i) (FIELD (i, 20, 4)) 1575 #define IS_BRA(i) (((i) & 0xf0010000) == 0xb0000000) 1576 #define BRA_DISP(i) (SFIELD (i, 17, 11) << 1) 1675 CORE_ADDR after_last_frame_setup_insn = start_pc;
1677 memset (result, 0,
sizeof (*result));
1689 while (pc < limit_pc)
1692 pv_t pre_insn_fp, pre_insn_sp;
1742 after_last_frame_setup_insn = next_pc;
1759 after_last_frame_setup_insn = next_pc;
1771 after_last_frame_setup_insn = next_pc;
1787 after_last_frame_setup_insn = next_pc;
1798 else if (
IS_LW (insn))
1828 after_last_frame_setup_insn = next_pc;
1855 after_last_frame_setup_insn = next_pc;
1866 after_last_frame_setup_insn = next_pc;
1886 result->prologue_end = after_last_frame_setup_insn;
1917 mep_analyze_frame_prologue (
struct frame_info *this_frame,
1918 void **this_prologue_cache)
1920 if (! *this_prologue_cache)
1924 *this_prologue_cache
1933 stop_addr = func_start;
1936 func_start, stop_addr,
1948 void **this_prologue_cache)
1951 = mep_analyze_frame_prologue (this_frame, this_prologue_cache);
1976 void **this_prologue_cache,
1984 static struct value *
1986 void **this_prologue_cache,
int regnum)
1989 = mep_analyze_frame_prologue (this_frame, this_prologue_cache);
2122 if (byte_order == BFD_ENDIAN_BIG)
2150 if (byte_order == BFD_ENDIAN_BIG)
2165 GDB cannot set return values larger than four bytes; the Media Processor's\n\ 2166 calling conventions do not provide enough information to do this.\n\ 2167 Try using the 'return' command with no argument."));
2192 GDB cannot set return values larger than four bytes; the Media Processor's\n\ 2193 calling conventions do not provide enough information to do this.\n\ 2194 Try using the 'return' command with no argument."));
2254 for (i = 0; i < argc; i++)
2262 sp = (sp - arg_len) & -4;
2298 if (argc + (struct_addr ? 1 : 0) > 4)
2299 sp -= ((argc + (struct_addr ? 1 : 0)) - 4) *
MEP_GPR_SIZE;
2312 for (i = 0; i < argc; i++)
2373 CONFIG_ATTR me_module;
2381 if (bfd_get_flavour (info.
abfd) == bfd_target_elf_flavour)
2383 int flag = elf_elfheader (info.
abfd)->
e_flags & EF_MEP_INDEX_MASK;
2384 me_module = (CONFIG_ATTR) flag;
2387 me_module = CONFIG_NONE;
2390 me_module = CONFIG_NONE;
2401 const char *module_endianness
2403 const char *file_name = bfd_get_filename (info.
abfd);
2404 const char *file_endianness
2405 = bfd_big_endian (info.
abfd) ?
"big" :
"little";
2409 warning (
_(
"the MeP module '%s' is %s-endian, but the executable\n" 2410 "%s is %s-endian."),
2411 module_name, module_endianness,
2412 file_name, file_endianness);
2414 warning (
_(
"the selected MeP module is %s-endian, but the " 2416 "%s is %s-endian."),
2417 module_endianness, file_name, file_endianness);
2437 enum cgen_endian endian = (info.
byte_order == BFD_ENDIAN_BIG
2439 : CGEN_ENDIAN_LITTLE);
2441 tdep->
cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
2442 CGEN_CPU_OPEN_ENDIAN, endian,
void reggroup_add(struct gdbarch *gdbarch, struct reggroup *group)
struct gdbarch * target_gdbarch(void)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
static void mep_pseudo_cr64_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
bool store_would_trash(pv_t addr)
#define target_has_registers
static struct frame_id mep_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
static struct gdbarch * mep_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static CORE_ADDR mep_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
#define SWBH_32_OFFSET(i)
#define ADD3_32_TARGET(i)
#define ADD3_16_TARGET(i)
CORE_ADDR get_frame_pc(struct frame_info *frame)
static CORE_ADDR push_large_arguments(CORE_ADDR sp, int argc, struct value **argv, CORE_ADDR copy[])
struct reggroup * reggroup_new(const char *name, enum reggroup_type type)
pv_t pv_add_constant(pv_t v, CORE_ADDR k)
static const char * mep_register_name(struct gdbarch *gdbarch, int regnr)
LONGEST value_as_long(struct value *val)
struct value * frame_unwind_got_memory(struct frame_info *frame, int regnum, CORE_ADDR addr)
static int mep_pseudo_cr_is_float(int pseudo)
static CORE_ADDR mep_read_pc(struct regcache *regcache)
static const CGEN_HW_ENTRY * find_hw_entry_by_prefix_and_isa(CGEN_CPU_DESC desc, const char *prefix, CGEN_BITSET *copro_isa_mask, CGEN_BITSET *generic_isa_mask)
struct bfd_section * the_bfd_section
static int is_arg_reg(pv_t value)
void warning(const char *fmt,...)
static int me_module_cop_data_bus_width(CONFIG_ATTR me_module)
int reg_offset[MEP_NUM_REGS]
static int mep_gdb_print_insn(bfd_vma pc, disassemble_info *info)
void set_gdbarch_stab_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
static CORE_ADDR mep_get_insn(struct gdbarch *gdbarch, CORE_ADDR pc, unsigned long *insn)
static unsigned int me_module_opt(CONFIG_ATTR me_module)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
static int mep_pseudo_to_raw[MEP_NUM_REGS]
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
static CONFIG_ATTR current_me_module(void)
int pv_is_register(pv_t a, int r)
void * memset(T *s, int c, size_t n)=delete
static void mep_extract_return_value(struct gdbarch *arch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype register_reggroup_p)
typedef BP_MANIPULATION(mep_break_insn)
void value_free(struct value *val)
void regcache_cooked_write_part(struct regcache *regcache, int regnum, int offset, int len, const gdb_byte *buf)
#define SW_IMMD_OFFSET(i)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
struct gdbarch_list * next
struct reggroup *const restore_reggroup
struct reggroup *const all_reggroup
constexpr gdb_byte mep_break_insn[]
#define IS_RAW_CR_REGNUM(n)
const struct bfd_arch_info * bfd_arch_info
static struct type * mep_register_type(struct gdbarch *gdbarch, int reg_nr)
static enum register_status mep_pseudo_cr32_read(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
#define bits(obj, st, fn)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static struct reggroup * mep_csr_reggroup
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
struct regcache * get_current_regcache(void)
#define FRAME_OBSTACK_ZALLOC(TYPE)
static CGEN_KEYWORD * register_set_keyword_table(const CGEN_HW_ENTRY *hw)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
int pv_is_identical(pv_t a, pv_t b)
static int mep_pc_in_vliw_section(CORE_ADDR pc)
#define ADD3_16_OFFSET(i)
static int mep_pseudo_cr_index(int pseudo)
struct value * get_frame_register_value(struct frame_info *frame, int regnum)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
static CORE_ADDR mep_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int argc, struct value **argv, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
static CORE_ADDR mep_unwind_sp(struct gdbarch *gdbarch, struct frame_info *next_frame)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
const gdb_byte * value_contents(struct value *value)
struct reggroup *const general_reggroup
static void mep_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
int fputc_unfiltered(int c, struct ui_file *stream)
struct value::@186::@187 reg
static CGEN_KEYWORD * current_ccr_names(void)
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)
static struct reggroup * mep_cr_reggroup
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
static void mep_pseudo_csr_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
#define gdb_assert_not_reached(message)
static const struct frame_unwind mep_frame_unwind
static int current_cop_data_bus_width(void)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int pv_is_register_k(pv_t a, int r, CORE_ADDR k)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
static int current_cr_is_float(void)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
void store(pv_t addr, CORE_ADDR size, pv_t value)
void scan(void(*func)(void *closure, pv_t addr, CORE_ADDR size, pv_t value), void *closure)
static int is_arg_spill(struct gdbarch *gdbarch, pv_t value, pv_t addr, struct pv_area *stack)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
static enum register_status mep_pseudo_cr64_read(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
void _initialize_mep_tdep(void)
static const char * me_module_name(CONFIG_ATTR me_module)
static int mep_debug_reg_to_regnum(struct gdbarch *gdbarch, int debug_reg)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct obj_section * find_pc_section(CORE_ADDR pc)
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
struct mep_csr_register mep_csr_registers[]
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
#define SW_IMMD_SOURCE(i)
#define IS_FP_CR32_REGNUM(n)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
static void check_for_saved(void *result_untyped, pv_t addr, CORE_ADDR size, pv_t value)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype pseudo_register_read)
struct type * builtin_double
static CORE_ADDR mep_unwind_pc(struct gdbarch *gdbarch, struct frame_info *next_frame)
static const CGEN_HW_ENTRY * find_hw_entry_by_type(CGEN_CPU_DESC desc, CGEN_HW_TYPE type)
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)
static enum return_value_convention mep_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
static const char * register_name_from_keyword(CGEN_KEYWORD *keyword_table, int regnum)
static void mep_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
void regcache_raw_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
static CORE_ADDR mep_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
static CORE_ADDR mep_frame_base(struct frame_info *this_frame, void **this_prologue_cache)
#define ADD3_32_OFFSET(i)
#define SWBH_32_SOURCE(i)
static const CGEN_HW_ENTRY * me_module_register_set(CONFIG_ATTR me_module, const char *prefix, CGEN_HW_TYPE generic_type)
static unsigned int opt_from_option_mask(unsigned int option_mask)
static int me_module_big_endian(CONFIG_ATTR me_module)
static unsigned int current_options(void)
static enum register_status mep_pseudo_register_read(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
static int mep_pseudo_cr_size(int pseudo)
unsigned long long ULONGEST
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
static void mep_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, struct mep_prologue *result)
void release_value(struct value *val)
int register_size(struct gdbarch *gdbarch, int regnum)
struct type * value_type(const struct value *value)
enum register_status regcache_cooked_read_part(struct regcache *regcache, int regnum, int offset, int len, gdb_byte *buf)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
#define IS_FP_CR64_REGNUM(n)
bool find_reg(struct gdbarch *gdbarch, int reg, CORE_ADDR *offset_p)
static int mep_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
struct reggroup *const save_reggroup
#define TYPE_LENGTH(thistype)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
struct type * builtin_uint64
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
pv_t fetch(pv_t addr, CORE_ADDR size)
static void mep_init_pseudoregister_maps(void)
void register_gdbarch_init(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init)
static int mep_use_struct_convention(struct type *type)
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)
#define NUM_REGS_IN_SET(set)
enum bfd_endian byte_order
#define IS_CR32_REGNUM(n)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
#define IS_CR64_REGNUM(n)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
static CGEN_KEYWORD * current_cr_names(void)
void error(const char *fmt,...)
pv_t pv_register(int reg, CORE_ADDR k)
static struct reggroup * mep_ccr_reggroup
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
static int mep_raw_to_pseudo[MEP_NUM_REGS]
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
static struct value * mep_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
static void mep_pseudo_cr32_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
struct type * builtin_float
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static void mep_store_return_value(struct gdbarch *arch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
#define ADD3_32_SOURCE(i)
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)