]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
The size of an event check never depends on the endianess
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 10 Jan 2015 16:10:58 +0000 (16:10 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 10 Jan 2015 16:10:58 +0000 (16:10 +0000)
of the host. Remove parameter.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3063

16 files changed:
VEX/priv/host_amd64_defs.c
VEX/priv/host_amd64_defs.h
VEX/priv/host_arm64_defs.c
VEX/priv/host_arm64_defs.h
VEX/priv/host_arm_defs.c
VEX/priv/host_arm_defs.h
VEX/priv/host_mips_defs.c
VEX/priv/host_mips_defs.h
VEX/priv/host_ppc_defs.c
VEX/priv/host_ppc_defs.h
VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
VEX/priv/host_x86_defs.c
VEX/priv/host_x86_defs.h
VEX/priv/main_main.c
VEX/pub/libvex.h

index 8124ab0f966d6996006fcad6374bbd5a6039377d..7118e2ba8e6a9db664bce36cea2bda03ab5b222f 100644 (file)
@@ -3499,7 +3499,7 @@ Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc,
       p = doAMode_M(p, fake(4), i->Ain.EvCheck.amFailAddr);
       vassert(p - p0 == 8); /* also ensures that 0x03 offset above is ok */
       /* And crosscheck .. */
-      vassert(evCheckSzB_AMD64(endness_host) == 8);
+      vassert(evCheckSzB_AMD64() == 8);
       goto done;
    }
 
@@ -3542,7 +3542,7 @@ Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for Ain_EvCheck in
    emit_AMD64Instr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_AMD64 ( VexEndness endness_host )
+Int evCheckSzB_AMD64 (void)
 {
    return 8;
 }
index 73caf5cf3c8627f3f300e73267bc4ac380700dbc..09abfe0f7f323d755427238ae0822f28834f6625 100644 (file)
@@ -784,7 +784,7 @@ extern HInstrArray* iselSB_AMD64           ( const IRSB*,
    and so assumes that they are both <= 128, and so can use the short
    offset encoding.  This is all checked with assertions, so in the
    worst case we will merely assert at startup. */
-extern Int evCheckSzB_AMD64 ( VexEndness endness_host );
+extern Int evCheckSzB_AMD64 (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_AMD64 ( VexEndness endness_host,
index 38ad6fa934ed701c916607ad0e69f57f3f76a795..8b5114e07351f22c4485aca6f4c65f28a3b1c4bc 100644 (file)
@@ -5158,7 +5158,7 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc,
          /* nofail: */
 
          /* Crosscheck */
-         vassert(evCheckSzB_ARM64(endness_host) == (UChar*)p - (UChar*)p0);
+         vassert(evCheckSzB_ARM64() == (UChar*)p - (UChar*)p0);
          goto done;
       }
 
@@ -5202,7 +5202,7 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for ARM64in_EvCheck in
    emit_ARM64Instr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_ARM64 ( VexEndness endness_host )
+Int evCheckSzB_ARM64 (void)
 {
    return 24;
 }
index 2d4ca3ce006900bc3d225e00f10ed94b4a2928bd..b25cf20a2b89a3cf09786128247fd45acf7ba8bf 100644 (file)
@@ -962,7 +962,7 @@ extern HInstrArray* iselSB_ARM64 ( const IRSB*,
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
    host_EvC_COUNTER. */
-extern Int evCheckSzB_ARM64 ( VexEndness endness_host );
+extern Int evCheckSzB_ARM64 (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_ARM64 ( VexEndness endness_host,
index b4540055fe5e701a359df57c7e62a1d9278bf63a..9fa93c8c0b83796cdce862f291c2f99c35392f83 100644 (file)
@@ -4644,7 +4644,7 @@ Int emit_ARMInstr ( /*MB_MOD*/Bool* is_profInc,
          /* nofail: */
 
          /* Crosscheck */
-         vassert(evCheckSzB_ARM(endness_host) == (UChar*)p - (UChar*)p0);
+         vassert(evCheckSzB_ARM() == (UChar*)p - (UChar*)p0);
          goto done;
       }
 
@@ -4695,7 +4695,7 @@ Int emit_ARMInstr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for ARMin_EvCheck in
    emit_ARMInstr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_ARM ( VexEndness endness_host )
+Int evCheckSzB_ARM (void)
 {
    return 24;
 }
index b36c487bf20bae278079d7f7e84ca1dc2fad337d..6bc24d4d04e409a6d3e10c5b7c04a49c0982476f 100644 (file)
@@ -1052,7 +1052,7 @@ extern HInstrArray* iselSB_ARM   ( const IRSB*,
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
    host_EvC_COUNTER. */
-extern Int evCheckSzB_ARM ( VexEndness endness_host );
+extern Int evCheckSzB_ARM (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_ARM ( VexEndness endness_host,
index 24855bea586c5f513b2384433926c0c3d3b5e07d..398778f2ed1779dc3a080595108ef3febe934db0 100644 (file)
@@ -4230,7 +4230,7 @@ Int emit_MIPSInstr ( /*MB_MOD*/Bool* is_profInc,
          /* nofail: */
 
          /* Crosscheck */
-         vassert(evCheckSzB_MIPS(endness_host) == (UChar*)p - (UChar*)p0);
+         vassert(evCheckSzB_MIPS() == (UChar*)p - (UChar*)p0);
          goto done;
       }
 
@@ -4316,7 +4316,7 @@ Int emit_MIPSInstr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for Min_EvCheck in
    emit_MIPSInstr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_MIPS ( VexEndness endness_host )
+Int evCheckSzB_MIPS (void)
 {
   UInt kInstrSize = 4;
   return 7*kInstrSize;
index 1e0abc8c3ae5f7a327b2ce7d9aa3a376e93fa0ca..787088b256d9005f7efc3189be3e146b693e24c1 100644 (file)
@@ -742,7 +742,7 @@ extern HInstrArray *iselSB_MIPS          ( const IRSB*,
    and so assumes that they are both <= 128, and so can use the short
    offset encoding.  This is all checked with assertions, so in the
    worst case we will merely assert at startup. */
-extern Int evCheckSzB_MIPS ( VexEndness endness_host );
+extern Int evCheckSzB_MIPS (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_MIPS ( VexEndness endness_host,
index 4b2167568e75103a0c59b9bdc55b0515b0beafad..782cbbfbb73d43d940e957697796e331828e24ad 100644 (file)
@@ -5838,7 +5838,7 @@ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc,
       /* nofail: */
 
       /* Crosscheck */
-      vassert(evCheckSzB_PPC(endness_host) == (UChar*)p - (UChar*)p0);
+      vassert(evCheckSzB_PPC() == (UChar*)p - (UChar*)p0);
       goto done;
    }
 
@@ -5903,7 +5903,7 @@ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for Pin_EvCheck in
    emit_PPCInstr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_PPC ( VexEndness endness_host )
+Int evCheckSzB_PPC (void)
 {
   return 28;
 }
index a9a9e23f673432225ee1bb31b581dad9c8ceeb0e..fa5c591f80c91ee4e19e07b82545dfdb950794b8 100644 (file)
@@ -1170,7 +1170,7 @@ extern HInstrArray* iselSB_PPC           ( const IRSB*,
 /* How big is an event check?  This is kind of a kludge because it
    depends on the offsets of host_EvC_FAILADDR and
    host_EvC_COUNTER. */
-extern Int evCheckSzB_PPC ( VexEndness endness_host );
+extern Int evCheckSzB_PPC (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_PPC ( VexEndness endness_host,
index ca81fa0ad236a0e6c8ce22169e9910e7586872da..1746baa972337dde9774674a0320a18e82fd58ef 100644 (file)
@@ -9734,7 +9734,7 @@ s390_insn_evcheck_emit(UChar *buf, const s390_insn *insn,
    
    /* Make sure the size of the generated code is identical to the size
       returned by evCheckSzB_S390 */
-   vassert(evCheckSzB_S390(endness_host) == code_end - code_begin);
+   vassert(evCheckSzB_S390() == code_end - code_begin);
 
    return buf;
 }
@@ -9956,7 +9956,7 @@ emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn,
 /* Return the number of bytes emitted for an S390_INSN_EVCHECK.
    See s390_insn_evcheck_emit */
 Int
-evCheckSzB_S390(VexEndness endness_host)
+evCheckSzB_S390(void)
 {
    return s390_host_has_gie ? 18 : 24;
 }
index c91ac5e1c2d1da3f73e593dc93138cb4e402eb5d..6a29aea585fcc85b4fbcb280f63ff30e79732703 100644 (file)
@@ -745,7 +745,7 @@ HInstrArray *iselSB_S390   ( const IRSB *, VexArch, const VexArchInfo *,
                              const VexAbiInfo *, Int, Int, Bool, Bool, Addr);
 
 /* Return the number of bytes of code needed for an event check */
-Int evCheckSzB_S390(VexEndness endness_host);
+Int evCheckSzB_S390(void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 VexInvalRange chainXDirect_S390(VexEndness endness_host,
index 90f2e66531ec1f78b580587673d42df91453de2a..a8a679813dfa7b32c29e2a4da9d5f799e596643e 100644 (file)
@@ -3291,7 +3291,7 @@ Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc,
       p = doAMode_M(p, fake(4), i->Xin.EvCheck.amFailAddr);
       vassert(p - p0 == 8); /* also ensures that 0x03 offset above is ok */
       /* And crosscheck .. */
-      vassert(evCheckSzB_X86(endness_host) == 8);
+      vassert(evCheckSzB_X86() == 8);
       goto done;
    }
 
@@ -3336,7 +3336,7 @@ Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc,
 /* How big is an event check?  See case for Xin_EvCheck in
    emit_X86Instr just above.  That crosschecks what this returns, so
    we can tell if we're inconsistent. */
-Int evCheckSzB_X86 ( VexEndness endness_host )
+Int evCheckSzB_X86 (void)
 {
    return 8;
 }
index 2d3341e24b8c085a03ac5ce9bccc4725648dcd15..f51d5b07c36aa111824aa74a0d4f0753bf3a8310 100644 (file)
@@ -746,7 +746,7 @@ extern HInstrArray* iselSB_X86           ( const IRSB*,
    and so assumes that they are both <= 128, and so can use the short
    offset encoding.  This is all checked with assertions, so in the
    worst case we will merely assert at startup. */
-extern Int evCheckSzB_X86 ( VexEndness endness_host );
+extern Int evCheckSzB_X86 (void);
 
 /* Perform a chaining and unchaining of an XDirect jump. */
 extern VexInvalRange chainXDirect_X86 ( VexEndness endness_host,
index f9adfaa40945a5abd8a1cf603607b08258c5f398..b607d14b8641ce6a15ada606f5ad5c44d0fbc488 100644 (file)
@@ -1080,28 +1080,27 @@ VexInvalRange LibVEX_UnChain ( VexArch     arch_host,
    }
 }
 
-Int LibVEX_evCheckSzB ( VexArch    arch_host,
-                        VexEndness endness_host )
+Int LibVEX_evCheckSzB ( VexArch    arch_host )
 {
    static Int cached = 0; /* DO NOT MAKE NON-STATIC */
    if (UNLIKELY(cached == 0)) {
       switch (arch_host) {
          case VexArchX86:
-            cached = evCheckSzB_X86(endness_host); break;
+            cached = evCheckSzB_X86(); break;
          case VexArchAMD64:
-            cached = evCheckSzB_AMD64(endness_host); break;
+            cached = evCheckSzB_AMD64(); break;
          case VexArchARM:
-            cached = evCheckSzB_ARM(endness_host); break;
+            cached = evCheckSzB_ARM(); break;
          case VexArchARM64:
-            cached = evCheckSzB_ARM64(endness_host); break;
+            cached = evCheckSzB_ARM64(); break;
          case VexArchS390X:
-            cached = evCheckSzB_S390(endness_host); break;
+            cached = evCheckSzB_S390(); break;
          case VexArchPPC32:
          case VexArchPPC64:
-            cached = evCheckSzB_PPC(endness_host); break;
+            cached = evCheckSzB_PPC(); break;
          case VexArchMIPS32:
          case VexArchMIPS64:
-            cached = evCheckSzB_MIPS(endness_host); break;
+            cached = evCheckSzB_MIPS(); break;
          default:
             vassert(0);
       }
index 442ca8fb0de2f68ec24d0ad5ebf830f76be953ea..3e99d47020737c9d1af88280b8f8f110572b3819 100644 (file)
@@ -768,8 +768,7 @@ VexInvalRange LibVEX_UnChain ( VexArch     arch_host,
    calculate the fast entry point address if the slow entry point
    address is known (the usual case), or vice versa. */
 extern
-Int LibVEX_evCheckSzB ( VexArch    arch_host,
-                        VexEndness endness_host );
+Int LibVEX_evCheckSzB ( VexArch arch_host );
 
 
 /* Patch the counter location into an existing ProfInc point.  The