GDB (API)
Classes | Defines | Enumerations | Functions
/home/stan/gdb/src/gdb/sh64-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 "regcache.h"
#include "osabi.h"
#include "valprint.h"
#include "elf-bfd.h"
#include "elf/sh.h"
#include "gdb/sim-sh.h"
#include "language.h"
#include "sh64-tdep.h"

Go to the source code of this file.

Classes

struct  gdbarch_tdep

Defines

#define NUM_PSEUDO_REGS_SH_MEDIA   80
#define NUM_PSEUDO_REGS_SH_COMPACT   51
#define MSYMBOL_IS_SPECIAL(msym)   MSYMBOL_TARGET_FLAG_1 (msym)
#define IS_ISA32_ADDR(addr)   ((addr) & 1)
#define MAKE_ISA32_ADDR(addr)   ((addr) | 1)
#define UNMAKE_ISA32_ADDR(addr)   ((addr) & ~1)
#define IS_PTABSL_R18(x)   (((x) & 0xffffff8f) == 0x6bf14a00)
#define IS_STS_R0(x)   ((x) == 0x4022)
#define IS_STS_PR(x)   (((x) & 0xf0ff) == 0x2a)
#define IS_MOV_TO_R15(x)   (((x) & 0xff00) == 0x1f00)
#define IS_MOV_R14(x)   (((x) & 0xfff0) == 0x1fe0)
#define IS_STQ_R18_R14(x)   (((x) & 0xfff003ff) == 0xace00120)
#define IS_STQ_R18_R15(x)   (((x) & 0xfff003ff) == 0xacf00120)
#define IS_STL_R18_R15(x)   (((x) & 0xfff003ff) == 0xa8f00120)
#define IS_STQ_R14_R15(x)   (((x) & 0xfff003ff) == 0xacf000e0)
#define IS_STL_R14_R15(x)   (((x) & 0xfff003ff) == 0xa8f000e0)
#define IS_ADDIL_SP_MEDIA(x)   (((x) & 0xfff003ff) == 0xd4f000f0)
#define IS_ADDI_SP_MEDIA(x)   (((x) & 0xfff003ff) == 0xd0f000f0)
#define IS_ADDL_SP_FP_MEDIA(x)   ((x) == 0x00f8fce0)
#define IS_ADD_SP_FP_MEDIA(x)   ((x) == 0x00f9fce0)
#define IS_MOV_SP_FP_MEDIA(x)   (IS_ADDL_SP_FP_MEDIA(x) || IS_ADD_SP_FP_MEDIA(x))
#define IS_MOV_R0(x)   (((x) & 0xff00) == 0xe000)
#define IS_MOVL_R0(x)   (((x) & 0xff00) == 0xd000)
#define IS_ADD_SP_R0(x)   ((x) == 0x30fc)
#define IS_MOV_R14_R0(x)   ((x) == 0x20e6)
#define IS_MEDIA_IND_ARG_MOV(x)
#define IS_MEDIA_ARG_MOV(x)
#define IS_MEDIA_MOV_TO_R14(x)
#define IS_COMPACT_IND_ARG_MOV(x)
#define IS_COMPACT_ARG_MOV(x)
#define IS_COMPACT_MOV_TO_R14(x)   ((((x) & 0xff0f) == 0x2e00) || (((x) & 0xff0f) == 0x2e01))
#define IS_JSR_R0(x)   ((x) == 0x400b)
#define IS_NOP(x)   ((x) == 0x0009)
#define IS_MOV_SP_FP(x)   ((x) == 0x6ef3)
#define IS_ADD_SP(x)   (((x) & 0xff00) == 0x7f00)

Enumerations

enum  sh_abi { SH_ABI_UNKNOWN, SH_ABI_32, SH_ABI_64 }
enum  {
  R0_REGNUM = 0, DEFAULT_RETURN_REGNUM = 2, STRUCT_RETURN_REGNUM = 2, ARG0_REGNUM = 2,
  ARGLAST_REGNUM = 9, FLOAT_ARGLAST_REGNUM = 11, MEDIA_FP_REGNUM = 14, PR_REGNUM = 18,
  SR_REGNUM = 65, DR0_REGNUM = 141, DR_LAST_REGNUM = 172, FPP0_REGNUM = 173,
  FPP_LAST_REGNUM = 204, FV0_REGNUM = 205, FV_LAST_REGNUM = 220, R0_C_REGNUM = 221,
  R_LAST_C_REGNUM = 236, PC_C_REGNUM = 237, GBR_C_REGNUM = 238, MACH_C_REGNUM = 239,
  MACL_C_REGNUM = 240, PR_C_REGNUM = 241, T_C_REGNUM = 242, FPSCR_C_REGNUM = 243,
  FPUL_C_REGNUM = 244, FP0_C_REGNUM = 245, FP_LAST_C_REGNUM = 260, DR0_C_REGNUM = 261,
  DR_LAST_C_REGNUM = 268, FV0_C_REGNUM = 269, FV_LAST_C_REGNUM = 272, FPSCR_REGNUM = SIM_SH64_FPCSR_REGNUM,
  SSR_REGNUM = SIM_SH64_SSR_REGNUM, SPC_REGNUM = SIM_SH64_SPC_REGNUM, TR7_REGNUM = SIM_SH64_TR0_REGNUM + 7, FP_LAST_REGNUM = SIM_SH64_FR0_REGNUM + SIM_SH64_NR_FP_REGS - 1
}

Functions

struct gdbarch * sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)

Define Documentation

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

Definition at line 461 of file sh64-tdep.c.

#define IS_ADD_SP_FP_MEDIA (   x)    ((x) == 0x00f9fce0)

Definition at line 387 of file sh64-tdep.c.

#define IS_ADD_SP_R0 (   x)    ((x) == 0x30fc)

Definition at line 401 of file sh64-tdep.c.

#define IS_ADDI_SP_MEDIA (   x)    (((x) & 0xfff003ff) == 0xd0f000f0)

Definition at line 379 of file sh64-tdep.c.

#define IS_ADDIL_SP_MEDIA (   x)    (((x) & 0xfff003ff) == 0xd4f000f0)

Definition at line 375 of file sh64-tdep.c.

#define IS_ADDL_SP_FP_MEDIA (   x)    ((x) == 0x00f8fce0)

Definition at line 383 of file sh64-tdep.c.

#define IS_COMPACT_ARG_MOV (   x)
Value:
(((((x) & 0xff0f) == 0x2e02) && (((x) & 0x00f0) >= 0x0020) \
    && ((x) & 0x00f0) <= 0x0090))

Definition at line 442 of file sh64-tdep.c.

#define IS_COMPACT_IND_ARG_MOV (   x)
Value:
((((x) & 0xf00f) == 0x6003) && (((x) & 0x00f0) >= 0x0020) \
   && (((x) & 0x00f0) <= 0x0090))

Definition at line 436 of file sh64-tdep.c.

#define IS_COMPACT_MOV_TO_R14 (   x)    ((((x) & 0xff0f) == 0x2e00) || (((x) & 0xff0f) == 0x2e01))

Definition at line 448 of file sh64-tdep.c.

#define IS_ISA32_ADDR (   addr)    ((addr) & 1)

Definition at line 233 of file sh64-tdep.c.

#define IS_JSR_R0 (   x)    ((x) == 0x400b)

Definition at line 451 of file sh64-tdep.c.

#define IS_MEDIA_ARG_MOV (   x)
Value:
(((((x) & 0xfc0ffc0f) == 0xac000000) || (((x) & 0xfc0ffc0f) == 0xa8000000)) \
   && (((x) & 0x000003f0) >= 0x00000020 && ((x) & 0x000003f0) <= 0x00000090))

Definition at line 418 of file sh64-tdep.c.

#define IS_MEDIA_IND_ARG_MOV (   x)
Value:
((((x) & 0xfc0ffc0f) == 0x0009fc00) \
   && (((x) & 0x03f00000) >= 0x00200000 \
       && ((x) & 0x03f00000) <= 0x00900000))

Definition at line 410 of file sh64-tdep.c.

#define IS_MEDIA_MOV_TO_R14 (   x)
Value:
((((x) & 0xfffffc0f) == 0xa0e00000) \
|| (((x) & 0xfffffc0f) == 0xa4e00000) \
|| (((x) & 0xfffffc0f) == 0xa8e00000) \
|| (((x) & 0xfffffc0f) == 0xb4e00000) \
|| (((x) & 0xfffffc0f) == 0xbce00000))

Definition at line 427 of file sh64-tdep.c.

#define IS_MOV_R0 (   x)    (((x) & 0xff00) == 0xe000)

Definition at line 394 of file sh64-tdep.c.

#define IS_MOV_R14 (   x)    (((x) & 0xfff0) == 0x1fe0)

Definition at line 351 of file sh64-tdep.c.

#define IS_MOV_R14_R0 (   x)    ((x) == 0x20e6)

Definition at line 405 of file sh64-tdep.c.

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

Definition at line 457 of file sh64-tdep.c.

#define IS_MOV_SP_FP_MEDIA (   x)    (IS_ADDL_SP_FP_MEDIA(x) || IS_ADD_SP_FP_MEDIA(x))

Definition at line 389 of file sh64-tdep.c.

#define IS_MOV_TO_R15 (   x)    (((x) & 0xff00) == 0x1f00)

Definition at line 347 of file sh64-tdep.c.

#define IS_MOVL_R0 (   x)    (((x) & 0xff00) == 0xd000)

Definition at line 397 of file sh64-tdep.c.

#define IS_NOP (   x)    ((x) == 0x0009)

Definition at line 452 of file sh64-tdep.c.

#define IS_PTABSL_R18 (   x)    (((x) & 0xffffff8f) == 0x6bf14a00)

Definition at line 335 of file sh64-tdep.c.

#define IS_STL_R14_R15 (   x)    (((x) & 0xfff003ff) == 0xa8f000e0)

Definition at line 371 of file sh64-tdep.c.

#define IS_STL_R18_R15 (   x)    (((x) & 0xfff003ff) == 0xa8f00120)

Definition at line 363 of file sh64-tdep.c.

#define IS_STQ_R14_R15 (   x)    (((x) & 0xfff003ff) == 0xacf000e0)

Definition at line 367 of file sh64-tdep.c.

#define IS_STQ_R18_R14 (   x)    (((x) & 0xfff003ff) == 0xace00120)

Definition at line 355 of file sh64-tdep.c.

#define IS_STQ_R18_R15 (   x)    (((x) & 0xfff003ff) == 0xacf00120)

Definition at line 359 of file sh64-tdep.c.

#define IS_STS_PR (   x)    (((x) & 0xf0ff) == 0x2a)

Definition at line 343 of file sh64-tdep.c.

#define IS_STS_R0 (   x)    ((x) == 0x4022)

Definition at line 339 of file sh64-tdep.c.

#define MAKE_ISA32_ADDR (   addr)    ((addr) | 1)

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

#define MSYMBOL_IS_SPECIAL (   msym)    MSYMBOL_TARGET_FLAG_1 (msym)

Definition at line 215 of file sh64-tdep.c.

#define NUM_PSEUDO_REGS_SH_COMPACT   51

Definition at line 204 of file sh64-tdep.c.

#define NUM_PSEUDO_REGS_SH_MEDIA   80

Definition at line 203 of file sh64-tdep.c.

#define UNMAKE_ISA32_ADDR (   addr)    ((addr) & ~1)

Definition at line 235 of file sh64-tdep.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
R0_REGNUM 
DEFAULT_RETURN_REGNUM 
STRUCT_RETURN_REGNUM 
ARG0_REGNUM 
ARGLAST_REGNUM 
FLOAT_ARGLAST_REGNUM 
MEDIA_FP_REGNUM 
PR_REGNUM 
SR_REGNUM 
DR0_REGNUM 
DR_LAST_REGNUM 
FPP0_REGNUM 
FPP_LAST_REGNUM 
FV0_REGNUM 
FV_LAST_REGNUM 
R0_C_REGNUM 
R_LAST_C_REGNUM 
PC_C_REGNUM 
GBR_C_REGNUM 
MACH_C_REGNUM 
MACL_C_REGNUM 
PR_C_REGNUM 
T_C_REGNUM 
FPSCR_C_REGNUM 
FPUL_C_REGNUM 
FP0_C_REGNUM 
FP_LAST_C_REGNUM 
DR0_C_REGNUM 
DR_LAST_C_REGNUM 
FV0_C_REGNUM 
FV_LAST_C_REGNUM 
FPSCR_REGNUM 
SSR_REGNUM 
SPC_REGNUM 
TR7_REGNUM 
FP_LAST_REGNUM 

Definition at line 82 of file sh64-tdep.c.

enum sh_abi
Enumerator:
SH_ABI_UNKNOWN 
SH_ABI_32 
SH_ABI_64 

Definition at line 52 of file sh64-tdep.c.


Function Documentation

struct gdbarch* sh64_gdbarch_init ( struct gdbarch_info  info,
struct gdbarch_list arches 
) [read]

Definition at line 2361 of file sh64-tdep.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines