45#include "cgen/bitset.h"
52#define GDB_CGEN_REMAP_PREFIX mep
54#include "opcodes/mep-desc.h"
55#include "opcodes/mep-opc.h"
161 CGEN_BITSET *copro_isa_mask,
162 CGEN_BITSET *generic_isa_mask)
164 int prefix_len = strlen (
prefix);
167 for (i = 0; i < desc->hw_table.num_entries; i++)
170 if (strncmp (
prefix, hw->name, prefix_len) == 0)
172 CGEN_BITSET *hw_isa_mask
174 &CGEN_ATTR_CGEN_HW_ISA_VALUE (CGEN_HW_ATTRS (hw)));
176 if (cgen_bitset_intersect_p (hw_isa_mask, copro_isa_mask)
177 && ! cgen_bitset_intersect_p (hw_isa_mask, generic_isa_mask))
193 for (i = 0; i < desc->hw_table.num_entries; i++)
197 if (hw->type ==
type)
213 CGEN_HW_TYPE generic_type)
267 CGEN_CPU_DESC desc = tdep->
cpu_desc;
270 if (me_module == CONFIG_NONE)
274 CGEN_BITSET *cop = &mep_config_map[me_module].cop_isa;
275 CGEN_BITSET *core = &mep_config_map[me_module].core_isa;
276 CGEN_BITSET *
generic = &mep_config_map[CONFIG_NONE].core_isa;
277 CGEN_BITSET *cop_and_core;
281 cop_and_core = cgen_bitset_copy (cop);
282 cgen_bitset_union (cop, core, cop_and_core);
301 gdb_assert (hw->asm_type == CGEN_ASM_KEYWORD);
305 return (CGEN_KEYWORD *) hw->asm_data;
315 const CGEN_KEYWORD_ENTRY *entry
316 = cgen_keyword_lookup_value (keyword_table,
regnum);
320 char *
name = entry->name;
365 unsigned int opt_bit, option_mask_bit;
370 {
MEP_OPT_DBG, 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN },
374 {
MEP_OPT_MIN, 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN },
375 {
MEP_OPT_CLP, 1 << CGEN_INSN_OPTIONAL_CLIP_INSN },
383 unsigned int opt = 0;
385 for (i = 0; i < (
sizeof (
bits) /
sizeof (
bits[0])); i++)
386 if (option_mask &
bits[i].option_mask_bit)
387 opt |=
bits[i].opt_bit;
407 if (mep_config_map[me_module].option_mask
408 & (1 << CGEN_INSN_OPTIONAL_CP64_INSN))
419 return mep_config_map[me_module].big_endian;
429 if (! mep_config_map[me_module].
name
430 || mep_config_map[me_module].
name[0] ==
'\0')
433 return mep_config_map[me_module].name;
618#define IN_SET(set, n) \
619 (MEP_FIRST_ ## set ## _REGNUM <= (n) && (n) <= MEP_LAST_ ## set ## _REGNUM)
621#define IS_GPR_REGNUM(n) (IN_SET (GPR, (n)))
622#define IS_RAW_CSR_REGNUM(n) (IN_SET (RAW_CSR, (n)))
623#define IS_RAW_CR_REGNUM(n) (IN_SET (RAW_CR, (n)))
624#define IS_RAW_CCR_REGNUM(n) (IN_SET (RAW_CCR, (n)))
626#define IS_CSR_REGNUM(n) (IN_SET (CSR, (n)))
627#define IS_CR32_REGNUM(n) (IN_SET (CR32, (n)))
628#define IS_FP_CR32_REGNUM(n) (IN_SET (FP_CR32, (n)))
629#define IS_CR64_REGNUM(n) (IN_SET (CR64, (n)))
630#define IS_FP_CR64_REGNUM(n) (IN_SET (FP_CR64, (n)))
631#define IS_CR_REGNUM(n) (IS_CR32_REGNUM (n) || IS_FP_CR32_REGNUM (n) \
632 || IS_CR64_REGNUM (n) || IS_FP_CR64_REGNUM (n))
633#define IS_CCR_REGNUM(n) (IN_SET (CCR, (n)))
635#define IS_RAW_REGNUM(n) (IN_SET (RAW, (n)))
636#define IS_PSEUDO_REGNUM(n) (IN_SET (PSEUDO, (n)))
638#define NUM_REGS_IN_SET(set) \
639 (MEP_LAST_ ## set ## _REGNUM - MEP_FIRST_ ## set ## _REGNUM + 1)
641#define MEP_GPR_SIZE (4)
642#define MEP_PSW_SIZE (4)
643#define MEP_LP_SIZE (4)
668#define CSR(name) MEP_RAW_ ## name ## _REGNUM, MEP_ ## name ## _REGNUM
670 {
CSR(
PC), 0xffffffff },
671 {
CSR(LP), 0xffffffff },
672 {
CSR(SAR), 0x0000003f },
673 {
CSR(CSR3), 0xffffffff },
674 {
CSR(RPB), 0xfffffffe },
675 {
CSR(RPE), 0xffffffff },
676 {
CSR(RPC), 0xffffffff },
677 {
CSR(HI), 0xffffffff },
678 {
CSR(LO), 0xffffffff },
679 {
CSR(CSR9), 0xffffffff },
680 {
CSR(CSR10), 0xffffffff },
681 {
CSR(CSR11), 0xffffffff },
682 {
CSR(MB0), 0x0000ffff },
683 {
CSR(ME0), 0x0000ffff },
684 {
CSR(MB1), 0x0000ffff },
685 {
CSR(ME1), 0x0000ffff },
686 {
CSR(PSW), 0x000003ff },
687 {
CSR(ID), 0x00000000 },
688 {
CSR(TMP), 0xffffffff },
689 {
CSR(EPC), 0xffffffff },
690 {
CSR(EXC), 0x000030f0 },
691 {
CSR(CFG), 0x00c0001b },
692 {
CSR(CSR22), 0xffffffff },
693 {
CSR(NPC), 0xffffffff },
694 {
CSR(DBG), 0x00000580 },
695 {
CSR(DEPC), 0xffffffff },
696 {
CSR(OPT), 0x00000000 },
697 {
CSR(RCFG), 0x00000000 },
698 {
CSR(CCFG), 0x00000000 },
699 {
CSR(CSR29), 0xffffffff },
700 {
CSR(CSR30), 0xffffffff },
701 {
CSR(CSR31), 0xffffffff },
809 gdb_assert_not_reached (
"unexpected coprocessor pseudo register");
838 gdb_assert_not_reached (
"unexpected coprocessor pseudo register");
857 return (CONFIG_ATTR) regval;
920 return CGEN_ATTR_CGEN_HW_IS_FLOAT_VALUE (CGEN_HW_ATTRS (hw));
940 static const char *gpr_names[] = {
941 "r0",
"r1",
"r2",
"r3",
942 "r4",
"r5",
"r6",
"r7",
943 "fp",
"r9",
"r10",
"r11",
944 "r12",
"tp",
"gp",
"sp"
948 static const char *csr_names[] = {
949 "pc",
"lp",
"sar",
"",
950 "rpb",
"rpe",
"rpc",
"hi",
952 "mb0",
"me0",
"mb1",
"me1",
954 "psw",
"id",
"tmp",
"epc",
955 "exc",
"cfg",
"",
"npc",
956 "dbg",
"depc",
"opt",
"rcfg",
1108 else if (
size == 64)
1116 gdb_assert_not_reached (
"unexpected cr size");
1124static enum register_status
1130 enum register_status
status;
1150static enum register_status
1160static enum register_status
1176 gdb_assert_not_reached (
"unexpected pseudo register");
1184 const gdb_byte *buf)
1200 ULONGEST mixed_bits;
1215 const gdb_byte *buf)
1236 const gdb_byte *buf)
1246 const gdb_byte *buf)
1259 gdb_assert_not_reached (
"unexpected pseudo register");
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)
1480 gdb_assert_not_reached (
"unexpected vliw mode");
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)
1668 CORE_ADDR start_pc, CORE_ADDR limit_pc,
1674 CORE_ADDR after_last_frame_setup_insn = start_pc;
1676 memset (result, 0,
sizeof (*result));
1688 while (pc < limit_pc)
1691 pv_t pre_insn_fp, pre_insn_sp;
1741 after_last_frame_setup_insn = next_pc;
1743 stack.
store (reg[rm], 4, reg[rn]);
1758 after_last_frame_setup_insn = next_pc;
1760 stack.
store (addr, 4, reg[rn]);
1770 after_last_frame_setup_insn = next_pc;
1779 : (gdb_assert (
IS_SW (insn)), 4));
1786 after_last_frame_setup_insn = next_pc;
1797 else if (
IS_LW (insn))
1804 reg[rn] = stack.
fetch (addr, 4);
1827 after_last_frame_setup_insn = next_pc;
1854 after_last_frame_setup_insn = next_pc;
1865 after_last_frame_setup_insn = next_pc;
1893 CORE_ADDR func_addr, func_end;
1917 void **this_prologue_cache)
1919 if (! *this_prologue_cache)
1921 CORE_ADDR func_start, stop_addr;
1923 *this_prologue_cache
1932 stop_addr = func_start;
1935 func_start, stop_addr,
1947 void **this_prologue_cache)
1950 = mep_analyze_frame_prologue (this_frame, this_prologue_cache);
1975 void **this_prologue_cache,
1983static struct value *
1985 void **this_prologue_cache,
int regnum)
1988 = mep_analyze_frame_prologue (this_frame, this_prologue_cache);
2102 if (byte_order == BFD_ENDIAN_BIG)
2117 const gdb_byte *valbuf)
2129 if (byte_order == BFD_ENDIAN_BIG)
2143GDB cannot set return values larger than four bytes; the Media Processor's\n\
2144calling conventions do not provide enough information to do this.\n\
2145Try using the 'return' command with no argument."));
2151 gdb_byte *readbuf,
const gdb_byte *writebuf)
2170GDB cannot set return values larger than four bytes; the Media Processor's\n\
2171calling conventions do not provide enough information to do this.\n\
2172Try using the 'return' command with no argument."));
2232 for (i = 0; i < argc; i++)
2234 unsigned arg_len = argv[i]->type ()->length ();
2240 sp = (sp - arg_len) & -4;
2241 write_memory (sp, argv[i]->contents ().data (), arg_len);
2253 int argc,
struct value **argv, CORE_ADDR sp,
2255 CORE_ADDR struct_addr)
2258 CORE_ADDR *copy = (CORE_ADDR *) alloca (argc *
sizeof (copy[0]));
2265 CORE_ADDR arg_stack;
2269 CORE_ADDR arg_stack_end;
2275 if (argc + (struct_addr ? 1 : 0) > 4)
2276 sp -= ((argc + (struct_addr ? 1 : 0)) - 4) *
MEP_GPR_SIZE;
2289 for (i = 0; i < argc; i++)
2296 argv[i]->
type ()->length (),
2319 gdb_assert (arg_stack <= arg_stack_end);
2338 CONFIG_ATTR me_module;
2346 if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
2348 int flag = elf_elfheader (info.abfd)->e_flags & EF_MEP_INDEX_MASK;
2349 me_module = (CONFIG_ATTR) flag;
2352 me_module = CONFIG_NONE;
2355 me_module = CONFIG_NONE;
2366 const char *module_endianness
2368 const char *file_name = bfd_get_filename (info.abfd);
2369 const char *file_endianness
2370 = bfd_big_endian (info.abfd) ?
"big" :
"little";
2374 warning (_(
"the MeP module '%s' is %s-endian, but the executable\n"
2375 "%s is %s-endian."),
2376 module_name, module_endianness,
2377 file_name, file_endianness);
2379 warning (_(
"the selected MeP module is %s-endian, but the "
2381 "%s is %s-endian."),
2382 module_endianness, file_name, file_endianness);
2395 = gdbarch_tdep<mep_gdbarch_tdep> (
arches->gdbarch);
2407 const char *mach_name = info.bfd_arch_info->printable_name;
2408 enum cgen_endian endian = (info.byte_order == BFD_ENDIAN_BIG
2410 : CGEN_ENDIAN_LITTLE);
2412 tdep->
cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
2413 CGEN_CPU_OPEN_ENDIAN, endian,
#define bits(obj, st, fn)
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep, gdbarch_supports_arch_info_ftype *supports_arch_info)
struct gdbarch * target_gdbarch(void)
static std::vector< const char * > arches
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
#define BP_MANIPULATION(BREAK_INSN)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
void scan(void(*func)(void *closure, pv_t addr, CORE_ADDR size, pv_t value), void *closure)
pv_t fetch(pv_t addr, CORE_ADDR size)
bool find_reg(struct gdbarch *gdbarch, int reg, CORE_ADDR *offset_p)
bool store_would_trash(pv_t addr)
void store(pv_t addr, CORE_ADDR size, pv_t value)
enum register_status raw_read(int regnum, gdb_byte *buf)
enum register_status cooked_read_part(int regnum, int offset, int len, gdb_byte *buf)
void cooked_write_part(int regnum, int offset, int len, const gdb_byte *buf)
void raw_write(int regnum, const gdb_byte *buf)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
@ RETURN_VALUE_ABI_RETURNS_ADDRESS
@ RETURN_VALUE_REGISTER_CONVENTION
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
struct value * frame_unwind_got_memory(frame_info_ptr frame, int regnum, CORE_ADDR addr)
struct value * frame_unwind_got_register(frame_info_ptr frame, int regnum, int new_regnum)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
struct value * frame_unwind_got_constant(frame_info_ptr frame, int regnum, ULONGEST val)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
struct value * get_frame_register_value(frame_info_ptr frame, int regnum)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
#define FRAME_OBSTACK_ZALLOC(TYPE)
void set_gdbarch_stab_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc)
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
void set_gdbarch_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn)
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum)
void set_gdbarch_pseudo_register_read(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call)
void set_gdbarch_frame_args_skip(struct gdbarch *gdbarch, CORE_ADDR frame_args_skip)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, gdbarch_tdep_up tdep)
std::unique_ptr< gdbarch_tdep_base > gdbarch_tdep_up
function_call_return_method
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
static struct gdbarch * mep_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
static int is_arg_reg(pv_t value)
static void mep_store_return_value(struct gdbarch *arch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static const char * me_module_name(CONFIG_ATTR me_module)
void _initialize_mep_tdep()
constexpr gdb_byte mep_break_insn[]
static void check_for_saved(void *result_untyped, pv_t addr, CORE_ADDR size, pv_t value)
static int mep_pseudo_cr_size(int pseudo)
static int mep_pseudo_to_raw[MEP_NUM_REGS]
static CORE_ADDR mep_get_insn(struct gdbarch *gdbarch, CORE_ADDR pc, unsigned long *insn)
static unsigned int opt_from_option_mask(unsigned int option_mask)
#define SW_IMMD_SOURCE(i)
static const reggroup * mep_cr_reggroup
static unsigned int current_options(void)
static void mep_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR start_pc, CORE_ADDR limit_pc, struct mep_prologue *result)
static const reggroup * mep_ccr_reggroup
#define NUM_REGS_IN_SET(set)
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)
static int mep_pseudo_cr_is_float(int pseudo)
#define SWBH_32_SOURCE(i)
static void mep_extract_return_value(struct gdbarch *arch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static CGEN_KEYWORD * register_set_keyword_table(const CGEN_HW_ENTRY *hw)
static const struct frame_unwind mep_frame_unwind
static const reggroup * mep_csr_reggroup
static int mep_register_reggroup_p(struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
static int mep_raw_to_pseudo[MEP_NUM_REGS]
static enum register_status mep_pseudo_register_read(struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf)
static CORE_ADDR push_large_arguments(CORE_ADDR sp, int argc, struct value **argv, CORE_ADDR copy[])
static enum register_status mep_pseudo_cr64_read(struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf)
#define IS_FP_CR32_REGNUM(n)
static CORE_ADDR mep_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
static struct value * mep_frame_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
static CORE_ADDR mep_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
#define ADD3_16_OFFSET(i)
static unsigned int me_module_opt(CONFIG_ATTR me_module)
#define IS_RAW_CR_REGNUM(n)
static int mep_debug_reg_to_regnum(struct gdbarch *gdbarch, int debug_reg)
static const char * mep_register_name(struct gdbarch *gdbarch, int regnr)
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)
static CONFIG_ATTR current_me_module(void)
static const char * register_name_from_keyword(CGEN_KEYWORD *keyword_table, int regnum)
static int current_cop_data_bus_width(void)
static int current_cr_is_float(void)
static enum register_status mep_pseudo_cr32_read(struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf)
static void mep_pseudo_register_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
static int mep_pseudo_cr_index(int pseudo)
#define ADD3_32_OFFSET(i)
#define IS_FP_CR64_REGNUM(n)
#define SWBH_32_OFFSET(i)
#define ADD3_16_TARGET(i)
static int is_arg_spill(struct gdbarch *gdbarch, pv_t value, pv_t addr, struct pv_area *stack)
static void mep_frame_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
static int me_module_big_endian(CONFIG_ATTR me_module)
static struct type * mep_register_type(struct gdbarch *gdbarch, int reg_nr)
static CGEN_KEYWORD * current_cr_names(void)
#define ADD3_32_SOURCE(i)
#define SW_IMMD_OFFSET(i)
static int mep_pc_in_vliw_section(CORE_ADDR pc)
static void mep_pseudo_cr64_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
#define ADD3_32_TARGET(i)
static int mep_use_struct_convention(struct type *type)
static mep_csr_register mep_csr_registers[]
static void mep_init_pseudoregister_maps(void)
static const CGEN_HW_ENTRY * find_hw_entry_by_type(CGEN_CPU_DESC desc, CGEN_HW_TYPE type)
@ MEP_FIRST_RAW_CR_REGNUM
@ MEP_FIRST_FP_CR32_REGNUM
@ MEP_LAST_RAW_CSR_REGNUM
@ MEP_LAST_FP_CR64_REGNUM
@ MEP_LAST_RAW_CCR_REGNUM
@ MEP_FIRST_PSEUDO_REGNUM
@ MEP_FIRST_RAW_CCR_REGNUM
@ MEP_LAST_FP_CR32_REGNUM
@ MEP_FIRST_RAW_CSR_REGNUM
@ MEP_FIRST_FP_CR64_REGNUM
static const CGEN_HW_ENTRY * me_module_register_set(CONFIG_ATTR me_module, const char *prefix, CGEN_HW_TYPE generic_type)
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, function_call_return_method return_method, CORE_ADDR struct_addr)
#define IS_CR64_REGNUM(n)
static int mep_gdb_print_insn(bfd_vma pc, disassemble_info *info)
#define IS_CR32_REGNUM(n)
static void mep_pseudo_csr_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
static void mep_pseudo_cr32_write(struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
static CGEN_KEYWORD * current_ccr_names(void)
static CORE_ADDR mep_frame_base(frame_info_ptr this_frame, void **this_prologue_cache)
static int me_module_cop_data_bus_width(CONFIG_ATTR me_module)
struct obj_section * find_pc_section(CORE_ADDR pc)
#define prefix(a, b, R, do)
int pv_is_register_k(pv_t a, int r, CORE_ADDR k)
pv_t pv_register(int reg, CORE_ADDR k)
int pv_is_identical(pv_t a, pv_t b)
pv_t pv_add_constant(pv_t v, CORE_ADDR k)
int pv_is_register(pv_t a, int r)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
int register_size(struct gdbarch *gdbarch, int regnum)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void regcache_raw_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct regcache * get_current_regcache(void)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
const reggroup *const general_reggroup
const reggroup * reggroup_new(const char *name, enum reggroup_type type)
const reggroup *const save_reggroup
const reggroup *const all_reggroup
void reggroup_add(struct gdbarch *gdbarch, const reggroup *group)
const reggroup *const restore_reggroup
struct type * builtin_double
struct type * builtin_uint32
struct type * builtin_uint64
struct type * builtin_float
int reg_offset[MEP_NUM_REGS]
struct bfd_section * the_bfd_section
struct value::@203::@204 reg
int target_has_registers()
LONGEST value_as_long(struct value *val)
value_ref_ptr release_value(struct value *val)