39 #include "floatformat.h"
47 #include "cgen/bitset.h"
52 #include "opcodes/mep-desc.h"
53 #include "opcodes/mep-opc.h"
156 static const CGEN_HW_ENTRY *
159 CGEN_BITSET *copro_isa_mask,
160 CGEN_BITSET *generic_isa_mask)
162 int prefix_len = strlen (prefix);
165 for (i = 0; i < desc->hw_table.num_entries; i++)
167 const CGEN_HW_ENTRY *hw = desc->hw_table.entries[i];
168 if (strncmp (prefix, hw->name, prefix_len) == 0)
170 CGEN_BITSET *hw_isa_mask
172 &CGEN_ATTR_CGEN_HW_ISA_VALUE (CGEN_HW_ATTRS (hw)));
174 if (cgen_bitset_intersect_p (hw_isa_mask, copro_isa_mask)
175 && ! cgen_bitset_intersect_p (hw_isa_mask, generic_isa_mask))
186 static const CGEN_HW_ENTRY *
191 for (i = 0; i < desc->hw_table.num_entries; i++)
193 const CGEN_HW_ENTRY *hw = desc->hw_table.entries[i];
195 if (hw->type == type)
208 static const CGEN_HW_ENTRY *
211 CGEN_HW_TYPE generic_type)
264 const CGEN_HW_ENTRY *hw;
266 if (me_module == CONFIG_NONE)
270 CGEN_BITSET *cop = &mep_config_map[me_module].cop_isa;
271 CGEN_BITSET *core = &mep_config_map[me_module].core_isa;
272 CGEN_BITSET *
generic = &mep_config_map[CONFIG_NONE].core_isa;
273 CGEN_BITSET *cop_and_core;
277 cop_and_core = cgen_bitset_copy (cop);
278 cgen_bitset_union (cop, core, cop_and_core);
290 static CGEN_KEYWORD *
297 gdb_assert (hw->asm_type == CGEN_ASM_KEYWORD);
301 return (CGEN_KEYWORD *) hw->asm_data;
311 const CGEN_KEYWORD_ENTRY *entry
312 = cgen_keyword_lookup_value (keyword_table, regnum);
316 char *
name = entry->name;
361 unsigned int opt_bit, option_mask_bit;
366 {
MEP_OPT_DBG, 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN },
370 {
MEP_OPT_MIN, 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN },
371 {
MEP_OPT_CLP, 1 << CGEN_INSN_OPTIONAL_CLIP_INSN },
379 unsigned int opt = 0;
381 for (i = 0; i < (
sizeof (
bits) /
sizeof (
bits[0])); i++)
382 if (option_mask &
bits[i].option_mask_bit)
383 opt |=
bits[i].opt_bit;
403 if (mep_config_map[me_module].option_mask
404 & (1 << CGEN_INSN_OPTIONAL_CP64_INSN))
415 return mep_config_map[me_module].big_endian;
425 if (! mep_config_map[me_module].
name
426 || mep_config_map[me_module].
name[0] ==
'\0')
429 return mep_config_map[me_module].name;
614 #define IN_SET(set, n) \
615 (MEP_FIRST_ ## set ## _REGNUM <= (n) && (n) <= MEP_LAST_ ## set ## _REGNUM)
617 #define IS_GPR_REGNUM(n) (IN_SET (GPR, (n)))
618 #define IS_RAW_CSR_REGNUM(n) (IN_SET (RAW_CSR, (n)))
619 #define IS_RAW_CR_REGNUM(n) (IN_SET (RAW_CR, (n)))
620 #define IS_RAW_CCR_REGNUM(n) (IN_SET (RAW_CCR, (n)))
622 #define IS_CSR_REGNUM(n) (IN_SET (CSR, (n)))
623 #define IS_CR32_REGNUM(n) (IN_SET (CR32, (n)))
624 #define IS_FP_CR32_REGNUM(n) (IN_SET (FP_CR32, (n)))
625 #define IS_CR64_REGNUM(n) (IN_SET (CR64, (n)))
626 #define IS_FP_CR64_REGNUM(n) (IN_SET (FP_CR64, (n)))
627 #define IS_CR_REGNUM(n) (IS_CR32_REGNUM (n) || IS_FP_CR32_REGNUM (n) \
628 || IS_CR64_REGNUM (n) || IS_FP_CR64_REGNUM (n))
629 #define IS_CCR_REGNUM(n) (IN_SET (CCR, (n)))
631 #define IS_RAW_REGNUM(n) (IN_SET (RAW, (n)))
632 #define IS_PSEUDO_REGNUM(n) (IN_SET (PSEUDO, (n)))
634 #define NUM_REGS_IN_SET(set) \
635 (MEP_LAST_ ## set ## _REGNUM - MEP_FIRST_ ## set ## _REGNUM + 1)
637 #define MEP_GPR_SIZE (4)
638 #define MEP_PSW_SIZE (4)
639 #define MEP_LP_SIZE (4)
664 #define CSR(name) MEP_RAW_ ## name ## _REGNUM, MEP_ ## name ## _REGNUM
666 {
CSR(
PC), 0xffffffff },
667 {
CSR(LP), 0xffffffff },
668 {
CSR(SAR), 0x0000003f },
669 {
CSR(CSR3), 0xffffffff },
670 {
CSR(RPB), 0xfffffffe },
671 {
CSR(RPE), 0xffffffff },
672 {
CSR(RPC), 0xffffffff },
673 {
CSR(HI), 0xffffffff },
674 {
CSR(LO), 0xffffffff },
675 {
CSR(CSR9), 0xffffffff },
676 {
CSR(CSR10), 0xffffffff },
677 {
CSR(CSR11), 0xffffffff },
678 {
CSR(MB0), 0x0000ffff },
679 {
CSR(ME0), 0x0000ffff },
680 {
CSR(MB1), 0x0000ffff },
681 {
CSR(ME1), 0x0000ffff },
682 {
CSR(PSW), 0x000003ff },
683 {
CSR(ID), 0x00000000 },
684 {
CSR(TMP), 0xffffffff },
685 {
CSR(EPC), 0xffffffff },
686 {
CSR(EXC), 0x000030f0 },
687 {
CSR(CFG), 0x00c0001b },
688 {
CSR(CSR22), 0xffffffff },
689 {
CSR(NPC), 0xffffffff },
690 {
CSR(DBG), 0x00000580 },
691 {
CSR(DEPC), 0xffffffff },
692 {
CSR(OPT), 0x00000000 },
693 {
CSR(RCFG), 0x00000000 },
694 {
CSR(CCFG), 0x00000000 },
695 {
CSR(CSR29), 0xffffffff },
696 {
CSR(CSR30), 0xffffffff },
697 {
CSR(CSR31), 0xffffffff },
726 for (i = 0; i < ARRAY_SIZE (mep_csr_registers); i++)
737 mep_raw_to_pseudo[i] = i;
738 mep_pseudo_to_raw[i] = i;
742 for (i = 0; i < ARRAY_SIZE (mep_csr_registers); i++)
765 mep_raw_to_pseudo[raw] = pseudo64;
766 mep_pseudo_to_raw[pseudo32] = raw;
767 mep_pseudo_to_raw[pseudofp32] = raw;
768 mep_pseudo_to_raw[pseudo64] = raw;
769 mep_pseudo_to_raw[pseudofp64] = raw;
777 mep_raw_to_pseudo[raw] = pseudo;
778 mep_pseudo_to_raw[pseudo] = raw;
787 return mep_raw_to_pseudo[debug_reg];
892 static CGEN_KEYWORD *
895 const CGEN_HW_ENTRY *hw
907 const CGEN_HW_ENTRY *hw
910 return CGEN_ATTR_CGEN_HW_IS_FLOAT_VALUE (CGEN_HW_ATTRS (hw));
916 static CGEN_KEYWORD *
919 const CGEN_HW_ENTRY *hw
932 static const char *gpr_names[] = {
933 "r0",
"r1",
"r2",
"r3",
934 "r4",
"r5",
"r6",
"r7",
935 "fp",
"r9",
"r10",
"r11",
936 "r12",
"tp",
"gp",
"sp"
940 static const char *csr_names[] = {
941 "pc",
"lp",
"sar",
"",
942 "rpb",
"rpe",
"rpc",
"hi",
944 "mb0",
"me0",
"mb1",
"me1",
946 "psw",
"id",
"tmp",
"epc",
947 "exc",
"cfg",
"",
"npc",
948 "dbg",
"depc",
"opt",
"rcfg",
1032 if (! name || name[0] ==
'\0')
1064 else if (group == mep_csr_reggroup)
1066 else if (group == mep_cr_reggroup)
1068 else if (group == mep_ccr_reggroup)
1075 static struct type *
1100 else if (size == 64)
1135 int rawnum = mep_pseudo_to_raw[cookednum];
1221 int rawnum = mep_pseudo_to_raw[cookednum];
1281 info->arch = bfd_arch_mep;
1283 return print_insn_mep (pc, info);
1420 int pc_in_vliw_section;
1429 if (pc_in_vliw_section)
1462 if ((*insn & 0xc0000000) == 0xc0000000)
1490 else if ((*insn & 0xc0000000) == 0xc0000000)
1495 return pc + insn_len;
1500 #define SEXT(n, len) ((((int) (n)) ^ (1 << ((len) - 1))) - (1 << ((len) - 1)))
1503 #define FIELD(i, pos, len) (((i) >> (pos)) & ((1 << (len)) - 1))
1506 #define SFIELD(i, pos, len) (SEXT (FIELD ((i), (pos), (len)), (len)))
1522 #define IS_SW(i) (((i) & 0xf00f0000) == 0xc00a0000)
1524 #define IS_SB(i) (((i) & 0xf00f0000) == 0xc0080000)
1526 #define IS_SH(i) (((i) & 0xf00f0000) == 0xc0090000)
1527 #define SWBH_32_BASE(i) (FIELD (i, 20, 4))
1528 #define SWBH_32_SOURCE(i) (FIELD (i, 24, 4))
1529 #define SWBH_32_OFFSET(i) (SFIELD (i, 0, 16))
1532 #define IS_SW_IMMD(i) (((i) & 0xf0830000) == 0x40020000)
1533 #define SW_IMMD_SOURCE(i) (FIELD (i, 24, 4))
1534 #define SW_IMMD_OFFSET(i) (FIELD (i, 18, 5) << 2)
1537 #define IS_SW_REG(i) (((i) & 0xf00f0000) == 0x000a0000)
1538 #define SW_REG_SOURCE(i) (FIELD (i, 24, 4))
1539 #define SW_REG_BASE(i) (FIELD (i, 20, 4))
1542 #define IS_ADD3_16_REG(i) (((i) & 0xf0000000) == 0x90000000)
1543 #define ADD3_16_REG_SRC1(i) (FIELD (i, 20, 4))
1544 #define ADD3_16_REG_SRC2(i) (FIELD (i, 24, 4))
1547 #define IS_ADD3_32(i) (((i) & 0xf00f0000) == 0xc0000000)
1548 #define ADD3_32_TARGET(i) (FIELD (i, 24, 4))
1549 #define ADD3_32_SOURCE(i) (FIELD (i, 20, 4))
1550 #define ADD3_32_OFFSET(i) (SFIELD (i, 0, 16))
1553 #define IS_ADD3_16(i) (((i) & 0xf0830000) == 0x40000000)
1554 #define ADD3_16_TARGET(i) (FIELD (i, 24, 4))
1555 #define ADD3_16_OFFSET(i) (FIELD (i, 18, 5) << 2)
1558 #define IS_ADD(i) (((i) & 0xf0030000) == 0x60000000)
1559 #define ADD_TARGET(i) (FIELD (i, 24, 4))
1560 #define ADD_OFFSET(i) (SFIELD (i, 18, 6))
1564 #define IS_LDC(i) (((i) & 0xf00e0000) == 0x700a0000)
1565 #define LDC_IMM(i) ((FIELD (i, 16, 1) << 4) | FIELD (i, 20, 4))
1566 #define LDC_TARGET(i) (FIELD (i, 24, 4))
1569 #define IS_LW(i) (((i) & 0xf00f0000) == 0xc00e0000)
1570 #define LW_TARGET(i) (FIELD (i, 24, 4))
1571 #define LW_BASE(i) (FIELD (i, 20, 4))
1572 #define LW_OFFSET(i) (SFIELD (i, 0, 16))
1575 #define IS_MOV(i) (((i) & 0xf00f0000) == 0x00000000)
1576 #define MOV_TARGET(i) (FIELD (i, 24, 4))
1577 #define MOV_SOURCE(i) (FIELD (i, 20, 4))
1580 #define IS_BRA(i) (((i) & 0xf0010000) == 0xb0000000)
1581 #define BRA_DISP(i) (SFIELD (i, 17, 11) << 1)
1683 CORE_ADDR after_last_frame_setup_insn = start_pc;
1685 memset (result, 0,
sizeof (*result));
1698 while (pc < limit_pc)
1701 pv_t pre_insn_fp, pre_insn_sp;
1751 after_last_frame_setup_insn = next_pc;
1768 after_last_frame_setup_insn = next_pc;
1780 after_last_frame_setup_insn = next_pc;
1796 after_last_frame_setup_insn = next_pc;
1807 else if (
IS_LW (insn))
1837 after_last_frame_setup_insn = next_pc;
1864 after_last_frame_setup_insn = next_pc;
1873 && ((pre_insn_sp.
k - reg[MEP_SP_REGNUM].
k)
1874 < (reg[MEP_SP_REGNUM].
k - pre_insn_sp.
k)))
1875 after_last_frame_setup_insn = next_pc;
1920 static const unsigned char *
1923 static unsigned char breakpoint[] = { 0x70, 0x32 };
1924 *lenptr =
sizeof (breakpoint);
1935 void **this_prologue_cache)
1937 if (! *this_prologue_cache)
1941 *this_prologue_cache
1950 stop_addr = func_start;
1953 func_start, stop_addr, *this_prologue_cache);
1956 return *this_prologue_cache;
1964 void **this_prologue_cache)
1992 void **this_prologue_cache,
2000 static struct value *
2002 void **this_prologue_cache,
int regnum)
2138 if (byte_order == BFD_ENDIAN_BIG)
2145 offset, TYPE_LENGTH (type),
2166 if (byte_order == BFD_ENDIAN_BIG)
2172 offset, TYPE_LENGTH (type),
2181 GDB cannot set return values larger than four bytes; the Media Processor's\n\
2182 calling conventions do not provide enough information to do this.\n\
2183 Try using the 'return' command with no argument."));
2208 GDB cannot set return values larger than four bytes; the Media Processor's\n\
2209 calling conventions do not provide enough information to do this.\n\
2210 Try using the 'return' command with no argument."));
2270 for (i = 0; i < argc; i++)
2278 sp = (sp - arg_len) & -4;
2314 if (argc + (struct_addr ? 1 : 0) > 4)
2315 sp -= ((argc + (struct_addr ? 1 : 0)) - 4) *
MEP_GPR_SIZE;
2328 for (i = 0; i < argc; i++)
2389 CONFIG_ATTR me_module;
2397 if (bfd_get_flavour (info.
abfd) == bfd_target_elf_flavour)
2398 me_module = elf_elfheader (info.
abfd)->
e_flags & EF_MEP_INDEX_MASK;
2400 me_module = CONFIG_NONE;
2403 me_module = CONFIG_NONE;
2414 const char *module_endianness
2416 const char *file_name = bfd_get_filename (info.
abfd);
2417 const char *file_endianness
2418 = bfd_big_endian (info.
abfd) ?
"big" :
"little";
2422 warning (
_(
"the MeP module '%s' is %s-endian, but the executable\n"
2423 "%s is %s-endian."),
2424 module_name, module_endianness,
2425 file_name, file_endianness);
2427 warning (
_(
"the selected MeP module is %s-endian, but the "
2429 "%s is %s-endian."),
2430 module_endianness, file_name, file_endianness);
2450 enum cgen_endian endian = (info.
byte_order == BFD_ENDIAN_BIG
2452 : CGEN_ENDIAN_LITTLE);
2454 tdep->
cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
2455 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)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
initialize_file_ftype _initialize_mep_tdep
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
#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 ADD3_16_TARGET(i)
CORE_ADDR get_frame_pc(struct frame_info *frame)
#define ADD3_32_TARGET(i)
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 void mep_pseudo_cr64_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
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,...)
#define IS_CR64_REGNUM(n)
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)
#define SWBH_32_OFFSET(i)
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)
struct cleanup * make_cleanup_free_pv_area(struct pv_area *area)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
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)
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)
void value_free(struct value *val)
int pv_area_find_reg(struct pv_area *area, struct gdbarch *gdbarch, int reg, CORE_ADDR *offset_p)
enum prologue_value_kind kind
void regcache_cooked_write_part(struct regcache *regcache, int regnum, int offset, int len, const gdb_byte *buf)
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
#define IS_RAW_CR_REGNUM(n)
static void mep_pseudo_cr32_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
const struct bfd_arch_info * bfd_arch_info
#define ADD3_32_SOURCE(i)
static struct type * mep_register_type(struct gdbarch *gdbarch, int reg_nr)
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)
#define SW_IMMD_SOURCE(i)
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)
void store_unsigned_integer(gdb_byte *, int, enum bfd_endian, ULONGEST)
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)
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)
void initialize_file_ftype(void)
static CGEN_KEYWORD * current_ccr_names(void)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
static struct reggroup * mep_cr_reggroup
pv_t pv_area_fetch(struct pv_area *area, pv_t addr, CORE_ADDR size)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
static char * register_name_from_keyword(CGEN_KEYWORD *keyword_table, int regnum)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int status
#define gdb_assert_not_reached(message)
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)
static const unsigned char * mep_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
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)
#define ADD3_32_OFFSET(i)
void set_gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
#define IS_CR32_REGNUM(n)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
void pv_area_store(struct pv_area *area, pv_t addr, CORE_ADDR size, pv_t value)
int pv_area_store_would_trash(struct pv_area *area, pv_t addr)
static int is_arg_spill(struct gdbarch *gdbarch, pv_t value, pv_t addr, struct pv_area *stack)
static enum register_status mep_pseudo_cr64_read(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
static struct mep_prologue * mep_analyze_frame_prologue(struct frame_info *this_frame, void **this_prologue_cache)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_gdbarch_read_pc(struct gdbarch *gdbarch, gdbarch_read_pc_ftype read_pc)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
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)
void pv_area_scan(struct pv_area *area, void(*func)(void *closure, pv_t addr, CORE_ADDR size, pv_t value), void *closure)
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
struct pv_area * make_pv_area(int base_reg, int addr_bit)
#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)
struct ui_file * gdb_stderr
CORE_ADDR find_function_addr(struct value *function, struct type **retval_type)
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)
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)
#define SW_IMMD_OFFSET(i)
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)
static int mep_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)
struct type * builtin_uint64
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)
static void mep_pseudo_csr_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
enum bfd_endian byte_order
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
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)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
#define SWBH_32_SOURCE(i)
#define ADD3_16_OFFSET(i)
static struct value * mep_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
void do_cleanups(struct cleanup *old_chain)
static enum register_status mep_pseudo_cr32_read(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
struct type * builtin_float
static void mep_store_return_value(struct gdbarch *arch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)