1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Simplify the byte reordering logic slightly.

llvm-svn: 121216
This commit is contained in:
Owen Anderson 2010-12-08 00:21:33 +00:00
parent ba5edcfe05
commit d00dc39a11

View File

@ -131,10 +131,8 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
// Same addressing mode as fixup_arm_pcrel_10, but with the bytes reordered.
if (Kind == ARM::fixup_t2_pcrel_10) {
uint64_t swapped = (Value & 0x00FF0000) >> 16;
swapped |= (Value & 0xFF000000) >> 16;
swapped |= (Value & 0x000000FF) << 16;
swapped |= (Value & 0x0000FF00) << 16;
uint64_t swapped = (Value & 0xFFFF0000) >> 16;
swapped |= (Value & 0x0000FFFF) << 16;
return swapped;
}