Skip to content

Commit

Permalink
i#1569 AArch64: Implement MCXT_SYSNUM_REG and get_mcontext_frame_ptr.
Browse files Browse the repository at this point in the history
  • Loading branch information
egrimley-arm committed May 11, 2016
1 parent 7e6ad68 commit 3244f48
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions core/arch/arch_exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ void *_dynamorio_runtime_resolve(void);
# define APP_PARAM(mc, offs) APP_PARAM_##offs(mc)
#endif /* X86/ARM */

#define MCXT_SYSNUM_REG(mc) ((mc)->IF_X86_ELSE(xax, r7))
#define MCXT_SYSNUM_REG(mc) ((mc)->IF_X86_ELSE(xax, IF_ARM_ELSE(r7, r8)))
#define MCXT_FIRST_REG_FIELD(mc) ((mc)->IF_X86_ELSE(xdi, r0))

static inline
Expand All @@ -2238,19 +2238,17 @@ get_mcontext_frame_ptr(dcontext_t *dcontext, priv_mcontext_t *mc)
reg = mc->xbp;
break;
#elif defined(ARM)
# ifdef X64
case DR_ISA_ARM_A64:
reg = mc->r29;
break;
# else
case DR_ISA_ARM_THUMB:
reg = mc->r7;
break;
case DR_ISA_ARM_A32:
reg = mc->r11;
break;
# endif /* 64/32-bit */
#endif /* X86/ARM */
#elif defined(AARCH64)
case DR_ISA_ARM_A64:
reg = mc->r29;
break;
#endif /* X86/ARM/AARCH64 */
default:
ASSERT_NOT_REACHED();
reg = 0;
Expand Down

0 comments on commit 3244f48

Please sign in to comment.