GDB (API)
|
#include "defs.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "gdb_string.h"
#include "value.h"
#include "inferior.h"
#include "dis-asm.h"
#include "symfile.h"
#include "objfiles.h"
#include "language.h"
#include "arch-utils.h"
#include "regcache.h"
#include "remote.h"
#include "floatformat.h"
#include "sim-regno.h"
#include "disasm.h"
#include "trad-frame.h"
#include "reggroups.h"
#include "elf-bfd.h"
#include "elf/mep.h"
#include "prologue-value.h"
#include "cgen/bitset.h"
#include "infcall.h"
#include "gdb_assert.h"
#include "opcodes/mep-desc.h"
#include "opcodes/mep-opc.h"
Go to the source code of this file.
Classes | |
struct | gdbarch_tdep |
Defines | |
#define | IN_SET(set, n) (MEP_FIRST_ ## set ## _REGNUM <= (n) && (n) <= MEP_LAST_ ## set ## _REGNUM) |
#define | IS_GPR_REGNUM(n) (IN_SET (GPR, (n))) |
#define | IS_RAW_CSR_REGNUM(n) (IN_SET (RAW_CSR, (n))) |
#define | IS_RAW_CR_REGNUM(n) (IN_SET (RAW_CR, (n))) |
#define | IS_RAW_CCR_REGNUM(n) (IN_SET (RAW_CCR, (n))) |
#define | IS_CSR_REGNUM(n) (IN_SET (CSR, (n))) |
#define | IS_CR32_REGNUM(n) (IN_SET (CR32, (n))) |
#define | IS_FP_CR32_REGNUM(n) (IN_SET (FP_CR32, (n))) |
#define | IS_CR64_REGNUM(n) (IN_SET (CR64, (n))) |
#define | IS_FP_CR64_REGNUM(n) (IN_SET (FP_CR64, (n))) |
#define | IS_CR_REGNUM(n) |
#define | IS_CCR_REGNUM(n) (IN_SET (CCR, (n))) |
#define | IS_RAW_REGNUM(n) (IN_SET (RAW, (n))) |
#define | IS_PSEUDO_REGNUM(n) (IN_SET (PSEUDO, (n))) |
#define | NUM_REGS_IN_SET(set) (MEP_LAST_ ## set ## _REGNUM - MEP_FIRST_ ## set ## _REGNUM + 1) |
#define | MEP_GPR_SIZE (4) /* Size of a MeP general-purpose register. */ |
#define | MEP_PSW_SIZE (4) /* Size of the PSW register. */ |
#define | MEP_LP_SIZE (4) /* Size of the LP register. */ |
#define | CSR(name) MEP_RAW_ ## name ## _REGNUM, MEP_ ## name ## _REGNUM |
#define | SEXT(n, len) ((((int) (n)) ^ (1 << ((len) - 1))) - (1 << ((len) - 1))) |
#define | FIELD(i, pos, len) (((i) >> (pos)) & ((1 << (len)) - 1)) |
#define | SFIELD(i, pos, len) (SEXT (FIELD ((i), (pos), (len)), (len))) |
#define | IS_SW(i) (((i) & 0xf00f0000) == 0xc00a0000) |
#define | IS_SB(i) (((i) & 0xf00f0000) == 0xc0080000) |
#define | IS_SH(i) (((i) & 0xf00f0000) == 0xc0090000) |
#define | SWBH_32_BASE(i) (FIELD (i, 20, 4)) |
#define | SWBH_32_SOURCE(i) (FIELD (i, 24, 4)) |
#define | SWBH_32_OFFSET(i) (SFIELD (i, 0, 16)) |
#define | IS_SW_IMMD(i) (((i) & 0xf0830000) == 0x40020000) |
#define | SW_IMMD_SOURCE(i) (FIELD (i, 24, 4)) |
#define | SW_IMMD_OFFSET(i) (FIELD (i, 18, 5) << 2) |
#define | IS_SW_REG(i) (((i) & 0xf00f0000) == 0x000a0000) |
#define | SW_REG_SOURCE(i) (FIELD (i, 24, 4)) |
#define | SW_REG_BASE(i) (FIELD (i, 20, 4)) |
#define | IS_ADD3_16_REG(i) (((i) & 0xf0000000) == 0x90000000) |
#define | ADD3_16_REG_SRC1(i) (FIELD (i, 20, 4)) /* n */ |
#define | ADD3_16_REG_SRC2(i) (FIELD (i, 24, 4)) /* m */ |
#define | IS_ADD3_32(i) (((i) & 0xf00f0000) == 0xc0000000) |
#define | ADD3_32_TARGET(i) (FIELD (i, 24, 4)) |
#define | ADD3_32_SOURCE(i) (FIELD (i, 20, 4)) |
#define | ADD3_32_OFFSET(i) (SFIELD (i, 0, 16)) |
#define | IS_ADD3_16(i) (((i) & 0xf0830000) == 0x40000000) |
#define | ADD3_16_TARGET(i) (FIELD (i, 24, 4)) |
#define | ADD3_16_OFFSET(i) (FIELD (i, 18, 5) << 2) |
#define | IS_ADD(i) (((i) & 0xf0030000) == 0x60000000) |
#define | ADD_TARGET(i) (FIELD (i, 24, 4)) |
#define | ADD_OFFSET(i) (SFIELD (i, 18, 6)) |
#define | IS_LDC(i) (((i) & 0xf00e0000) == 0x700a0000) |
#define | LDC_IMM(i) ((FIELD (i, 16, 1) << 4) | FIELD (i, 20, 4)) |
#define | LDC_TARGET(i) (FIELD (i, 24, 4)) |
#define | IS_LW(i) (((i) & 0xf00f0000) == 0xc00e0000) |
#define | LW_TARGET(i) (FIELD (i, 24, 4)) |
#define | LW_BASE(i) (FIELD (i, 20, 4)) |
#define | LW_OFFSET(i) (SFIELD (i, 0, 16)) |
#define | IS_MOV(i) (((i) & 0xf00f0000) == 0x00000000) |
#define | MOV_TARGET(i) (FIELD (i, 24, 4)) |
#define | MOV_SOURCE(i) (FIELD (i, 20, 4)) |
#define | IS_BRA(i) (((i) & 0xf0010000) == 0xb0000000) |
#define | BRA_DISP(i) (SFIELD (i, 17, 11) << 1) |
Enumerations | |
enum | { MEP_OPT_DIV = 1 << 25, MEP_OPT_MUL = 1 << 24, MEP_OPT_BIT = 1 << 23, MEP_OPT_SAT = 1 << 22, MEP_OPT_CLP = 1 << 21, MEP_OPT_MIN = 1 << 20, MEP_OPT_AVE = 1 << 19, MEP_OPT_ABS = 1 << 18, MEP_OPT_LDZ = 1 << 16, MEP_OPT_VL64 = 1 << 6, MEP_OPT_VL32 = 1 << 5, MEP_OPT_COP = 1 << 4, MEP_OPT_DSP = 1 << 2, MEP_OPT_UCI = 1 << 1, MEP_OPT_DBG = 1 << 0 } |
enum | { MEP_FIRST_RAW_REGNUM = 0, MEP_FIRST_GPR_REGNUM = 0, MEP_R0_REGNUM = 0, MEP_R1_REGNUM = 1, MEP_R2_REGNUM = 2, MEP_R3_REGNUM = 3, MEP_R4_REGNUM = 4, MEP_R5_REGNUM = 5, MEP_R6_REGNUM = 6, MEP_R7_REGNUM = 7, MEP_R8_REGNUM = 8, MEP_R9_REGNUM = 9, MEP_R10_REGNUM = 10, MEP_R11_REGNUM = 11, MEP_R12_REGNUM = 12, MEP_FP_REGNUM = MEP_R8_REGNUM, MEP_R13_REGNUM = 13, MEP_TP_REGNUM = MEP_R13_REGNUM, MEP_R14_REGNUM = 14, MEP_GP_REGNUM = MEP_R14_REGNUM, MEP_R15_REGNUM = 15, MEP_SP_REGNUM = MEP_R15_REGNUM, MEP_LAST_GPR_REGNUM = MEP_R15_REGNUM, MEP_FIRST_RAW_CSR_REGNUM = 16, MEP_RAW_PC_REGNUM = 16, MEP_RAW_LP_REGNUM = 17, MEP_RAW_SAR_REGNUM = 18, MEP_RAW_CSR3_REGNUM = 19, MEP_RAW_RPB_REGNUM = 20, MEP_RAW_RPE_REGNUM = 21, MEP_RAW_RPC_REGNUM = 22, MEP_RAW_HI_REGNUM = 23, MEP_RAW_LO_REGNUM = 24, MEP_RAW_CSR9_REGNUM = 25, MEP_RAW_CSR10_REGNUM = 26, MEP_RAW_CSR11_REGNUM = 27, MEP_RAW_MB0_REGNUM = 28, MEP_RAW_ME0_REGNUM = 29, MEP_RAW_MB1_REGNUM = 30, MEP_RAW_ME1_REGNUM = 31, MEP_RAW_PSW_REGNUM = 32, MEP_RAW_ID_REGNUM = 33, MEP_RAW_TMP_REGNUM = 34, MEP_RAW_EPC_REGNUM = 35, MEP_RAW_EXC_REGNUM = 36, MEP_RAW_CFG_REGNUM = 37, MEP_RAW_CSR22_REGNUM = 38, MEP_RAW_NPC_REGNUM = 39, MEP_RAW_DBG_REGNUM = 40, MEP_RAW_DEPC_REGNUM = 41, MEP_RAW_OPT_REGNUM = 42, MEP_RAW_RCFG_REGNUM = 43, MEP_RAW_CCFG_REGNUM = 44, MEP_RAW_CSR29_REGNUM = 45, MEP_RAW_CSR30_REGNUM = 46, MEP_RAW_CSR31_REGNUM = 47, MEP_LAST_RAW_CSR_REGNUM = MEP_RAW_CSR31_REGNUM, MEP_FIRST_RAW_CR_REGNUM = 48, MEP_LAST_RAW_CR_REGNUM = MEP_FIRST_RAW_CR_REGNUM + 31, MEP_FIRST_RAW_CCR_REGNUM = 80, MEP_LAST_RAW_CCR_REGNUM = MEP_FIRST_RAW_CCR_REGNUM + 63, MEP_MODULE_REGNUM, MEP_LAST_RAW_REGNUM = MEP_MODULE_REGNUM, MEP_NUM_RAW_REGS = MEP_LAST_RAW_REGNUM + 1, MEP_FIRST_PSEUDO_REGNUM = MEP_NUM_RAW_REGS, MEP_FIRST_CSR_REGNUM = MEP_FIRST_PSEUDO_REGNUM, MEP_PC_REGNUM = MEP_FIRST_CSR_REGNUM, MEP_LP_REGNUM, MEP_SAR_REGNUM, MEP_CSR3_REGNUM, MEP_RPB_REGNUM, MEP_RPE_REGNUM, MEP_RPC_REGNUM, MEP_HI_REGNUM, MEP_LO_REGNUM, MEP_CSR9_REGNUM, MEP_CSR10_REGNUM, MEP_CSR11_REGNUM, MEP_MB0_REGNUM, MEP_ME0_REGNUM, MEP_MB1_REGNUM, MEP_ME1_REGNUM, MEP_PSW_REGNUM, MEP_ID_REGNUM, MEP_TMP_REGNUM, MEP_EPC_REGNUM, MEP_EXC_REGNUM, MEP_CFG_REGNUM, MEP_CSR22_REGNUM, MEP_NPC_REGNUM, MEP_DBG_REGNUM, MEP_DEPC_REGNUM, MEP_OPT_REGNUM, MEP_RCFG_REGNUM, MEP_CCFG_REGNUM, MEP_CSR29_REGNUM, MEP_CSR30_REGNUM, MEP_CSR31_REGNUM, MEP_LAST_CSR_REGNUM = MEP_CSR31_REGNUM, MEP_FIRST_CR32_REGNUM, MEP_LAST_CR32_REGNUM = MEP_FIRST_CR32_REGNUM + 31, MEP_FIRST_FP_CR32_REGNUM, MEP_LAST_FP_CR32_REGNUM = MEP_FIRST_FP_CR32_REGNUM + 31, MEP_FIRST_CR64_REGNUM, MEP_LAST_CR64_REGNUM = MEP_FIRST_CR64_REGNUM + 31, MEP_FIRST_FP_CR64_REGNUM, MEP_LAST_FP_CR64_REGNUM = MEP_FIRST_FP_CR64_REGNUM + 31, MEP_FIRST_CCR_REGNUM, MEP_LAST_CCR_REGNUM = MEP_FIRST_CCR_REGNUM + 63, MEP_LAST_PSEUDO_REGNUM = MEP_LAST_CCR_REGNUM, MEP_NUM_PSEUDO_REGS = (MEP_LAST_PSEUDO_REGNUM - MEP_LAST_RAW_REGNUM), MEP_NUM_REGS = MEP_NUM_RAW_REGS + MEP_NUM_PSEUDO_REGS } |
Functions | |
void | _initialize_mep_tdep (void) |
Variables | |
struct mep_csr_register | mep_csr_registers [] |
initialize_file_ftype | _initialize_mep_tdep |
#define ADD3_16_OFFSET | ( | i | ) | (FIELD (i, 18, 5) << 2) |
Definition at line 1558 of file mep-tdep.c.
#define ADD3_16_REG_SRC1 | ( | i | ) | (FIELD (i, 20, 4)) /* n */ |
Definition at line 1546 of file mep-tdep.c.
#define ADD3_16_REG_SRC2 | ( | i | ) | (FIELD (i, 24, 4)) /* m */ |
Definition at line 1547 of file mep-tdep.c.
#define ADD3_16_TARGET | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1557 of file mep-tdep.c.
#define ADD3_32_OFFSET | ( | i | ) | (SFIELD (i, 0, 16)) |
Definition at line 1553 of file mep-tdep.c.
#define ADD3_32_SOURCE | ( | i | ) | (FIELD (i, 20, 4)) |
Definition at line 1552 of file mep-tdep.c.
#define ADD3_32_TARGET | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1551 of file mep-tdep.c.
#define ADD_OFFSET | ( | i | ) | (SFIELD (i, 18, 6)) |
Definition at line 1563 of file mep-tdep.c.
#define ADD_TARGET | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1562 of file mep-tdep.c.
Definition at line 1584 of file mep-tdep.c.
Definition at line 667 of file mep-tdep.c.
Definition at line 1506 of file mep-tdep.c.
#define IN_SET | ( | set, | |
n | |||
) | (MEP_FIRST_ ## set ## _REGNUM <= (n) && (n) <= MEP_LAST_ ## set ## _REGNUM) |
Definition at line 617 of file mep-tdep.c.
#define IS_ADD | ( | i | ) | (((i) & 0xf0030000) == 0x60000000) |
Definition at line 1561 of file mep-tdep.c.
#define IS_ADD3_16 | ( | i | ) | (((i) & 0xf0830000) == 0x40000000) |
Definition at line 1556 of file mep-tdep.c.
#define IS_ADD3_16_REG | ( | i | ) | (((i) & 0xf0000000) == 0x90000000) |
Definition at line 1545 of file mep-tdep.c.
#define IS_ADD3_32 | ( | i | ) | (((i) & 0xf00f0000) == 0xc0000000) |
Definition at line 1550 of file mep-tdep.c.
#define IS_BRA | ( | i | ) | (((i) & 0xf0010000) == 0xb0000000) |
Definition at line 1583 of file mep-tdep.c.
#define IS_CCR_REGNUM | ( | n | ) | (IN_SET (CCR, (n))) |
Definition at line 632 of file mep-tdep.c.
#define IS_CR32_REGNUM | ( | n | ) | (IN_SET (CR32, (n))) |
Definition at line 626 of file mep-tdep.c.
#define IS_CR64_REGNUM | ( | n | ) | (IN_SET (CR64, (n))) |
Definition at line 628 of file mep-tdep.c.
#define IS_CR_REGNUM | ( | n | ) |
(IS_CR32_REGNUM (n) || IS_FP_CR32_REGNUM (n) \ || IS_CR64_REGNUM (n) || IS_FP_CR64_REGNUM (n))
Definition at line 630 of file mep-tdep.c.
#define IS_CSR_REGNUM | ( | n | ) | (IN_SET (CSR, (n))) |
Definition at line 625 of file mep-tdep.c.
#define IS_FP_CR32_REGNUM | ( | n | ) | (IN_SET (FP_CR32, (n))) |
Definition at line 627 of file mep-tdep.c.
#define IS_FP_CR64_REGNUM | ( | n | ) | (IN_SET (FP_CR64, (n))) |
Definition at line 629 of file mep-tdep.c.
#define IS_GPR_REGNUM | ( | n | ) | (IN_SET (GPR, (n))) |
Definition at line 620 of file mep-tdep.c.
#define IS_LDC | ( | i | ) | (((i) & 0xf00e0000) == 0x700a0000) |
Definition at line 1567 of file mep-tdep.c.
#define IS_LW | ( | i | ) | (((i) & 0xf00f0000) == 0xc00e0000) |
Definition at line 1572 of file mep-tdep.c.
#define IS_MOV | ( | i | ) | (((i) & 0xf00f0000) == 0x00000000) |
Definition at line 1578 of file mep-tdep.c.
#define IS_PSEUDO_REGNUM | ( | n | ) | (IN_SET (PSEUDO, (n))) |
Definition at line 635 of file mep-tdep.c.
#define IS_RAW_CCR_REGNUM | ( | n | ) | (IN_SET (RAW_CCR, (n))) |
Definition at line 623 of file mep-tdep.c.
#define IS_RAW_CR_REGNUM | ( | n | ) | (IN_SET (RAW_CR, (n))) |
Definition at line 622 of file mep-tdep.c.
#define IS_RAW_CSR_REGNUM | ( | n | ) | (IN_SET (RAW_CSR, (n))) |
Definition at line 621 of file mep-tdep.c.
#define IS_RAW_REGNUM | ( | n | ) | (IN_SET (RAW, (n))) |
Definition at line 634 of file mep-tdep.c.
#define IS_SB | ( | i | ) | (((i) & 0xf00f0000) == 0xc0080000) |
Definition at line 1527 of file mep-tdep.c.
#define IS_SH | ( | i | ) | (((i) & 0xf00f0000) == 0xc0090000) |
Definition at line 1529 of file mep-tdep.c.
#define IS_SW | ( | i | ) | (((i) & 0xf00f0000) == 0xc00a0000) |
Definition at line 1525 of file mep-tdep.c.
#define IS_SW_IMMD | ( | i | ) | (((i) & 0xf0830000) == 0x40020000) |
Definition at line 1535 of file mep-tdep.c.
#define IS_SW_REG | ( | i | ) | (((i) & 0xf00f0000) == 0x000a0000) |
Definition at line 1540 of file mep-tdep.c.
Definition at line 1568 of file mep-tdep.c.
#define LDC_TARGET | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1569 of file mep-tdep.c.
Definition at line 1574 of file mep-tdep.c.
Definition at line 1575 of file mep-tdep.c.
Definition at line 1573 of file mep-tdep.c.
#define MEP_GPR_SIZE (4) /* Size of a MeP general-purpose register. */ |
Definition at line 640 of file mep-tdep.c.
#define MEP_LP_SIZE (4) /* Size of the LP register. */ |
Definition at line 642 of file mep-tdep.c.
#define MEP_PSW_SIZE (4) /* Size of the PSW register. */ |
Definition at line 641 of file mep-tdep.c.
#define MOV_SOURCE | ( | i | ) | (FIELD (i, 20, 4)) |
Definition at line 1580 of file mep-tdep.c.
#define MOV_TARGET | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1579 of file mep-tdep.c.
#define NUM_REGS_IN_SET | ( | set | ) | (MEP_LAST_ ## set ## _REGNUM - MEP_FIRST_ ## set ## _REGNUM + 1) |
Definition at line 637 of file mep-tdep.c.
Definition at line 1503 of file mep-tdep.c.
Definition at line 1509 of file mep-tdep.c.
#define SW_IMMD_OFFSET | ( | i | ) | (FIELD (i, 18, 5) << 2) |
Definition at line 1537 of file mep-tdep.c.
#define SW_IMMD_SOURCE | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1536 of file mep-tdep.c.
#define SW_REG_BASE | ( | i | ) | (FIELD (i, 20, 4)) |
Definition at line 1542 of file mep-tdep.c.
#define SW_REG_SOURCE | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1541 of file mep-tdep.c.
#define SWBH_32_BASE | ( | i | ) | (FIELD (i, 20, 4)) |
Definition at line 1530 of file mep-tdep.c.
#define SWBH_32_OFFSET | ( | i | ) | (SFIELD (i, 0, 16)) |
Definition at line 1532 of file mep-tdep.c.
#define SWBH_32_SOURCE | ( | i | ) | (FIELD (i, 24, 4)) |
Definition at line 1531 of file mep-tdep.c.
anonymous enum |
MEP_OPT_DIV | |
MEP_OPT_MUL | |
MEP_OPT_BIT | |
MEP_OPT_SAT | |
MEP_OPT_CLP | |
MEP_OPT_MIN | |
MEP_OPT_AVE | |
MEP_OPT_ABS | |
MEP_OPT_LDZ | |
MEP_OPT_VL64 | |
MEP_OPT_VL32 | |
MEP_OPT_COP | |
MEP_OPT_DSP | |
MEP_OPT_UCI | |
MEP_OPT_DBG |
Definition at line 336 of file mep-tdep.c.
anonymous enum |
Definition at line 466 of file mep-tdep.c.
void _initialize_mep_tdep | ( | void | ) |
Definition at line 2516 of file mep-tdep.c.
struct mep_csr_register mep_csr_registers[] |
Definition at line 668 of file mep-tdep.c.