PATCH: Relax AltiVec integral parameter/literal type checking

Fariborz Jahanian fjahanian@apple.com
Wed May 12 21:02:00 GMT 2004


On May 12, 2004, at 1:00 PM, Ziemowit Laski wrote:

>
> On 12 May, 2004, at 12.53, Fariborz Jahanian wrote:
>
>>
>> On May 12, 2004, at 12:32 PM, Ziemowit Laski wrote:
>>
>>>
>>> On 12 May, 2004, at 8.48, Aldy Hernandez wrote:
>>>
>>>>>>>>> "Ziemowit" == Ziemowit Laski <zlaski@apple.com> writes:
>>>>
>>>>> I haven't modified the casting logic in the compiler, so if the
>>>>> compiler allows
>>>>> a cast to int or const int, then it's probably OK. :-)
>>>>
>>>> Please test that this is actually the case.
>>>
>>> IIUC, you want me to test that type casting/conversion in C and C++ 
>>> work correctly, which
>>> is completely orthogonal to the AltiVec issue, and also gives off a 
>>> slight
>>> "halting problem" vibe.  :-)  Can you be more specific?
>>
>> What I would like to see is that incorrect AltiVec calls are caught; 
>> for example, passing
>> a non-intergal argument when an integral type is expected.
>
> That will require either a __builtin_integral_type_p, or an argument 
> test right inside the
> expand logic in rs6000.c.  Which one do you prefer, and do you 
> _really_ think it is worth
> the candle?  I don't.

No. What I meant is that after you apply the patch, see if incorrect 
AltiVec calls, such as
the one I mentioned in above is caught by the rest of the c function 
call resolution logic.
If it is not, then we only need to make AltiVec specific changes if it 
is somehow specific
to AltiVec. If problem is on the side of the c function call, then 
maybe filing a PR is something
that we need to do for the e near future.

>
>>  P.S. What is IIUC (
>> I have been thinking for a minute and cannot come up with the 
>> sentence :).
>
> If I Understand Correctly. :-)

Thanks, somehow this escaped me.

- Fariborz

>
> --------------------------------------------------------------
> Ziemowit Laski                 1 Infinite Loop, MS 301-2K
> Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
> Apple Computer, Inc.           +1.408.974.6229  Fax .5477
>



More information about the Gcc-patches mailing list