|
From: <sv...@va...> - 2015-01-10 16:11:09
|
Author: florian
Date: Sat Jan 10 16:10:58 2015
New Revision: 3063
Log:
The size of an event check never depends on the endianess
of the host. Remove parameter.
Modified:
trunk/priv/host_amd64_defs.c
trunk/priv/host_amd64_defs.h
trunk/priv/host_arm64_defs.c
trunk/priv/host_arm64_defs.h
trunk/priv/host_arm_defs.c
trunk/priv/host_arm_defs.h
trunk/priv/host_mips_defs.c
trunk/priv/host_mips_defs.h
trunk/priv/host_ppc_defs.c
trunk/priv/host_ppc_defs.h
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_defs.h
trunk/priv/host_x86_defs.c
trunk/priv/host_x86_defs.h
trunk/priv/main_main.c
trunk/pub/libvex.h
Modified: trunk/priv/host_amd64_defs.c
==============================================================================
--- trunk/priv/host_amd64_defs.c (original)
+++ trunk/priv/host_amd64_defs.c Sat Jan 10 16:10:58 2015
@@ -3499,7 +3499,7 @@
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 @@
/* 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;
}
Modified: trunk/priv/host_amd64_defs.h
==============================================================================
--- trunk/priv/host_amd64_defs.h (original)
+++ trunk/priv/host_amd64_defs.h Sat Jan 10 16:10:58 2015
@@ -784,7 +784,7 @@
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,
Modified: trunk/priv/host_arm64_defs.c
==============================================================================
--- trunk/priv/host_arm64_defs.c (original)
+++ trunk/priv/host_arm64_defs.c Sat Jan 10 16:10:58 2015
@@ -5158,7 +5158,7 @@
/* nofail: */
/* Crosscheck */
- vassert(evCheckSzB_ARM64(endness_host) == (UChar*)p - (UChar*)p0);
+ vassert(evCheckSzB_ARM64() == (UChar*)p - (UChar*)p0);
goto done;
}
@@ -5202,7 +5202,7 @@
/* 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;
}
Modified: trunk/priv/host_arm64_defs.h
==============================================================================
--- trunk/priv/host_arm64_defs.h (original)
+++ trunk/priv/host_arm64_defs.h Sat Jan 10 16:10:58 2015
@@ -962,7 +962,7 @@
/* 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,
Modified: trunk/priv/host_arm_defs.c
==============================================================================
--- trunk/priv/host_arm_defs.c (original)
+++ trunk/priv/host_arm_defs.c Sat Jan 10 16:10:58 2015
@@ -4644,7 +4644,7 @@
/* nofail: */
/* Crosscheck */
- vassert(evCheckSzB_ARM(endness_host) == (UChar*)p - (UChar*)p0);
+ vassert(evCheckSzB_ARM() == (UChar*)p - (UChar*)p0);
goto done;
}
@@ -4695,7 +4695,7 @@
/* 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;
}
Modified: trunk/priv/host_arm_defs.h
==============================================================================
--- trunk/priv/host_arm_defs.h (original)
+++ trunk/priv/host_arm_defs.h Sat Jan 10 16:10:58 2015
@@ -1052,7 +1052,7 @@
/* 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,
Modified: trunk/priv/host_mips_defs.c
==============================================================================
--- trunk/priv/host_mips_defs.c (original)
+++ trunk/priv/host_mips_defs.c Sat Jan 10 16:10:58 2015
@@ -4230,7 +4230,7 @@
/* nofail: */
/* Crosscheck */
- vassert(evCheckSzB_MIPS(endness_host) == (UChar*)p - (UChar*)p0);
+ vassert(evCheckSzB_MIPS() == (UChar*)p - (UChar*)p0);
goto done;
}
@@ -4316,7 +4316,7 @@
/* 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;
Modified: trunk/priv/host_mips_defs.h
==============================================================================
--- trunk/priv/host_mips_defs.h (original)
+++ trunk/priv/host_mips_defs.h Sat Jan 10 16:10:58 2015
@@ -742,7 +742,7 @@
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,
Modified: trunk/priv/host_ppc_defs.c
==============================================================================
--- trunk/priv/host_ppc_defs.c (original)
+++ trunk/priv/host_ppc_defs.c Sat Jan 10 16:10:58 2015
@@ -5838,7 +5838,7 @@
/* nofail: */
/* Crosscheck */
- vassert(evCheckSzB_PPC(endness_host) == (UChar*)p - (UChar*)p0);
+ vassert(evCheckSzB_PPC() == (UChar*)p - (UChar*)p0);
goto done;
}
@@ -5903,7 +5903,7 @@
/* 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;
}
Modified: trunk/priv/host_ppc_defs.h
==============================================================================
--- trunk/priv/host_ppc_defs.h (original)
+++ trunk/priv/host_ppc_defs.h Sat Jan 10 16:10:58 2015
@@ -1170,7 +1170,7 @@
/* 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,
Modified: trunk/priv/host_s390_defs.c
==============================================================================
--- trunk/priv/host_s390_defs.c (original)
+++ trunk/priv/host_s390_defs.c Sat Jan 10 16:10:58 2015
@@ -9734,7 +9734,7 @@
/* 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 @@
/* 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;
}
Modified: trunk/priv/host_s390_defs.h
==============================================================================
--- trunk/priv/host_s390_defs.h (original)
+++ trunk/priv/host_s390_defs.h Sat Jan 10 16:10:58 2015
@@ -745,7 +745,7 @@
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,
Modified: trunk/priv/host_x86_defs.c
==============================================================================
--- trunk/priv/host_x86_defs.c (original)
+++ trunk/priv/host_x86_defs.c Sat Jan 10 16:10:58 2015
@@ -3291,7 +3291,7 @@
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 @@
/* 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;
}
Modified: trunk/priv/host_x86_defs.h
==============================================================================
--- trunk/priv/host_x86_defs.h (original)
+++ trunk/priv/host_x86_defs.h Sat Jan 10 16:10:58 2015
@@ -746,7 +746,7 @@
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,
Modified: trunk/priv/main_main.c
==============================================================================
--- trunk/priv/main_main.c (original)
+++ trunk/priv/main_main.c Sat Jan 10 16:10:58 2015
@@ -1080,28 +1080,27 @@
}
}
-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);
}
Modified: trunk/pub/libvex.h
==============================================================================
--- trunk/pub/libvex.h (original)
+++ trunk/pub/libvex.h Sat Jan 10 16:10:58 2015
@@ -768,8 +768,7 @@
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
|