This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: call_value pattern
- To: David Korn <dkorn at pixelpower dot com>
- Subject: Re: call_value pattern
- From: James Montgomerie <jrmg at dcs dot ed dot ac dot uk>
- Date: Wed, 24 Jan 2001 16:05:08 +0000
- CC: gcc at gcc dot gnu dot org
- References: <718D38CAB6E0D011B2C90060970C28A5642608@EXCHANGESERVER>
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.