[llvm-commits] [llvm] r121216 - /llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp

Chris Lattner clattner at apple.com
Tue Dec 7 18:19:17 PST 2010


On Dec 7, 2010, at 4:21 PM, Owen Anderson wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=121216&view=rev
> Log:
> Simplify the byte reordering logic slightly.
> +++ llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp Tue Dec  7 18:21:33 2010
> @@ -131,10 +131,8 @@
> 
>     // Same addressing mode as fixup_arm_pcrel_10, but with the bytes reordered.
>     if (Kind == ARM::fixup_t2_pcrel_10) {
> +      uint64_t swapped = (Value & 0xFFFF0000) >> 16;
> +      swapped |= (Value & 0x0000FFFF) << 16;
>       return swapped;
>     }

FYI, this looks like a "short swap" not a "byte swap".  If so, please update the comment.  If it really is a bswap, please use Support/MathExtras.h

-Chris



More information about the llvm-commits mailing list