[PATCH][ARM] Label offset crashes llvm integrated assembler
Jiangning Liu
liujiangning1 at gmail.com
Thu Mar 20 20:27:45 PDT 2014
Hi,
I updated my patch by using the test case I posted above.
Ideally we should be able to support the label offset expression, but at
the moment I think there are some design level issues to fix the problem
completely.
This patch is only to raise error message and make sure compiler will not
crash or silent failure by generating incorrect code.
The next step could be completely supporting this feature.
Thanks,
-Jiangning
2014-03-21 11:00 GMT+08:00 Jiangning Liu <liujiangning1 at gmail.com>:
> Hi Saleem,
>
> Your patch r203762 is reverted by r204427, because the fix is even worse
> than before, and it introduced silent failure.
>
> BTW, should we follow review process before committing any code to trunk?
>
> Thanks,
> -Jiangning
>
>
> 2014-03-13 16:45 GMT+08:00 Jiangning Liu <liujiangning1 at gmail.com>:
>
> A question, can you explain why when SOExpr->EvaluateAsAbsolute(Value)
>> returns false, it's safe to return Match_Success?
>>
>> How do we guarantee EvaluateAsAbsolute can always solve the expression
>> and return an immediate value in encoding stage via MCStreamer? Looking at
>> your patch, it seems there might be some assumptions here, or you want to
>> simply use "assertion" in encoding stage to detect any invalid expression
>> in future? If it is yes, it doesn't sound a good solution to me from design
>> level of point.
>>
>> Thanks,
>> -Jiangning
>>
>>
>>
>> 2014-03-13 14:23 GMT+08:00 Saleem Abdulrasool <compnerd at compnerd.org>:
>>
>> On Wed, Mar 12, 2014 at 11:12 PM, Jiangning Liu <liujiangning1 at gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> Attached patch is to raise an error message when finding an expression
>>>> at compile time can't really be solved as a constant for immediate operand.
>>>> Without this patch, llvm compiler would crash.
>>>>
>>>
>>> The attached patch seems wrong. With the attached
>>> change, validateTargetOperandClass always returns Match_InvalidOperand for
>>> any immediate in this addressing mode. If the value is a constant value,
>>> then it should return Match_Success.
>>>
>>>
>>>> --
>>>> Thanks,
>>>> -Jiangning
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>>>
>>>
>>>
>>> --
>>> Saleem Abdulrasool
>>> compnerd (at) compnerd (dot) org
>>>
>>
>>
>>
>> --
>> Thanks,
>> -Jiangning
>>
>
>
>
> --
> Thanks,
> -Jiangning
>
--
Thanks,
-Jiangning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140321/dd4bc51c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: label_offset.patch
Type: text/x-patch
Size: 1173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140321/dd4bc51c/attachment.bin>
More information about the llvm-commits
mailing list