GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
m32c-tdep.c File Reference
#include "defs.h"
#include "sim/sim-m32c.h"
#include "gdbtypes.h"
#include "regcache.h"
#include "arch-utils.h"
#include "frame.h"
#include "frame-unwind.h"
#include "symtab.h"
#include "gdbcore.h"
#include "value.h"
#include "reggroups.h"
#include "prologue-value.h"
#include "objfiles.h"
#include "gdbarch.h"

Go to the source code of this file.

Classes

struct  m32c_reg
 
struct  m32c_gdbarch_tdep
 
struct  m32c_prologue
 
struct  m32c_pv_state
 
struct  srcdest
 

Macros

#define M32C_MAX_NUM_REGS   (75)
 
#define M32C_MAX_DWARF_REGNUM   (40)
 
#define FLAGBIT_B   0x0010
 
#define FLAGBIT_U   0x0080
 
#define R(name, type, sim_num)
 
#define SIM(name)   (m32c_sim_reg_ ## name)
 
#define R16U(name)    (R(#name, tdep->uint16, SIM (name)))
 
#define RA(name)    (R(#name, tdep->data_addr_reg_type, SIM (name)))
 
#define RC(name)    (R(#name, tdep->code_addr_reg_type, SIM (name)))
 
#define RP(name, type)
 
#define RBD(name)
 
#define RBA(name)
 
#define CB(name, raw_pair)
 
#define CHL(name, type)
 
#define CCAT(high, low, type)
 
#define G(reg)   (mark_general (reg))
 
#define S(reg)   (mark_system (reg))
 
#define DMA(reg)   (mark_dma (reg))
 
#define M32C_MAX_INSN_LEN   (9)
 

Enumerations

enum  srcdest_kind { srcdest_reg , srcdest_partial_reg , srcdest_mem }
 

Functions

enum register_status m32c_write_reg_t (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
enum register_status m32c_read_reg_t (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static void make_types (struct gdbarch *arch)
 
static const char * m32c_register_name (struct gdbarch *gdbarch, int num)
 
static struct typem32c_register_type (struct gdbarch *arch, int reg_nr)
 
static int m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
 
static int m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
 
static int m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *group)
 
static enum register_status m32c_raw_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_raw_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static int m32c_read_flg (readable_regcache *cache)
 
static struct m32c_regm32c_banked_register (struct m32c_reg *reg, readable_regcache *cache)
 
static enum register_status m32c_banked_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_banked_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static enum register_status m32c_sb_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_sb_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static void m32c_find_part (struct m32c_reg *reg, int *offset_p, int *len_p)
 
static enum register_status m32c_part_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_part_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static enum register_status m32c_cat_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_cat_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static enum register_status m32c_r3r2r1r0_read (struct m32c_reg *reg, readable_regcache *cache, gdb_byte *buf)
 
static enum register_status m32c_r3r2r1r0_write (struct m32c_reg *reg, struct regcache *cache, const gdb_byte *buf)
 
static enum register_status m32c_pseudo_register_read (struct gdbarch *arch, readable_regcache *cache, int cookednum, gdb_byte *buf)
 
static void m32c_pseudo_register_write (struct gdbarch *arch, struct regcache *cache, int cookednum, const gdb_byte *buf)
 
static struct m32c_regadd_reg (struct gdbarch *arch, const char *name, struct type *type, int sim_num, m32c_read_reg_t *read, m32c_write_reg_t *write, struct m32c_reg *rx, struct m32c_reg *ry, int n)
 
static void set_dwarf_regnum (struct m32c_reg *reg, int num)
 
static struct m32c_regmark_general (struct m32c_reg *reg)
 
static void mark_dma (struct m32c_reg *reg)
 
static struct m32c_regmark_system (struct m32c_reg *reg)
 
static struct m32c_regmark_save_restore (struct m32c_reg *reg)
 
static void make_regs (struct gdbarch *arch)
 
typedef BP_MANIPULATION (m32c_break_insn)
 
static int m32c_pv_push (struct m32c_pv_state *state, pv_t value, int size)
 
static pv_t m32c_srcdest_fetch (struct m32c_pv_state *state, struct srcdest loc, int size)
 
static int m32c_srcdest_store (struct m32c_pv_state *state, struct srcdest loc, pv_t value, int size)
 
static int m32c_sign_ext (int v, int bits)
 
static unsigned int m32c_next_byte (struct m32c_pv_state *st)
 
static int m32c_udisp8 (struct m32c_pv_state *st)
 
static int m32c_sdisp8 (struct m32c_pv_state *st)
 
static int m32c_udisp16 (struct m32c_pv_state *st)
 
static int m32c_sdisp16 (struct m32c_pv_state *st)
 
static int m32c_udisp24 (struct m32c_pv_state *st)
 
static int m32c_get_src23 (unsigned char *i)
 
static int m32c_get_dest23 (unsigned char *i)
 
static struct srcdest m32c_decode_srcdest4 (struct m32c_pv_state *st, int code, int size)
 
static struct srcdest m32c_decode_sd23 (struct m32c_pv_state *st, int code, int size, int ind)
 
static int m32c_pv_enter (struct m32c_pv_state *state, int size)
 
static int m32c_pv_pushm_one (struct m32c_pv_state *state, pv_t reg, int bit, int src, int size)
 
static int m32c_pv_pushm (struct m32c_pv_state *state, int src)
 
static int m32c_is_1st_arg_reg (struct m32c_pv_state *state, pv_t value)
 
static int m32c_is_arg_reg (struct m32c_pv_state *state, pv_t value)
 
static int m32c_is_arg_spill (struct m32c_pv_state *st, struct srcdest loc, pv_t value)
 
static int m32c_is_struct_return (struct m32c_pv_state *st, struct srcdest loc, pv_t value)
 
static int m32c_pushm_is_reg_save (struct m32c_pv_state *st, int src)
 
static void check_for_saved (void *prologue_untyped, pv_t addr, CORE_ADDR size, pv_t value)
 
static void m32c_analyze_prologue (struct gdbarch *arch, CORE_ADDR start, CORE_ADDR limit, struct m32c_prologue *prologue)
 
static CORE_ADDR m32c_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
 
static struct m32c_prologuem32c_analyze_frame_prologue (frame_info_ptr this_frame, void **this_prologue_cache)
 
static CORE_ADDR m32c_frame_base (frame_info_ptr this_frame, void **this_prologue_cache)
 
static void m32c_this_id (frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
 
static struct valuem32c_prev_register (frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
 
static int m32c_reg_arg_type (struct type *type)
 
static CORE_ADDR m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr)
 
static int m32c_return_by_passed_buf (struct type *type)
 
static enum return_value_convention m32c_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static CORE_ADDR m32c_skip_trampoline_code (frame_info_ptr frame, CORE_ADDR stop_pc)
 
static void m32c_m16c_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
 
static CORE_ADDR m32c_m16c_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
 
static void m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
 
static struct gdbarchm32c_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
void _initialize_m32c_tdep ()
 

Variables

static const reggroupm32c_dma_reggroup
 
static m32c_read_reg_t m32c_raw_read
 
static m32c_read_reg_t m32c_banked_read
 
static m32c_read_reg_t m32c_sb_read
 
static m32c_read_reg_t m32c_part_read
 
static m32c_read_reg_t m32c_cat_read
 
static m32c_read_reg_t m32c_r3r2r1r0_read
 
static m32c_write_reg_t m32c_raw_write
 
static m32c_write_reg_t m32c_banked_write
 
static m32c_write_reg_t m32c_sb_write
 
static m32c_write_reg_t m32c_part_write
 
static m32c_write_reg_t m32c_cat_write
 
static m32c_write_reg_t m32c_r3r2r1r0_write
 
constexpr gdb_byte m32c_break_insn [] = { 0x00 }
 
static const struct frame_unwind m32c_unwind
 

Macro Definition Documentation

◆ CB

#define CB ( name,
raw_pair )
Value:
(add_reg (arch, #name, (raw_pair)->type, 0, \
(raw_pair), (raw_pair + 1), FLAGBIT_B))
const char *const name
static struct m32c_reg * add_reg(struct gdbarch *arch, const char *name, struct type *type, int sim_num, m32c_read_reg_t *read, m32c_write_reg_t *write, struct m32c_reg *rx, struct m32c_reg *ry, int n)
Definition m32c-tdep.c:633
#define FLAGBIT_B
Definition m32c-tdep.c:723
static m32c_write_reg_t m32c_banked_write
Definition m32c-tdep.c:305
static m32c_read_reg_t m32c_banked_read
Definition m32c-tdep.c:298

Definition at line 775 of file m32c-tdep.c.

Referenced by make_regs().

◆ CCAT

#define CCAT ( high,
low,
type )
Value:
(add_reg (arch, #high #low, (type), 0, \
m32c_cat_read, m32c_cat_write, (high), (low), 0))
static m32c_read_reg_t m32c_cat_read
Definition m32c-tdep.c:301
static m32c_write_reg_t m32c_cat_write
Definition m32c-tdep.c:308

Definition at line 791 of file m32c-tdep.c.

Referenced by make_regs().

◆ CHL

#define CHL ( name,
type )
Value:
(add_reg (arch, #name "h", (type), 0, \
add_reg (arch, #name "l", (type), 0, \
static m32c_read_reg_t m32c_part_read
Definition m32c-tdep.c:300
static m32c_write_reg_t m32c_part_write
Definition m32c-tdep.c:307

Definition at line 783 of file m32c-tdep.c.

Referenced by make_regs().

◆ DMA

#define DMA ( reg)    (mark_dma (reg))

Definition at line 798 of file m32c-tdep.c.

Referenced by make_regs().

◆ FLAGBIT_B

#define FLAGBIT_B   0x0010

Definition at line 723 of file m32c-tdep.c.

◆ FLAGBIT_U

#define FLAGBIT_U   0x0080

Definition at line 724 of file m32c-tdep.c.

Referenced by make_regs().

◆ G

#define G ( reg)    (mark_general (reg))

Definition at line 796 of file m32c-tdep.c.

Referenced by make_regs().

◆ M32C_MAX_DWARF_REGNUM

#define M32C_MAX_DWARF_REGNUM   (40)

Definition at line 96 of file m32c-tdep.c.

Referenced by m32c_debug_info_reg_to_regnum().

◆ M32C_MAX_INSN_LEN

#define M32C_MAX_INSN_LEN   (9)

Definition at line 1056 of file m32c-tdep.c.

◆ M32C_MAX_NUM_REGS

#define M32C_MAX_NUM_REGS   (75)

Definition at line 93 of file m32c-tdep.c.

Referenced by add_reg(), m32c_analyze_prologue(), and set_dwarf_regnum().

◆ R

#define R ( name,
type,
sim_num )
Value:
(add_reg (arch, (name), (type), (sim_num), \
m32c_raw_read, m32c_raw_write, NULL, NULL, 0))
static m32c_read_reg_t m32c_raw_read
Definition m32c-tdep.c:297
static m32c_write_reg_t m32c_raw_write
Definition m32c-tdep.c:304

Definition at line 731 of file m32c-tdep.c.

Referenced by ada_scan_number(), ppc_process_prefix_instruction(), ppc_process_record_prefix_store(), ppc_process_record_prefix_store_vsx_ds_form(), and ppc_process_record_prefix_vsx_d_form().

◆ R16U

#define R16U ( name)     (R(#name, tdep->uint16, SIM (name)))

Definition at line 740 of file m32c-tdep.c.

Referenced by make_regs().

◆ RA

#define RA ( name)     (R(#name, tdep->data_addr_reg_type, SIM (name)))

Definition at line 745 of file m32c-tdep.c.

Referenced by make_regs().

◆ RBA

#define RBA ( name)
Value:
(R("", tdep->data_addr_reg_type, SIM (name ## _bank0)), \
R("", tdep->data_addr_reg_type, SIM (name ## _bank1)) - 1)
#define SIM(name)
Definition m32c-tdep.c:736
#define R(name, type, sim_num)
Definition m32c-tdep.c:731

Definition at line 767 of file m32c-tdep.c.

Referenced by make_regs().

◆ RBD

#define RBD ( name)
Value:
(R("", tdep->int16, SIM (name ## _bank0)), \
R("", tdep->int16, SIM (name ## _bank1)) - 1)

Definition at line 761 of file m32c-tdep.c.

Referenced by make_regs().

◆ RC

#define RC ( name)     (R(#name, tdep->code_addr_reg_type, SIM (name)))

Definition at line 750 of file m32c-tdep.c.

Referenced by make_regs().

◆ RP

#define RP ( name,
type )
Value:
(R(#name "0", (type), SIM (name ## 0)), \
R(#name "1", (type), SIM (name ## 1)) - 1)

Definition at line 755 of file m32c-tdep.c.

Referenced by make_regs().

◆ S

#define S ( reg)    (mark_system (reg))

◆ SIM

#define SIM ( name)    (m32c_sim_reg_ ## name)

Definition at line 736 of file m32c-tdep.c.

Enumeration Type Documentation

◆ srcdest_kind

Enumerator
srcdest_reg 
srcdest_partial_reg 
srcdest_mem 

Definition at line 1091 of file m32c-tdep.c.

Function Documentation

◆ _initialize_m32c_tdep()

void _initialize_m32c_tdep ( )

◆ add_reg()

static struct m32c_reg * add_reg ( struct gdbarch * arch,
const char * name,
struct type * type,
int sim_num,
m32c_read_reg_t * read,
m32c_write_reg_t * write,
struct m32c_reg * rx,
struct m32c_reg * ry,
int n )
static

◆ BP_MANIPULATION()

typedef BP_MANIPULATION ( m32c_break_insn )

Definition at line 994 of file m32c-tdep.c.

◆ check_for_saved()

static void check_for_saved ( void * prologue_untyped,
pv_t addr,
CORE_ADDR size,
pv_t value )
static

◆ m32c_analyze_frame_prologue()

static struct m32c_prologue * m32c_analyze_frame_prologue ( frame_info_ptr this_frame,
void ** this_prologue_cache )
static

◆ m32c_analyze_prologue()

static void m32c_analyze_prologue ( struct gdbarch * arch,
CORE_ADDR start,
CORE_ADDR limit,
struct m32c_prologue * prologue )
static

◆ m32c_banked_read()

static enum register_status m32c_banked_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

Definition at line 356 of file m32c-tdep.c.

References m32c_banked_register(), m32c_reg::num, and readable_regcache::raw_read().

◆ m32c_banked_register()

static struct m32c_reg * m32c_banked_register ( struct m32c_reg * reg,
readable_regcache * cache )
static

◆ m32c_banked_write()

static enum register_status m32c_banked_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

Definition at line 368 of file m32c-tdep.c.

References m32c_banked_register(), m32c_reg::num, and regcache::raw_write().

◆ m32c_cat_read()

static enum register_status m32c_cat_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

◆ m32c_cat_write()

static enum register_status m32c_cat_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

◆ m32c_debug_info_reg_to_regnum()

static int m32c_debug_info_reg_to_regnum ( struct gdbarch * gdbarch,
int reg_nr )
static

Definition at line 242 of file m32c-tdep.c.

References m32c_gdbarch_tdep::dwarf_regs, M32C_MAX_DWARF_REGNUM, and m32c_reg::num.

Referenced by make_regs().

◆ m32c_decode_sd23()

static struct srcdest m32c_decode_sd23 ( struct m32c_pv_state * st,
int code,
int size,
int ind )
static

◆ m32c_decode_srcdest4()

static struct srcdest m32c_decode_srcdest4 ( struct m32c_pv_state * st,
int code,
int size )
static

◆ m32c_find_part()

static void m32c_find_part ( struct m32c_reg * reg,
int * offset_p,
int * len_p )
static

◆ m32c_frame_base()

static CORE_ADDR m32c_frame_base ( frame_info_ptr this_frame,
void ** this_prologue_cache )
static

◆ m32c_gdbarch_init()

static struct gdbarch * m32c_gdbarch_init ( struct gdbarch_info info,
struct gdbarch_list * arches )
static

◆ m32c_get_dest23()

static int m32c_get_dest23 ( unsigned char * i)
static

Definition at line 1216 of file m32c-tdep.c.

Referenced by m32c_analyze_prologue().

◆ m32c_get_src23()

static int m32c_get_src23 ( unsigned char * i)
static

Definition at line 1207 of file m32c-tdep.c.

Referenced by m32c_analyze_prologue().

◆ m32c_is_1st_arg_reg()

static int m32c_is_1st_arg_reg ( struct m32c_pv_state * state,
pv_t value )
static

◆ m32c_is_arg_reg()

static int m32c_is_arg_reg ( struct m32c_pv_state * state,
pv_t value )
static

◆ m32c_is_arg_spill()

static int m32c_is_arg_spill ( struct m32c_pv_state * st,
struct srcdest loc,
pv_t value )
static

◆ m32c_is_struct_return()

static int m32c_is_struct_return ( struct m32c_pv_state * st,
struct srcdest loc,
pv_t value )
static

◆ m32c_m16c_address_to_pointer()

static void m32c_m16c_address_to_pointer ( struct gdbarch * gdbarch,
struct type * type,
gdb_byte * buf,
CORE_ADDR addr )
static

◆ m32c_m16c_pointer_to_address()

static CORE_ADDR m32c_m16c_pointer_to_address ( struct gdbarch * gdbarch,
struct type * type,
const gdb_byte * buf )
static

◆ m32c_next_byte()

static unsigned int m32c_next_byte ( struct m32c_pv_state * st)
static

◆ m32c_part_read()

static enum register_status m32c_part_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

◆ m32c_part_write()

static enum register_status m32c_part_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

◆ m32c_prev_register()

static struct value * m32c_prev_register ( frame_info_ptr this_frame,
void ** this_prologue_cache,
int regnum )
static

◆ m32c_pseudo_register_read()

static enum register_status m32c_pseudo_register_read ( struct gdbarch * arch,
readable_regcache * cache,
int cookednum,
gdb_byte * buf )
static

Definition at line 595 of file m32c-tdep.c.

References m32c_reg::arch, reg_buffer::arch(), m32c_reg::read, and m32c_gdbarch_tdep::regs.

Referenced by make_regs().

◆ m32c_pseudo_register_write()

static void m32c_pseudo_register_write ( struct gdbarch * arch,
struct regcache * cache,
int cookednum,
const gdb_byte * buf )
static

Definition at line 613 of file m32c-tdep.c.

References m32c_reg::arch, reg_buffer::arch(), m32c_gdbarch_tdep::regs, and m32c_reg::write.

Referenced by make_regs().

◆ m32c_push_dummy_call()

static CORE_ADDR m32c_push_dummy_call ( struct gdbarch * gdbarch,
struct value * function,
struct regcache * regcache,
CORE_ADDR bp_addr,
int nargs,
struct value ** args,
CORE_ADDR sp,
function_call_return_method return_method,
CORE_ADDR struct_addr )
static

◆ m32c_pushm_is_reg_save()

static int m32c_pushm_is_reg_save ( struct m32c_pv_state * st,
int src )
static

◆ m32c_pv_enter()

static int m32c_pv_enter ( struct m32c_pv_state * state,
int size )
static

◆ m32c_pv_push()

static int m32c_pv_push ( struct m32c_pv_state * state,
pv_t value,
int size )
static

◆ m32c_pv_pushm()

static int m32c_pv_pushm ( struct m32c_pv_state * state,
int src )
static

◆ m32c_pv_pushm_one()

static int m32c_pv_pushm_one ( struct m32c_pv_state * state,
pv_t reg,
int bit,
int src,
int size )
static

Definition at line 1366 of file m32c-tdep.c.

References bit, m32c_pv_push(), srcdest::reg, and size.

Referenced by m32c_pv_pushm().

◆ m32c_r3r2r1r0_read()

static enum register_status m32c_r3r2r1r0_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

◆ m32c_r3r2r1r0_write()

static enum register_status m32c_r3r2r1r0_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

◆ m32c_raw_read()

static enum register_status m32c_raw_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

Definition at line 313 of file m32c-tdep.c.

References m32c_reg::num, and readable_regcache::raw_read().

◆ m32c_raw_write()

static enum register_status m32c_raw_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

Definition at line 321 of file m32c-tdep.c.

References m32c_reg::num, and regcache::raw_write().

◆ m32c_read_flg()

static int m32c_read_flg ( readable_regcache * cache)
static

◆ m32c_read_reg_t()

enum register_status m32c_read_reg_t ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )

◆ m32c_reg_arg_type()

static int m32c_reg_arg_type ( struct type * type)
static

Definition at line 2000 of file m32c-tdep.c.

References code, type::code(), and TYPE_IS_REFERENCE.

Referenced by m32c_push_dummy_call().

◆ m32c_register_name()

static const char * m32c_register_name ( struct gdbarch * gdbarch,
int num )
static

Definition at line 218 of file m32c-tdep.c.

References m32c_reg::name, and m32c_gdbarch_tdep::regs.

Referenced by make_regs().

◆ m32c_register_reggroup_p()

static int m32c_register_reggroup_p ( struct gdbarch * gdbarch,
int regnum,
const struct reggroup * group )
static

◆ m32c_register_sim_regno()

static int m32c_register_sim_regno ( struct gdbarch * gdbarch,
int reg_nr )
static

Definition at line 234 of file m32c-tdep.c.

References m32c_gdbarch_tdep::regs, and m32c_reg::sim_num.

Referenced by make_regs().

◆ m32c_register_type()

static struct type * m32c_register_type ( struct gdbarch * arch,
int reg_nr )
static

Definition at line 226 of file m32c-tdep.c.

References type::arch(), m32c_gdbarch_tdep::regs, and m32c_reg::type.

Referenced by make_regs().

◆ m32c_return_by_passed_buf()

static int m32c_return_by_passed_buf ( struct type * type)
static

Definition at line 2167 of file m32c-tdep.c.

References code, and type::code().

Referenced by m32c_return_value().

◆ m32c_return_value()

static enum return_value_convention m32c_return_value ( struct gdbarch * gdbarch,
struct value * function,
struct type * valtype,
struct regcache * regcache,
gdb_byte * readbuf,
const gdb_byte * writebuf )
static

◆ m32c_sb_read()

static enum register_status m32c_sb_read ( struct m32c_reg * reg,
readable_regcache * cache,
gdb_byte * buf )
static

◆ m32c_sb_write()

static enum register_status m32c_sb_write ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )
static

◆ m32c_sdisp16()

static int m32c_sdisp16 ( struct m32c_pv_state * st)
static

Definition at line 1185 of file m32c-tdep.c.

References m32c_next_byte(), and m32c_sign_ext().

Referenced by m32c_decode_sd23().

◆ m32c_sdisp8()

static int m32c_sdisp8 ( struct m32c_pv_state * st)
static

Definition at line 1168 of file m32c-tdep.c.

References m32c_next_byte(), and m32c_sign_ext().

Referenced by m32c_decode_sd23(), and m32c_decode_srcdest4().

◆ m32c_sign_ext()

static int m32c_sign_ext ( int v,
int bits )
static

Definition at line 1147 of file m32c-tdep.c.

References bits.

Referenced by m32c_sdisp16(), and m32c_sdisp8().

◆ m32c_skip_prologue()

static CORE_ADDR m32c_skip_prologue ( struct gdbarch * gdbarch,
CORE_ADDR ip )
static

◆ m32c_skip_trampoline_code()

static CORE_ADDR m32c_skip_trampoline_code ( frame_info_ptr frame,
CORE_ADDR stop_pc )
static

◆ m32c_srcdest_fetch()

static pv_t m32c_srcdest_fetch ( struct m32c_pv_state * state,
struct srcdest loc,
int size )
static

◆ m32c_srcdest_store()

static int m32c_srcdest_store ( struct m32c_pv_state * state,
struct srcdest loc,
pv_t value,
int size )
static

◆ m32c_this_id()

static void m32c_this_id ( frame_info_ptr this_frame,
void ** this_prologue_cache,
struct frame_id * this_id )
static

Definition at line 1920 of file m32c-tdep.c.

References frame_id_build(), get_frame_func(), and m32c_frame_base().

◆ m32c_udisp16()

static int m32c_udisp16 ( struct m32c_pv_state * st)
static

Definition at line 1175 of file m32c-tdep.c.

References m32c_next_byte().

Referenced by m32c_analyze_prologue(), m32c_decode_sd23(), and m32c_decode_srcdest4().

◆ m32c_udisp24()

static int m32c_udisp24 ( struct m32c_pv_state * st)
static

Definition at line 1195 of file m32c-tdep.c.

References m32c_next_byte().

Referenced by m32c_analyze_prologue(), and m32c_decode_sd23().

◆ m32c_udisp8()

static int m32c_udisp8 ( struct m32c_pv_state * st)
static

Definition at line 1161 of file m32c-tdep.c.

References m32c_next_byte().

Referenced by m32c_decode_sd23(), and m32c_decode_srcdest4().

◆ m32c_virtual_frame_pointer()

static void m32c_virtual_frame_pointer ( struct gdbarch * gdbarch,
CORE_ADDR pc,
int * frame_regnum,
LONGEST * frame_offset )
static

◆ m32c_write_reg_t()

enum register_status m32c_write_reg_t ( struct m32c_reg * reg,
struct regcache * cache,
const gdb_byte * buf )

◆ make_regs()

static void make_regs ( struct gdbarch * arch)
static

Definition at line 803 of file m32c-tdep.c.

References m32c_gdbarch_tdep::a0, m32c_gdbarch_tdep::a1, add_reg(), m32c_reg::arch, CB, CCAT, CHL, m32c_gdbarch_tdep::data_addr_reg_type, DMA, m32c_gdbarch_tdep::dwarf_regs, m32c_gdbarch_tdep::fb, FLAGBIT_U, m32c_gdbarch_tdep::flg, G, gdbarch_bfd_arch_info(), m32c_gdbarch_tdep::int16, m32c_gdbarch_tdep::int32, m32c_gdbarch_tdep::int64, m32c_gdbarch_tdep::int8, m32c_banked_read, m32c_banked_write, m32c_debug_info_reg_to_regnum(), m32c_dma_reggroup, m32c_pseudo_register_read(), m32c_pseudo_register_write(), m32c_r3r2r1r0_read, m32c_r3r2r1r0_write, m32c_register_name(), m32c_register_reggroup_p(), m32c_register_sim_regno(), m32c_register_type(), m32c_sb_read, m32c_sb_write, mark_save_restore(), m32c_reg::num, m32c_gdbarch_tdep::num_regs, m32c_gdbarch_tdep::pc, m32c_gdbarch_tdep::r0, m32c_gdbarch_tdep::r1, R16U, m32c_gdbarch_tdep::r2, m32c_gdbarch_tdep::r2r0, m32c_gdbarch_tdep::r3, m32c_gdbarch_tdep::r3r1r2r0, m32c_gdbarch_tdep::r3r2r1r0, RA, RBA, RBD, RC, reggroup_add(), RP, S, m32c_gdbarch_tdep::sb, set_dwarf_regnum(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_register_name(), set_gdbarch_register_reggroup_p(), set_gdbarch_register_sim_regno(), set_gdbarch_register_type(), set_gdbarch_sp_regnum(), set_gdbarch_stab_reg_to_regnum(), m32c_gdbarch_tdep::sp, m32c_reg::type, m32c_gdbarch_tdep::uint16, and m32c_gdbarch_tdep::uint8.

Referenced by m32c_gdbarch_init().

◆ make_types()

static void make_types ( struct gdbarch * arch)
static

◆ mark_dma()

static void mark_dma ( struct m32c_reg * reg)
static

Definition at line 699 of file m32c-tdep.c.

References m32c_reg::dma_p.

◆ mark_general()

static struct m32c_reg * mark_general ( struct m32c_reg * reg)
static

Definition at line 690 of file m32c-tdep.c.

References m32c_reg::general_p.

◆ mark_save_restore()

static struct m32c_reg * mark_save_restore ( struct m32c_reg * reg)
static

Definition at line 716 of file m32c-tdep.c.

References m32c_reg::save_restore_p.

Referenced by make_regs().

◆ mark_system()

static struct m32c_reg * mark_system ( struct m32c_reg * reg)
static

Definition at line 707 of file m32c-tdep.c.

References m32c_reg::system_p.

◆ set_dwarf_regnum()

static void set_dwarf_regnum ( struct m32c_reg * reg,
int num )
static

Variable Documentation

◆ m32c_banked_read

m32c_read_reg_t m32c_banked_read
static

Definition at line 298 of file m32c-tdep.c.

Referenced by m32c_sb_read(), and make_regs().

◆ m32c_banked_write

m32c_write_reg_t m32c_banked_write
static

Definition at line 305 of file m32c-tdep.c.

Referenced by m32c_sb_write(), and make_regs().

◆ m32c_break_insn

constexpr gdb_byte m32c_break_insn[] = { 0x00 }
constexpr

Definition at line 992 of file m32c-tdep.c.

◆ m32c_cat_read

m32c_read_reg_t m32c_cat_read
static

Definition at line 301 of file m32c-tdep.c.

◆ m32c_cat_write

m32c_write_reg_t m32c_cat_write
static

Definition at line 308 of file m32c-tdep.c.

◆ m32c_dma_reggroup

const reggroup* m32c_dma_reggroup
static

Definition at line 38 of file m32c-tdep.c.

Referenced by _initialize_m32c_tdep(), m32c_register_reggroup_p(), and make_regs().

◆ m32c_part_read

m32c_read_reg_t m32c_part_read
static

Definition at line 300 of file m32c-tdep.c.

◆ m32c_part_write

m32c_write_reg_t m32c_part_write
static

Definition at line 307 of file m32c-tdep.c.

◆ m32c_r3r2r1r0_read

m32c_read_reg_t m32c_r3r2r1r0_read
static

Definition at line 302 of file m32c-tdep.c.

Referenced by make_regs().

◆ m32c_r3r2r1r0_write

m32c_write_reg_t m32c_r3r2r1r0_write
static

Definition at line 309 of file m32c-tdep.c.

Referenced by make_regs().

◆ m32c_raw_read

m32c_read_reg_t m32c_raw_read
static

Definition at line 297 of file m32c-tdep.c.

Referenced by m32c_sb_read().

◆ m32c_raw_write

m32c_write_reg_t m32c_raw_write
static

Definition at line 304 of file m32c-tdep.c.

Referenced by m32c_sb_write().

◆ m32c_sb_read

m32c_read_reg_t m32c_sb_read
static

Definition at line 299 of file m32c-tdep.c.

Referenced by make_regs().

◆ m32c_sb_write

m32c_write_reg_t m32c_sb_write
static

Definition at line 306 of file m32c-tdep.c.

Referenced by make_regs().

◆ m32c_unwind

const struct frame_unwind m32c_unwind
static
Initial value:
= {
"m32c prologue",
NULL,
}
int default_frame_sniffer(const struct frame_unwind *self, frame_info_ptr this_frame, void **this_prologue_cache)
enum unwind_stop_reason default_frame_unwind_stop_reason(frame_info_ptr this_frame, void **this_cache)
@ NORMAL_FRAME
Definition frame.h:187
static void m32c_this_id(frame_info_ptr this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition m32c-tdep.c:1920
static struct value * m32c_prev_register(frame_info_ptr this_frame, void **this_prologue_cache, int regnum)
Definition m32c-tdep.c:1933

Definition at line 1957 of file m32c-tdep.c.

Referenced by m32c_gdbarch_init().