]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
arm64: rename guest_SP to guest_XSP so as to avoid a name clash with
authorJulian Seward <jseward@acm.org>
Wed, 15 Jan 2014 10:25:21 +0000 (10:25 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 15 Jan 2014 10:25:21 +0000 (10:25 +0000)
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
VEX/priv/guest_arm64_helpers.c
VEX/priv/guest_arm64_toIR.c
VEX/priv/guest_s390_helpers.c
VEX/pub/libvex_guest_arm64.h
VEX/pub/libvex_guest_s390x.h

index f4414db65bc262986495c417fce7d1b28d139503..109794189d7e22b10cdc5ae2c9fb8b2333601d5e 100644 (file)
@@ -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
index 7041898640680e2cc7fbd1b6d856e439002b2d87..4d67ecfb89dd71d4bcd284f9d1b5c03a608daa63 100644 (file)
@@ -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. */
index d212e3b046095279ce2b7cb202e4d661fa718823..7fbb6a6ed7d559c9f8bd92e5aea2eb5f44d54cdf 100644 (file)
@@ -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 )
index 76ecb8a4b05acc8ab077228dc16b2c87a4a19eb4..3feb3600a0a349c7dd9c81b43c3f33287f4204ae 100644 (file)
@@ -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. */
index 131a3e7a385a3432ebaf9c0de0a7504b03374242..de762140accb64b3b6a5dddf1075f14baf88507d 100644 (file)
@@ -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,
index 089cf8ae0f11be58e84453829c7f76b0f426d2fa..d540c3c005ed4c9a7da45a180900d60e86805e95 100644 (file)
@@ -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 ---*/