[llvm-commits] [PATCH] ARM JIT: Add support to MOVimm32 using movt/movw for JIT

Zonr Chang zonr.xchg at gmail.com
Thu May 20 20:54:39 PDT 2010


Sorry, I forgot to attach the patch ... :(

Zonr


2010/5/21 Zonr Chang <zonr.xchg at gmail.com>

> Thanks for your patch review (and also to Anton.)
>
> How to reuse the movw/movt logic is indeed a problem. PR7048 is an example.
> To fix this bug, we need to insert more codes into function
> emitDataProcessingInstruction(...) (see attachment.)
>
> It is because, precisely, the previous patch (arm-jit-movt-and-movw.patch)
> implemented the pseudo instruction ARM::MOVi32imm (which according to
> ARMInstrInfo.td should be materialized to movw/movt pair.) However, there's
> a case to use movw or movt as a single instruction to move value and their
> materialization will route to emitDataProcessingInstruction() since both
> movw (opcode ARM::MOVTi16) and movt (opcode ARM::MOVi16) are data processing
> instructions (i.e. ARMII::DPFrm.)
>
> In PR7048, the "1001" to printf(...) will be moved to the register using
> single instruction movw. As you can see in this patch, the logic to encode
> the immediate is reused the third time (one
> in emitDataProcessingInstruction(...) and one in relocation codes.)
>
> Is there a way to reuse the encoding codes?
>
>
> Zonr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100521/98c57f2a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-jit-movt-and-movw2.patch
Type: application/octet-stream
Size: 6754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100521/98c57f2a/attachment.obj>


More information about the llvm-commits mailing list