This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix eipa_sra AAPCS issue (PR target/65956)


On 05/05/15 13:54, Jakub Jelinek wrote:
> On Tue, May 05, 2015 at 01:49:55PM +0100, Richard Earnshaw wrote:
>> The real question here is why is TYPE the type of the value, rather than
>> the type of the formal as expressed by the prototype (or implicit
>> prototype in the case of variadics or K&R)?  Surely this is the mid-end
>> passing the wrong information to the back-end.
> 
> There is nothing else for unnamed arguments (K&R, stdarg).
> For named arguments, the backend has the option to save the fntype in
> CUMULATIVE_ARGS and look it up when it needs that.  But, that will
> still mean K&R and stdarg will be just broken on arm.
> 
> 	Jakub
> 

In a literal sense, yes.  However, even K&R & stdarg have standard
promotion and conversion rules (size < int => int, floats promoted to
double, etc).  What are those rules for GCC's overaligned types (ie
where in the docs does it say what happens and how a back-end should
interpret them)?  Shouldn't the mid-end be doing that work so as to
create a consistent view of the values passed into the back-end?  It
seems to me that at present the back-end has to be psychic as to what is
really happening.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]