From 1b744dfb84d388e2311bffc509c5f32c9f99b6f2 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 15 Jan 2014 10:25:21 +0000 Subject: [PATCH] arm64: rename guest_SP to guest_XSP so as to avoid a name clash with guest_SP from s390 world. Also back out the rename of guest_SP to guest_s390_SP that caused s390 build breakage in r2803. git-svn-id: svn://svn.valgrind.org/vex/trunk@2805 --- VEX/auxprogs/genoffsets.c | 2 +- VEX/priv/guest_arm64_helpers.c | 14 +++++++------- VEX/priv/guest_arm64_toIR.c | 4 ++-- VEX/priv/guest_s390_helpers.c | 10 +++++----- VEX/pub/libvex_guest_arm64.h | 2 +- VEX/pub/libvex_guest_s390x.h | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/VEX/auxprogs/genoffsets.c b/VEX/auxprogs/genoffsets.c index f4414db65b..109794189d 100644 --- a/VEX/auxprogs/genoffsets.c +++ b/VEX/auxprogs/genoffsets.c @@ -170,7 +170,7 @@ void foo ( void ) GENOFFSET(ARM64,arm64,X6); GENOFFSET(ARM64,arm64,X7); GENOFFSET(ARM64,arm64,X8); - GENOFFSET(ARM64,arm64,SP); + GENOFFSET(ARM64,arm64,XSP); GENOFFSET(ARM64,arm64,PC); // s390x diff --git a/VEX/priv/guest_arm64_helpers.c b/VEX/priv/guest_arm64_helpers.c index 7041898640..4d67ecfb89 100644 --- a/VEX/priv/guest_arm64_helpers.c +++ b/VEX/priv/guest_arm64_helpers.c @@ -1205,13 +1205,13 @@ void LibVEX_GuestARM64_initialise ( /*OUT*/VexGuestARM64State* vex_state ) Bool guest_arm64_state_requires_precise_mem_exns ( Int minoff, Int maxoff) { - Int sp_min = offsetof(VexGuestARM64State, guest_SP); - Int sp_max = sp_min + 8 - 1; - Int pc_min = offsetof(VexGuestARM64State, guest_PC); - Int pc_max = pc_min + 8 - 1; + Int xsp_min = offsetof(VexGuestARM64State, guest_XSP); + Int xsp_max = xsp_min + 8 - 1; + Int pc_min = offsetof(VexGuestARM64State, guest_PC); + Int pc_max = pc_min + 8 - 1; - if (maxoff < sp_min || minoff > sp_max) { - /* no overlap with sp */ + if (maxoff < xsp_min || minoff > xsp_max) { + /* no overlap with xsp */ if (vex_control.iropt_register_updates == VexRegUpdSpAtMemAccess) return False; // We only need to check stack pointer. } else { @@ -1258,7 +1258,7 @@ VexGuestLayout .total_sizeB = sizeof(VexGuestARM64State), /* Describe the stack pointer. */ - .offset_SP = offsetof(VexGuestARM64State,guest_SP), + .offset_SP = offsetof(VexGuestARM64State,guest_XSP), .sizeof_SP = 8, /* Describe the instruction pointer. */ diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index d212e3b046..7fbb6a6ed7 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -612,7 +612,7 @@ static IRTemp mathREPLICATE ( IRType ty, IRTemp arg, UInt imm ) #define OFFB_X29 offsetof(VexGuestARM64State,guest_X29) #define OFFB_X30 offsetof(VexGuestARM64State,guest_X30) -#define OFFB_SP offsetof(VexGuestARM64State,guest_SP) +#define OFFB_XSP offsetof(VexGuestARM64State,guest_XSP) #define OFFB_PC offsetof(VexGuestARM64State,guest_PC) #define OFFB_CC_OP offsetof(VexGuestARM64State,guest_CC_OP) @@ -715,7 +715,7 @@ static Int offsetIReg64 ( UInt iregNo ) static Int offsetIReg64orSP ( UInt iregNo ) { - return iregNo == 31 ? OFFB_SP : offsetIReg64(iregNo); + return iregNo == 31 ? OFFB_XSP : offsetIReg64(iregNo); } static const HChar* nameIReg64orZR ( UInt iregNo ) diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 76ecb8a4b0..3feb3600a0 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -154,11 +154,11 @@ LibVEX_GuestS390X_initialise(VexGuestS390XState *state) Bool guest_s390x_state_requires_precise_mem_exns(Int minoff, Int maxoff) { - Int lr_min = S390X_GUEST_OFFSET(guest_s390_LR); + Int lr_min = S390X_GUEST_OFFSET(guest_LR); Int lr_max = lr_min + 8 - 1; - Int sp_min = S390X_GUEST_OFFSET(guest_s390_SP); + Int sp_min = S390X_GUEST_OFFSET(guest_SP); Int sp_max = sp_min + 8 - 1; - Int fp_min = S390X_GUEST_OFFSET(guest_s390_FP); + Int fp_min = S390X_GUEST_OFFSET(guest_FP); Int fp_max = fp_min + 8 - 1; Int ia_min = S390X_GUEST_OFFSET(guest_IA); Int ia_max = ia_min + 8 - 1; @@ -203,11 +203,11 @@ VexGuestLayout s390xGuest_layout = { .total_sizeB = sizeof(VexGuestS390XState), /* Describe the stack pointer. */ - .offset_SP = S390X_GUEST_OFFSET(guest_s390_SP), + .offset_SP = S390X_GUEST_OFFSET(guest_SP), .sizeof_SP = 8, /* Describe the frame pointer. */ - .offset_FP = S390X_GUEST_OFFSET(guest_s390_FP), + .offset_FP = S390X_GUEST_OFFSET(guest_FP), .sizeof_FP = 8, /* Describe the instruction pointer. */ diff --git a/VEX/pub/libvex_guest_arm64.h b/VEX/pub/libvex_guest_arm64.h index 131a3e7a38..de762140ac 100644 --- a/VEX/pub/libvex_guest_arm64.h +++ b/VEX/pub/libvex_guest_arm64.h @@ -76,7 +76,7 @@ typedef ULong guest_X28; ULong guest_X29; ULong guest_X30; /* link register */ - ULong guest_SP; + ULong guest_XSP; ULong guest_PC; /* 4-word thunk used to calculate N(sign) Z(zero) C(carry, diff --git a/VEX/pub/libvex_guest_s390x.h b/VEX/pub/libvex_guest_s390x.h index 089cf8ae0f..d540c3c005 100644 --- a/VEX/pub/libvex_guest_s390x.h +++ b/VEX/pub/libvex_guest_s390x.h @@ -166,9 +166,9 @@ void LibVEX_GuestS390X_initialise(VexGuestS390XState *); /*--- Dedicated registers ---*/ /*------------------------------------------------------------*/ -#define guest_s390_LR guest_r14 /* Link register */ -#define guest_s390_SP guest_r15 /* Stack pointer */ -#define guest_s390_FP guest_r11 /* Frame pointer */ +#define guest_LR guest_r14 /* Link register */ +#define guest_SP guest_r15 /* Stack pointer */ +#define guest_FP guest_r11 /* Frame pointer */ /*---------------------------------------------------------------*/ /*--- end libvex_guest_s390x.h ---*/ -- 2.47.2