GDB (API)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/sh-tdep.c File Reference
#include "defs.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "dwarf2-frame.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "value.h"
#include "dis-asm.h"
#include "inferior.h"
#include "gdb_string.h"
#include "gdb_assert.h"
#include "arch-utils.h"
#include "floatformat.h"
#include "regcache.h"
#include "doublest.h"
#include "osabi.h"
#include "reggroups.h"
#include "regset.h"
#include "objfiles.h"
#include "sh-tdep.h"
#include "sh64-tdep.h"
#include "elf-bfd.h"
#include "solib-svr4.h"
#include "elf/sh.h"
#include "dwarf2.h"
#include "gdb/sim-sh.h"

Go to the source code of this file.

Defines

#define SH_NUM_REGS   67
#define GET_SOURCE_REG(x)   (((x) >> 4) & 0xf)
#define GET_TARGET_REG(x)   (((x) >> 8) & 0xf)
#define IS_JSR(x)   (((x) & 0xf0ff) == 0x400b)
#define IS_STS(x)   ((x) == 0x4f22)
#define IS_MACL_STS(x)   ((x) == 0x4f12)
#define IS_PUSH(x)   (((x) & 0xff0f) == 0x2f06)
#define IS_MOV_SP_FP(x)   ((x) == 0x6ef3)
#define IS_ADD_IMM_SP(x)   (((x) & 0xff00) == 0x7f00)
#define IS_MOV_R3(x)   (((x) & 0xff00) == 0x1a00)
#define IS_SHLL_R3(x)   ((x) == 0x4300)
#define IS_ADD_R3SP(x)   ((x) == 0x3f3c)
#define IS_FPUSH(x)   (((x) & 0xff0f) == 0xff0b)
#define IS_MOV_ARG_TO_REG(x)
#define IS_MOV_ARG_TO_IND_R14(x)
#define IS_MOV_ARG_TO_IND_R14_WITH_DISP(x)
#define IS_MOVW_PCREL_TO_REG(x)   (((x) & 0xf000) == 0x9000)
#define IS_MOVL_PCREL_TO_REG(x)   (((x) & 0xf000) == 0xd000)
#define IS_MOVI20(x)   (((x) & 0xf00f) == 0x0000)
#define IS_SUB_REG_FROM_SP(x)   (((x) & 0xff0f) == 0x3f08)
#define FPSCR_SZ   (1 << 20)
#define IS_RESTORE_FP(x)   ((x) == 0x6ef6)
#define IS_RTS(x)   ((x) == 0x000b)
#define IS_LDS(x)   ((x) == 0x4f26)
#define IS_MACL_LDS(x)   ((x) == 0x4f16)
#define IS_MOV_FP_SP(x)   ((x) == 0x6fe3)
#define IS_ADD_REG_TO_FP(x)   (((x) & 0xff0f) == 0x3e0c)
#define IS_ADD_IMM_FP(x)   (((x) & 0xff00) == 0x7e00)

Functions

void sh_corefile_supply_regset (const struct regset *regset, struct regcache *regcache, int regnum, const void *regs, size_t len)
void sh_corefile_collect_regset (const struct regset *regset, const struct regcache *regcache, int regnum, void *regs, size_t len)
void _initialize_sh_tdep (void)

Variables

struct regset sh_corefile_gregset
initialize_file_ftype _initialize_sh_tdep

Define Documentation

#define FPSCR_SZ   (1 << 20)

Definition at line 525 of file sh-tdep.c.

#define GET_SOURCE_REG (   x)    (((x) >> 4) & 0xf)

Definition at line 459 of file sh-tdep.c.

#define GET_TARGET_REG (   x)    (((x) >> 8) & 0xf)

Definition at line 460 of file sh-tdep.c.

#define IS_ADD_IMM_FP (   x)    (((x) & 0xff00) == 0x7e00)

Definition at line 534 of file sh-tdep.c.

#define IS_ADD_IMM_SP (   x)    (((x) & 0xff00) == 0x7f00)

Definition at line 483 of file sh-tdep.c.

#define IS_ADD_R3SP (   x)    ((x) == 0x3f3c)

Definition at line 490 of file sh-tdep.c.

#define IS_ADD_REG_TO_FP (   x)    (((x) & 0xff0f) == 0x3e0c)

Definition at line 533 of file sh-tdep.c.

#define IS_FPUSH (   x)    (((x) & 0xff0f) == 0xff0b)

Definition at line 498 of file sh-tdep.c.

#define IS_JSR (   x)    (((x) & 0xf0ff) == 0x400b)

Definition at line 463 of file sh-tdep.c.

#define IS_LDS (   x)    ((x) == 0x4f26)

Definition at line 530 of file sh-tdep.c.

#define IS_MACL_LDS (   x)    ((x) == 0x4f16)

Definition at line 531 of file sh-tdep.c.

#define IS_MACL_STS (   x)    ((x) == 0x4f12)

Definition at line 471 of file sh-tdep.c.

#define IS_MOV_ARG_TO_IND_R14 (   x)
Value:
(((x) & 0xff0f) == 0x2e02 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 506 of file sh-tdep.c.

Value:
(((x) & 0xff00) == 0x1e00 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 511 of file sh-tdep.c.

#define IS_MOV_ARG_TO_REG (   x)
Value:
(((x) & 0xf00f) == 0x6003 && \
         ((x) & 0x00f0) >= 0x0040 && \
         ((x) & 0x00f0) <= 0x0070)

Definition at line 501 of file sh-tdep.c.

#define IS_MOV_FP_SP (   x)    ((x) == 0x6fe3)

Definition at line 532 of file sh-tdep.c.

#define IS_MOV_R3 (   x)    (((x) & 0xff00) == 0x1a00)

Definition at line 485 of file sh-tdep.c.

#define IS_MOV_SP_FP (   x)    ((x) == 0x6ef3)

Definition at line 479 of file sh-tdep.c.

#define IS_MOVI20 (   x)    (((x) & 0xf00f) == 0x0000)

Definition at line 521 of file sh-tdep.c.

#define IS_MOVL_PCREL_TO_REG (   x)    (((x) & 0xf000) == 0xd000)

Definition at line 519 of file sh-tdep.c.

#define IS_MOVW_PCREL_TO_REG (   x)    (((x) & 0xf000) == 0x9000)

Definition at line 517 of file sh-tdep.c.

#define IS_PUSH (   x)    (((x) & 0xff0f) == 0x2f06)

Definition at line 475 of file sh-tdep.c.

#define IS_RESTORE_FP (   x)    ((x) == 0x6ef6)

Definition at line 528 of file sh-tdep.c.

#define IS_RTS (   x)    ((x) == 0x000b)

Definition at line 529 of file sh-tdep.c.

#define IS_SHLL_R3 (   x)    ((x) == 0x4300)

Definition at line 486 of file sh-tdep.c.

#define IS_STS (   x)    ((x) == 0x4f22)

Definition at line 467 of file sh-tdep.c.

#define IS_SUB_REG_FROM_SP (   x)    (((x) & 0xff0f) == 0x3f08)

Definition at line 523 of file sh-tdep.c.

#define SH_NUM_REGS   67

Definition at line 72 of file sh-tdep.c.


Function Documentation

void _initialize_sh_tdep ( void  )

Definition at line 2435 of file sh-tdep.c.

void sh_corefile_collect_regset ( const struct regset regset,
const struct regcache *  regcache,
int  regnum,
void *  regs,
size_t  len 
)

Definition at line 2175 of file sh-tdep.c.

void sh_corefile_supply_regset ( const struct regset regset,
struct regcache *  regcache,
int  regnum,
const void *  regs,
size_t  len 
)

Definition at line 2149 of file sh-tdep.c.


Variable Documentation

Initial value:

Definition at line 2198 of file sh-tdep.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines