From 53181b09339f757d9a6bb9dab38530fb9909609c Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 5 Sep 2014 14:49:17 +0000 Subject: [PATCH] Move the endianess test for ppc64 to the correct place. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14465 --- memcheck/mc_machine.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/memcheck/mc_machine.c b/memcheck/mc_machine.c index 006990f608..ed46eba566 100644 --- a/memcheck/mc_machine.c +++ b/memcheck/mc_machine.c @@ -161,6 +161,12 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB ) Int o = offset; tl_assert(sz > 0); +#if defined(VGA_ppc64be) + tl_assert(host_is_big_endian()); +#elif defined(VGA_ppc64le) + tl_assert(host_is_little_endian()); +#endif + if (sz == 8 || sz == 4) { /* The point of this is to achieve if ((o == GOF(GPRn) && sz == 8) || (o == 4+GOF(GPRn) && sz == 4)) @@ -371,11 +377,6 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB ) Int o = offset; Int sz = szB; tl_assert(sz > 0); -#if defined(VGA_ppc64be) - tl_assert(host_is_big_endian()); -#elif defined(VGA_ppc64le) - tl_assert(host_is_little_endian()); -#endif if (o == GOF(GPR0) && sz == 4) return o; if (o == GOF(GPR1) && sz == 4) return o; -- 2.47.2