[llvm] r223113 - Add support for ARM modified-immediate assembly syntax.

Jim Grosbach grosbach at apple.com
Wed Feb 11 15:59:42 PST 2015


Depends. If the constant as written is assumed to be 32-bits, it’s legal, as the expression result is then 0xff, which is fine. If it’s assumed to be 64-bits, then there’s a problem, as the result is 0xffffffff000000ff, which isn’t. Since this is a 32-bit architecture, I think a pretty good argument can be made that it should be legal.

-Jim

> On Feb 11, 2015, at 3:53 PM, Eric Christopher <echristo at gmail.com> wrote:
> 
> *points at Tim and Jim*
> 
> -eric
> 
> On Wed Feb 11 2015 at 3:50:19 PM Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>> wrote:
> Couldn’t find anything related to tilde or how an expression gets evaluated to an immediate in ARM manual. Any authority over ARM assembly language?
> 
> Steven
> 
>> On Feb 11, 2015, at 3:37 PM, Eric Christopher <echristo at gmail.com <mailto:echristo at gmail.com>> wrote:
>> 
>> I think the first is to get definite proof on the instruction being legal or not.
>> 
>> -eric
>> 
>> On Wed Feb 11 2015 at 3:36:46 PM Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>> wrote:
>> Unfortunately, I caught this quite late and this commit can no longer back out cleanly. I also don’t have definite proof for such instruction being legal but it certainly looks fine to me. :)
>> The easy fix might be to remove this error and shrink the value to 32 bits, but this error message is actually quite useful.
>> 
>> 
>>> On Feb 11, 2015, at 3:01 PM, Eric Christopher <echristo at gmail.com <mailto:echristo at gmail.com>> wrote:
>>> 
>>> Hi Steven,
>>> 
>>> Is it a legal instruction? :)
>>> 
>>> If so, it's been a week, I think we should just revert back to green and add a test that the instruction is assembled properly.
>>> 
>>> -eric
>>> 
>>> On Wed Feb 11 2015 at 2:58:52 PM Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>> wrote:
>>> Hi Asiri
>>> 
>>> Have you had a chance to look at this problem yet? Since the immediates are evaluated as int64_t, I cannot see an easy way to fix this. I don’t think we can allow a false positive for this error message either. Do you have any solution?
>>> 
>>> Thanks
>>> 
>>> Steven
>>> 
>>>> On Feb 4, 2015, at 12:10 PM, Steven Wu <stevenwu at apple.com <mailto:stevenwu at apple.com>> wrote:
>>>> 
>>>> Hi Asiri
>>>> 
>>>> I see this instruction, which I believe is legal, gets an error now:
>>>> 	mvn sp, #(~(0xffffff00))
>>>> Can you look at this as well? Thanks!
>>>> 
>>>> Steven
>>>> 
>>>> 
>>>>> On Dec 4, 2014, at 7:27 AM, Asiri Rathnayake <asiri.rathnayake at gmail.com <mailto:asiri.rathnayake at gmail.com>> wrote:
>>>>> 
>>>>> Should be fixed in r223366
>>>>> 
>>>>> Best,
>>>>> 
>>>>> - Asiri
>>>>> 
>>>>> On Wed, Dec 3, 2014 at 6:39 PM, Joerg Sonnenberger <joerg at britannica.bec.de <mailto:joerg at britannica.bec.de>> wrote:
>>>>> On Tue, Dec 02, 2014 at 10:53:21AM -0000, Asiri Rathnayake wrote:
>>>>> > Author: asiri
>>>>> > Date: Tue Dec  2 04:53:20 2014
>>>>> > New Revision: 223113
>>>>> >
>>>>> > URL: http://llvm.org/viewvc/llvm-project?rev=223113&view=rev <http://llvm.org/viewvc/llvm-project?rev=223113&view=rev>
>>>>> > Log:
>>>>> > Add support for ARM modified-immediate assembly syntax.
>>>>> 
>>>>> I see failures like
>>>>> 
>>>>>         adds r3, r0, #(32 * 4)
>>>>> 
>>>>> being rejected now. Can you check if that is your commit?
>>>>> 
>>>>> Joerg
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>>>> 
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>>> 
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <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/20150211/9b1ad1a7/attachment.html>


More information about the llvm-commits mailing list