call_value pattern

James Montgomerie jrmg@dcs.ed.ac.uk
Wed Jan 24 08:05:00 GMT 2001


David Korn wrote:

>> -----Original Message-----
>> From: James Montgomerie [ mailto:jrmg@dcs.ed.ac.uk ]
>> Sent: 24 January 2001 11:18
> 
> 
> 
>> I am in the process of porting GCC to an architecture on which I need to
>> know the machine mode of the return value of a call inside the code
>> generated by the call_value instruction pattern.  Testing the mode of the
>> register passed as operand 0 does not seem to work (it returns the wrong
>> mode, presumably because it hasn't actually been used yet), and I'm at a
>> loss to think of another way.  Can anyone point me in the correct
>> direction?
> 
> 
>   I'm new to Gcc coding, so this answer might be wrong.  If that is the
> case,
> I expect someone more knowledgeable than me will correct my mistake and
> we'll both have learnt something.  Anyway, my first thought on how to deal
> with this would be to look up the name of the SYM_REF, find the DECL for
> the function, and look at it's return type.
> 
>   Was that even close, anybody ?

Sounds like a good plan to me - then again, I am the person who couldn't 
figure out how to do it in the first place :-)

My only concern is that your suggestion could tie me to the C/C++ front 
end.  Is this the case, or I simply being confused by the title of the 
document describing the internal representation tree being "C/C++ 
Internal Representation"?

Jamie.




More information about the Gcc mailing list