[llvm-commits] [llvm-gcc-4.2] r108554 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Dale Johannesen dalej at apple.com
Mon Jul 19 10:40:16 PDT 2010


On Jul 19, 2010, at 9:20 AMPDT, Bob Wilson wrote:

> Dale, I don't think this is correct, at least for ARM.  The 'p'  
> constraint is for a memory address, not the actual memory  
> reference.  If I remember correctly, the use of this reported in  
> pr4521 was kind of questionable, and I haven't yet looked in any  
> detail at pr5314 and pr5533.  Maybe we can talk about this in person  
> sometime today.

It wouldn't surprise me if "p" isn't completely correct yet; inline  
asm is implemented incrementally as bugs are found in it.   I believe  
this one is an improvement, but could be wrong.  Do you know of  
anything it breaks?

> On Jul 16, 2010, at 2:00 PM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Fri Jul 16 16:00:31 2010
>> New Revision: 108554
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=108554&view=rev
>> Log:
>> "p" constraint is a form of "m", not "r".  PR 5314.
>>
>>
>> Modified:
>>   llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>>
>> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108554&r1=108553&r2=108554&view=diff
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
>> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jul 16 16:00:31 2010
>> @@ -4429,12 +4429,11 @@
>>      continue;
>>    }
>>
>> -    // Translate 'p' to 'r'.  This is supposed to check for a  
>> valid memory
>> +    // Translate 'p' to 'm'.  This is supposed to check for a  
>> valid memory
>>    // address, but for inline assembly there is no way to know the  
>> mode of
>> -    // the data being addressed.  Assume that a general register  
>> is always
>> -    // a valid address.
>> +    // the data being addressed.
>>    if (ConstraintChar == 'p')
>> -      ConstraintChar = 'r';
>> +      ConstraintChar = 'm';
>>
>>    // See if this is a regclass constraint.
>>    unsigned RegClass;
>>
>>
>> _______________________________________________
>> 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