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]: Preparations for call abi switching via attribute.


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


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