This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: Preparations for call abi switching via attribute.
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, jh at suse dot cz
- Date: Tue, 29 Apr 2008 08:18:41 -0700
- Subject: Re: [patch]: Preparations for call abi switching via attribute.
- References: <OF51E47A9E.536F9A71-ONC125743A.0037CB7B-C125743A.003890A0@onevision.de>
Kai Tietz wrote:
This patch mainly adds to the RETURN_IN_MEMORY and the
OUTGOING_REG_PARM_STACK_SPACE macros a function type attribute. This
patch is the middle part of supporting the feature to switch between
different calling abi's via attribute. This feature was queried by
the wine project to have the abililty on amd64 targets to do so.
The target patch I will post after this patch gets approved.
The idea of this patch seems OK, but I have some questions:
* How has it been tested? (Every patch submission should list the
platforms on which it has been tested.)
* Isn't RETURN_IN_MEMORY obsolete anyhow? IIUC, the default target hook
for return_in_memory calls RETURN_IN_MEMORY if it is defined. So, why
not just take the few ports that define RETURN_IN_MEMORY, and have them
TARGET_RETURN_IN_MEMORY instead? That function already takes "fntype".
It looks like RETURN_IN_MEMORY is not even documented in our manual.
IIUC, you could thus complete an existing incomplete transition, rather
than adding the argument to RETURN_IN_MEMORY.
* Please leave out the OVERRIDE_ABI_FORMAT change until we have a chance
to see how it is being used. It can be submitted with the target patch.
* You should use NULL_TREE, not "0" or "NULL", for NULL values of type
"tree", as in the case that you are passing a NULL value as "fntype".
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713