This is the mail archive of the
mailing list for the GCC project.
Re: Change the calling conventions only for the intrinsic functions.
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: Umesh Kalappa <umesh dot kalappa0 at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 08 May 2014 13:07:22 +0200
- Subject: Re: Change the calling conventions only for the intrinsic functions.
- Authentication-results: sourceware.org; auth=none
- References: <CAGfacvSHA7oR+zr7GB6vP9kmPAGFjALt3ygMzaefMSvVZpb-mg at mail dot gmail dot com>
Am 05/07/2014 04:20 PM, schrieb Umesh Kalappa:
Hi All ,
We are porting GCC 4.8.1 for the customized hardware, where the
current calling convention used as arguments are passed by stack and
return value by register.
But we do have some intrinsic functions(that are supplied by hardware
folks ) which has the calling convention like both arguments and
return value are passed by stack.
So question is that currently the backend using usually conventions
like arguments are passed by stack ad return value by register ,But
how do we can model that only intrinsic uses the caller stack space
for return value over registers.
Introduce a new function attribute and attach this attribute to the built-in's
decl, e.g. in TARGET_INIT_BUILTINS, TARGET_BUILTIN_DECL. Then use the attribute
to adjust the calling convention in TARGET_FUNCTION_ARG and alike.
Appreciate any hints or shed some lights on the same.