[llvm-commits] [llvm] r123424 - in /llvm/trunk: include/llvm/Object/MachOFormat.h lib/MC/ELFObjectWriter.cpp lib/MC/MachObjectWriter.cpp lib/Target/ARM/ARMAsmBackend.cpp lib/Target/ARM/ARMFixupKinds.h lib/Target/ARM/ARMMCCodeEmitter.cpp test/MC/A

Evan Cheng evan.cheng at apple.com
Fri Jan 14 15:38:20 PST 2011


On Jan 14, 2011, at 12:20 PM, Jason Kim wrote:

>> 
> 
> Hi Evan,
> 
> FYI, the movt hi16 fixup you put in does not match the output of GNU as -
> Let me look into this and figure out why. I'll reply soon.
> 
> -jason


Interesting. That's probably due to this:

>   case ARM::fixup_arm_movt_hi16:
> -  case ARM::fixup_arm_movw_lo16:
>   case ARM::fixup_arm_movt_hi16_pcrel:
> +    Value >>= 16;
> +    // Fallthrough
> +  case ARM::fixup_arm_movw_lo16:
>   case ARM::fixup_arm_movw_lo16_pcrel: {
>     unsigned Hi4 = (Value & 0xF000) >> 12;
>     unsigned Lo12 = Value & 0x0FFF;
> @@ -168,6 +175,26 @@
>     Value = (Hi4 << 16) | (Lo12);
>     return Value;
>   }

Notice the Value is shifted down 16 bits for movt. I'm fairly sure this is right, at least for Darwin. It's possible there is a bug elsewhere.

Evan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110114/2e96ac50/attachment.html>


More information about the llvm-commits mailing list