[llvm-commits] [PATCH] thumb t2b fix

Owen Anderson resistor at mac.com
Tue Sep 18 14:48:39 PDT 2012


Christopher,

I don't understand several issues with this patch:

1) Why do you need to clear bits during fixup resolution?  The intended design is for the MCCodeEmitter to leave fixup bits as zero if it could not determine the correct value for them.
2) This fix violates part of the intended MC design, which is that it should not be _possible_ for an unencodable MCInst to exist.  This is why the representation is such that the immediate operand on the MCInst already has the shift baked into it.

--Owen


On Sep 14, 2012, at 6:23 AM, Christopher Lidbury <Christopher.Lidbury at arm.com> wrote:

> PING!
>  
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Christopher Lidbury
> Sent: 10 September 2012 14:32
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm-commits] [PATCH] thumb t2b fix
>  
> Hi,
>  
> Please review and commit this patch.
>  
> It fixes the thumb t2b instruction, where the immediate value was being incorrectly encoded and decoded.
>  
> I modified two of the tests in MC/ARM/basic-thumb2-instructions.s, which I believe were incorrect; please check that this is ok.
> I also added another test, MC/ARM/thumb-t2b.txt, to ensure that a label with a suitably large offset was encoded correctly. However, this required me to fill the gap between the instruction and the label with a large amount of zeros, resulting in a 12MB object file! This test takes about 15 seconds and may need to be scrapped.
>  
> Thanks,
>  
> ~Chris
> 
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> 
> -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> <thumb-t2b-fix.txt>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

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


More information about the llvm-commits mailing list