diff options
author | Elliott Hughes <enh@google.com> | 2014-11-15 11:59:36 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-11-15 12:06:41 -0800 |
commit | 50e2a5861bf6310427bb043956fa7b545da3b044 (patch) | |
tree | ac1b0cc82987c0e266dcb2282d4ba9d973186184 /libdex/DexSwapVerify.cpp | |
parent | 9013f53c778d11e7ba7a8bf745882a3e29fe938d (diff) | |
download | android_dalvik-50e2a5861bf6310427bb043956fa7b545da3b044.tar.gz android_dalvik-50e2a5861bf6310427bb043956fa7b545da3b044.tar.bz2 android_dalvik-50e2a5861bf6310427bb043956fa7b545da3b044.zip |
Clean up some dead dalvik cruft.
I don't know whether dmtracedump is still useful, so I'm assuming we should
keep it building. But at least now it's more obvious that it's the only user
of Profile.h.
Change-Id: Ieabce07cb278a19af72b566b08193db17d95e66d
Diffstat (limited to 'libdex/DexSwapVerify.cpp')
-rw-r--r-- | libdex/DexSwapVerify.cpp | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp index ff47ab5d1..7f18831d6 100644 --- a/libdex/DexSwapVerify.cpp +++ b/libdex/DexSwapVerify.cpp @@ -31,35 +31,9 @@ #include <stdlib.h> #include <string.h> -#ifndef __BYTE_ORDER -# error "byte ordering not defined" -#endif - -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define SWAP2(_value) (_value) -# define SWAP4(_value) (_value) -# define SWAP8(_value) (_value) -#else -# define SWAP2(_value) endianSwapU2((_value)) -# define SWAP4(_value) endianSwapU4((_value)) -# define SWAP8(_value) endianSwapU8((_value)) -static u2 endianSwapU2(u2 value) { - return (value >> 8) | (value << 8); -} -static u4 endianSwapU4(u4 value) { - /* ABCD --> CDAB --> DCBA */ - value = (value >> 16) | (value << 16); - return ((value & 0xff00ff00) >> 8) | ((value << 8) & 0xff00ff00); -} -static u8 endianSwapU8(u8 value) { - /* ABCDEFGH --> EFGHABCD --> GHEFCDAB --> HGFEDCBA */ - value = (value >> 32) | (value << 32); - value = ((value & 0xffff0000ffff0000ULL) >> 16) | - ((value << 16) & 0xffff0000ffff0000ULL); - return ((value & 0xff00ff00ff00ff00ULL) >> 8) | - ((value << 8) & 0xff00ff00ff00ff00ULL); -} -#endif +#define SWAP2(_value) (_value) +#define SWAP4(_value) (_value) +#define SWAP8(_value) (_value) #define SWAP_FIELD2(_field) (_field) = SWAP2(_field) #define SWAP_FIELD4(_field) (_field) = SWAP4(_field) |