GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
arm.h File Reference
#include "gdbsupport/tdesc.h"

Go to the source code of this file.

Macros

#define IS_PAC(instruction)   (instruction == 0xf3af801d)
 
#define IS_PACBTI(instruction)   (instruction == 0xf3af800d)
 
#define IS_BTI(instruction)   (instruction == 0xf3af800f)
 
#define IS_PACG(instruction)   ((instruction & 0xfff0f0f0) == 0xfb60f000)
 
#define IS_AUT(instruction)   (instruction == 0xf3af802d)
 
#define IS_AUTG(instruction)   ((instruction & 0xfff00ff0) == 0xfb500f00)
 
#define INST_EQ   0x0
 
#define INST_NE   0x1
 
#define INST_CS   0x2
 
#define INST_CC   0x3
 
#define INST_MI   0x4
 
#define INST_PL   0x5
 
#define INST_VS   0x6
 
#define INST_VC   0x7
 
#define INST_HI   0x8
 
#define INST_LS   0x9
 
#define INST_GE   0xa
 
#define INST_LT   0xb
 
#define INST_GT   0xc
 
#define INST_LE   0xd
 
#define INST_AL   0xe
 
#define INST_NV   0xf
 
#define FLAG_N   0x80000000
 
#define FLAG_Z   0x40000000
 
#define FLAG_C   0x20000000
 
#define FLAG_V   0x10000000
 
#define CPSR_T   0x20
 
#define XPSR_T   0x01000000
 
#define ARM_INT_REGISTER_SIZE   4
 
#define ARM_FP_REGISTER_SIZE   12
 
#define ARM_VFP_REGISTER_SIZE   8
 
#define IWMMXT_VEC_REGISTER_SIZE   8
 
#define ARM_CORE_REGS_SIZE   (17 * ARM_INT_REGISTER_SIZE)
 
#define ARM_FP_REGS_SIZE   (8 * ARM_FP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)
 
#define ARM_VFP2_REGS_SIZE   (16 * ARM_VFP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)
 
#define ARM_VFP3_REGS_SIZE   (32 * ARM_VFP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)
 
#define IWMMXT_REGS_SIZE
 
#define IS_THUMB_ADDR(addr)   ((addr) & 1)
 
#define MAKE_THUMB_ADDR(addr)   ((addr) | 1)
 
#define UNMAKE_THUMB_ADDR(addr)   ((addr) & ~1)
 
#define submask(x)   ((1L << ((x) + 1)) - 1)
 
#define bits(obj, st, fn)   (((obj) >> (st)) & submask ((fn) - (st)))
 
#define bit(obj, st)   (((obj) >> (st)) & 1)
 
#define sbits(obj, st, fn)    ((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st))))
 
#define BranchDest(addr, instr)    ((CORE_ADDR) (((unsigned long) (addr)) + 8 + (sbits (instr, 0, 23) << 2)))
 

Enumerations

enum  arm_dwarf_regnum { ARM_DWARF_RA_AUTH_CODE = 143 }
 
enum  gdb_regnum {
  ARM_A1_REGNUM = 0 , ARM_A4_REGNUM = 3 , ARM_AP_REGNUM = 11 , ARM_IP_REGNUM = 12 ,
  ARM_SP_REGNUM = 13 , ARM_LR_REGNUM = 14 , ARM_PC_REGNUM = 15 , ARM_F0_REGNUM = 16 ,
  ARM_F3_REGNUM = 19 , ARM_F7_REGNUM = 23 , ARM_FPS_REGNUM = 24 , ARM_PS_REGNUM = 25 ,
  ARM_WR0_REGNUM , ARM_WR15_REGNUM = ARM_WR0_REGNUM + 15 , ARM_WC0_REGNUM , ARM_WCSSF_REGNUM = ARM_WC0_REGNUM + 2 ,
  ARM_WCASF_REGNUM = ARM_WC0_REGNUM + 3 , ARM_WC7_REGNUM = ARM_WC0_REGNUM + 7 , ARM_WCGR0_REGNUM , ARM_WCGR3_REGNUM = ARM_WCGR0_REGNUM + 3 ,
  ARM_WCGR7_REGNUM = ARM_WCGR0_REGNUM + 7 , ARM_D0_REGNUM , ARM_D31_REGNUM = ARM_D0_REGNUM + 31 , ARM_FPSCR_REGNUM ,
  ARM_FP_REGNUM = 11 , THUMB_FP_REGNUM = 7 , ARM_LAST_ARG_REGNUM = ARM_A4_REGNUM , ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM
}
 
enum  arm_register_counts { ARM_MVE_NUM_Q_REGS = 8 , ARM_NUM_ARG_REGS = 4 , ARM_NUM_FP_ARG_REGS = 4 , ARM_NUM_REGS = ARM_FPSCR_REGNUM + 1 }
 
enum  arm_breakpoint_kinds { ARM_BP_KIND_THUMB = 2 , ARM_BP_KIND_THUMB2 = 3 , ARM_BP_KIND_ARM = 4 }
 
enum  arm_fp_type {
  ARM_FP_TYPE_NONE = 0 , ARM_FP_TYPE_VFPV2 , ARM_FP_TYPE_VFPV3 , ARM_FP_TYPE_IWMMXT ,
  ARM_FP_TYPE_INVALID
}
 
enum  arm_m_profile_type {
  ARM_M_TYPE_M_PROFILE , ARM_M_TYPE_VFP_D16 , ARM_M_TYPE_WITH_FPA , ARM_M_TYPE_MVE ,
  ARM_M_TYPE_SYSTEM , ARM_M_TYPE_INVALID
}
 
enum  system_register_address : CORE_ADDR { FPCCR = 0xe000ef34 , FPCAR = 0xe000ef38 }
 

Functions

int thumb_insn_size (unsigned short inst1)
 
int condition_true (unsigned long cond, unsigned long status_reg)
 
int arm_instruction_changes_pc (uint32_t this_instr)
 
int thumb_instruction_changes_pc (unsigned short inst)
 
int thumb2_instruction_changes_pc (unsigned short inst1, unsigned short inst2)
 
int thumb_advance_itstate (unsigned int itstate)
 
unsigned long shifted_reg_val (struct regcache *regcache, unsigned long inst, int carry, unsigned long pc_val, unsigned long status_reg)
 
target_descarm_create_target_description (arm_fp_type fp_type, bool tls)
 
target_descarm_create_mprofile_target_description (arm_m_profile_type m_type)
 

Macro Definition Documentation

◆ ARM_CORE_REGS_SIZE

#define ARM_CORE_REGS_SIZE   (17 * ARM_INT_REGISTER_SIZE)

Definition at line 164 of file arm.h.

Referenced by arm_register_g_packet_guesses().

◆ ARM_FP_REGISTER_SIZE

#define ARM_FP_REGISTER_SIZE   12

◆ ARM_FP_REGS_SIZE

#define ARM_FP_REGS_SIZE   (8 * ARM_FP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)

Definition at line 166 of file arm.h.

Referenced by arm_register_g_packet_guesses().

◆ ARM_INT_REGISTER_SIZE

#define ARM_INT_REGISTER_SIZE   4

◆ ARM_VFP2_REGS_SIZE

#define ARM_VFP2_REGS_SIZE   (16 * ARM_VFP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)

Definition at line 168 of file arm.h.

Referenced by arm_register_g_packet_guesses().

◆ ARM_VFP3_REGS_SIZE

#define ARM_VFP3_REGS_SIZE   (32 * ARM_VFP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE)

◆ ARM_VFP_REGISTER_SIZE

#define ARM_VFP_REGISTER_SIZE   8

Definition at line 158 of file arm.h.

◆ bit

#define bit ( obj,
st )   (((obj) >> (st)) & 1)

Definition at line 184 of file arm.h.

◆ bits

#define bits ( obj,
st,
fn )   (((obj) >> (st)) & submask ((fn) - (st)))

Definition at line 183 of file arm.h.

◆ BranchDest

#define BranchDest ( addr,
instr )    ((CORE_ADDR) (((unsigned long) (addr)) + 8 + (sbits (instr, 0, 23) << 2)))

◆ CPSR_T

#define CPSR_T   0x20

Definition at line 149 of file arm.h.

Referenced by arm_psr_thumb_bit().

◆ FLAG_C

#define FLAG_C   0x20000000

Definition at line 146 of file arm.h.

Referenced by arm_get_next_pcs_raw(), and condition_true().

◆ FLAG_N

#define FLAG_N   0x80000000

Definition at line 144 of file arm.h.

Referenced by condition_true().

◆ FLAG_V

#define FLAG_V   0x10000000

Definition at line 147 of file arm.h.

Referenced by condition_true().

◆ FLAG_Z

#define FLAG_Z   0x40000000

Definition at line 145 of file arm.h.

Referenced by condition_true().

◆ INST_AL

#define INST_AL   0xe

◆ INST_CC

#define INST_CC   0x3

Definition at line 130 of file arm.h.

Referenced by condition_true().

◆ INST_CS

#define INST_CS   0x2

Definition at line 129 of file arm.h.

Referenced by condition_true().

◆ INST_EQ

#define INST_EQ   0x0

Definition at line 127 of file arm.h.

Referenced by condition_true().

◆ INST_GE

#define INST_GE   0xa

Definition at line 137 of file arm.h.

Referenced by condition_true().

◆ INST_GT

#define INST_GT   0xc

Definition at line 139 of file arm.h.

Referenced by condition_true().

◆ INST_HI

#define INST_HI   0x8

Definition at line 135 of file arm.h.

Referenced by condition_true().

◆ INST_LE

#define INST_LE   0xd

Definition at line 140 of file arm.h.

Referenced by condition_true().

◆ INST_LS

#define INST_LS   0x9

Definition at line 136 of file arm.h.

Referenced by condition_true().

◆ INST_LT

#define INST_LT   0xb

Definition at line 138 of file arm.h.

Referenced by condition_true().

◆ INST_MI

#define INST_MI   0x4

Definition at line 131 of file arm.h.

Referenced by condition_true().

◆ INST_NE

#define INST_NE   0x1

Definition at line 128 of file arm.h.

Referenced by condition_true().

◆ INST_NV

#define INST_NV   0xf

◆ INST_PL

#define INST_PL   0x5

Definition at line 132 of file arm.h.

Referenced by condition_true().

◆ INST_VC

#define INST_VC   0x7

Definition at line 134 of file arm.h.

Referenced by condition_true().

◆ INST_VS

#define INST_VS   0x6

Definition at line 133 of file arm.h.

Referenced by condition_true().

◆ IS_AUT

#define IS_AUT ( instruction)    (instruction == 0xf3af802d)

Definition at line 29 of file arm.h.

Referenced by thumb_analyze_prologue().

◆ IS_AUTG

#define IS_AUTG ( instruction)    ((instruction & 0xfff00ff0) == 0xfb500f00)

Definition at line 30 of file arm.h.

Referenced by thumb_analyze_prologue().

◆ IS_BTI

#define IS_BTI ( instruction)    (instruction == 0xf3af800f)

Definition at line 27 of file arm.h.

◆ IS_PAC

#define IS_PAC ( instruction)    (instruction == 0xf3af801d)

Definition at line 25 of file arm.h.

Referenced by thumb_analyze_prologue().

◆ IS_PACBTI

#define IS_PACBTI ( instruction)    (instruction == 0xf3af800d)

Definition at line 26 of file arm.h.

Referenced by thumb_analyze_prologue().

◆ IS_PACG

#define IS_PACG ( instruction)    ((instruction & 0xfff0f0f0) == 0xfb60f000)

Definition at line 28 of file arm.h.

Referenced by thumb_analyze_prologue().

◆ IS_THUMB_ADDR

#define IS_THUMB_ADDR ( addr)    ((addr) & 1)

◆ IWMMXT_REGS_SIZE

#define IWMMXT_REGS_SIZE
Value:
#define ARM_INT_REGISTER_SIZE
Definition arm.h:155
#define IWMMXT_VEC_REGISTER_SIZE
Definition arm.h:159

Definition at line 172 of file arm.h.

Referenced by fetch_wmmx_regs(), and store_wmmx_regs().

◆ IWMMXT_VEC_REGISTER_SIZE

#define IWMMXT_VEC_REGISTER_SIZE   8

Definition at line 159 of file arm.h.

◆ MAKE_THUMB_ADDR

#define MAKE_THUMB_ADDR ( addr)    ((addr) | 1)

◆ sbits

#define sbits ( obj,
st,
fn )    ((long) (bits(obj,st,fn) | ((long) bit(obj,fn) * ~ submask (fn - st))))

Definition at line 185 of file arm.h.

◆ submask

#define submask ( x)    ((1L << ((x) + 1)) - 1)

Definition at line 182 of file arm.h.

◆ UNMAKE_THUMB_ADDR

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

◆ XPSR_T

#define XPSR_T   0x01000000

Definition at line 151 of file arm.h.

Referenced by arm_psr_thumb_bit().

Enumeration Type Documentation

◆ arm_breakpoint_kinds

Enumerator
ARM_BP_KIND_THUMB 
ARM_BP_KIND_THUMB2 
ARM_BP_KIND_ARM 

Definition at line 86 of file arm.h.

◆ arm_dwarf_regnum

Enumerator
ARM_DWARF_RA_AUTH_CODE 

Definition at line 33 of file arm.h.

◆ arm_fp_type

Enumerator
ARM_FP_TYPE_NONE 
ARM_FP_TYPE_VFPV2 
ARM_FP_TYPE_VFPV3 
ARM_FP_TYPE_IWMMXT 
ARM_FP_TYPE_INVALID 

Definition at line 94 of file arm.h.

◆ arm_m_profile_type

Enumerator
ARM_M_TYPE_M_PROFILE 
ARM_M_TYPE_VFP_D16 
ARM_M_TYPE_WITH_FPA 
ARM_M_TYPE_MVE 
ARM_M_TYPE_SYSTEM 
ARM_M_TYPE_INVALID 

Definition at line 103 of file arm.h.

◆ arm_register_counts

Enumerator
ARM_MVE_NUM_Q_REGS 
ARM_NUM_ARG_REGS 
ARM_NUM_FP_ARG_REGS 
ARM_NUM_REGS 

Definition at line 74 of file arm.h.

◆ gdb_regnum

enum gdb_regnum
Enumerator
ARM_A1_REGNUM 
ARM_A4_REGNUM 
ARM_AP_REGNUM 
ARM_IP_REGNUM 
ARM_SP_REGNUM 
ARM_LR_REGNUM 
ARM_PC_REGNUM 
ARM_F0_REGNUM 
ARM_F3_REGNUM 
ARM_F7_REGNUM 
ARM_FPS_REGNUM 
ARM_PS_REGNUM 
ARM_WR0_REGNUM 
ARM_WR15_REGNUM 
ARM_WC0_REGNUM 
ARM_WCSSF_REGNUM 
ARM_WCASF_REGNUM 
ARM_WC7_REGNUM 
ARM_WCGR0_REGNUM 
ARM_WCGR3_REGNUM 
ARM_WCGR7_REGNUM 
ARM_D0_REGNUM 
ARM_D31_REGNUM 
ARM_FPSCR_REGNUM 
ARM_FP_REGNUM 
THUMB_FP_REGNUM 
ARM_LAST_ARG_REGNUM 
ARM_LAST_FP_ARG_REGNUM 

Definition at line 39 of file arm.h.

◆ system_register_address

enum system_register_address : CORE_ADDR
Enumerator
FPCCR 
FPCAR 

Definition at line 113 of file arm.h.

Function Documentation

◆ arm_create_mprofile_target_description()

target_desc * arm_create_mprofile_target_description ( arm_m_profile_type m_type)

◆ arm_create_target_description()

target_desc * arm_create_target_description ( arm_fp_type fp_type,
bool tls )

◆ arm_instruction_changes_pc()

int arm_instruction_changes_pc ( uint32_t this_instr)

Definition at line 111 of file arm.c.

References ARM_PC_REGNUM, bit, bits, and INST_NV.

Referenced by arm_analyze_prologue(), and arm_deal_with_atomic_sequence_raw().

◆ condition_true()

int condition_true ( unsigned long cond,
unsigned long status_reg )

◆ shifted_reg_val()

unsigned long shifted_reg_val ( struct regcache * regcache,
unsigned long inst,
int carry,
unsigned long pc_val,
unsigned long status_reg )

Definition at line 325 of file arm.c.

References ARM_PC_REGNUM, bit, bits, and shifttype.

Referenced by arm_get_next_pcs_raw().

◆ thumb2_instruction_changes_pc()

int thumb2_instruction_changes_pc ( unsigned short inst1,
unsigned short inst2 )

Definition at line 231 of file arm.c.

References bit, and bits.

Referenced by thumb_analyze_prologue(), and thumb_deal_with_atomic_sequence_raw().

◆ thumb_advance_itstate()

int thumb_advance_itstate ( unsigned int itstate)

Definition at line 95 of file arm.c.

Referenced by thumb_get_next_pcs_raw().

◆ thumb_insn_size()

int thumb_insn_size ( unsigned short inst1)

◆ thumb_instruction_changes_pc()

int thumb_instruction_changes_pc ( unsigned short inst)

Definition at line 204 of file arm.c.

Referenced by thumb_analyze_prologue(), and thumb_deal_with_atomic_sequence_raw().