[llvm-commits] [PATCH] thumb t2b fix

Greg Fitzgerald garious at gmail.com
Tue Sep 18 17:28:16 PDT 2012


While you're in the neighborhood, have you noticed that if you drop
the ".w" from the branch instruction, it is wrongly encoded using the
narrow instruction?  The immediate is not being bounds-checked.  And
then if you do the same thing, but using a label instead of an
immediate, I see a negative value being encoded - that doesn't smell
right.

-Greg

On Tue, Sep 18, 2012 at 5:20 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> A small nitpick from an llvm newb, why these two lines?
>
> +  let Inst{13} = target{22};
> +  let Inst{11} = target{21};
>
> These 2 bits require separate logic, which you have.  So should we be
> sure not to reference them in the .td file?  Or better, is there a way
> to do the EOR of S and J1 within the .td file?
>
> Thanks,
> Greg
>
>
> On Tue, Sep 18, 2012 at 9:04 AM, Tim Northover <t.p.northover at gmail.com> wrote:
>>
>> Hi all,
>>
>> > Please review and commit this patch.
>> >
>> > It fixes the thumb t2b instruction, where the immediate value was being
>> > incorrectly encoded and decoded.
>>
>> I can do the committing again, but is there any chance we could have
>> some non-ARM review on this?
>>
>> I think it fixes the important codegen errors around the Thumb2 branch
>> instruction, but there's a change to how fixups are handled which is
>> larger than we're comfortable with committing blind and that test is
>> an order of magnitude longer than most (any alternative to .space to
>> make llvm-mc think a label is PC-relative and far away without
>> actually generating the intervening gap?)
>>
>> Cheers.
>>
>> Tim.
>>
>> (Attached file is identical to Chris's original).
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>



More information about the llvm-commits mailing list