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.


Mark Mitchell <mark@codesourcery.com> wrote on 01.05.2008 04:11:40:

> Kai Tietz wrote:
> 
> > RETURN_IN_MEMORY is obsolete, but the following target and some of 
there 
> > subtargets are still using it.
> 
> This is a good time to clean it up.  If we enhance its capabilities, 
> we're just investing work in the wrong direction.  Some of these 
> targets, like:
> 
> >         * arm
> 
> are easy; the definition of RETURN_IN_MEMORY is just to call 
> arm_return_in_memory.  All you need to do is add the FNTYPE parameter, 
> and make that function the hook function.  Others do require the 
> creation of a new function, but that's a just a matter of taking the 
> body of the macro and putting it into the function.
> 
> > If I change the RETURN_IN_MEMORY for these (sub-)targets, there is a 
test 
> > needed. I haven't most of these architectures, nor os'es. So the 
> > maintainers would need to verify at least the patch for modifying it 
to 
> > TARGET_RETURN_IN_MEMORY, because I need to add functions for the 
> > replacement.
> 
> I understand your concern.  It's great that you're considering the 
> effect on these targets.  For something like this, the change is pretty 
> simple; we can eyeball it and tell that it should work.  So, the usual 
> procedure would be for you to test that those targets still build (by 
> building at least a cross-cc1), post the patch, and ask target 
> maintainers to review/test.  Then, after a few days, assuming no 
> problems are reported, and after the patch is reviewed, check in the 
> change -- and stand by for reports of trouble.

This patch cleans up with RETURN_IN_MEMORY in the following targets:

        * arm
         arm/netbsd: Not.
        * bfin
        * cris
        * fr30
        * i386
         i386-interix
         i386-elf
         ptx4-i
         sol2-10
         sysv4
         vx
        * mt

So I ask the maintainers of those platforms to review the changes to their 
target, please.

2008-04-29  Kai Tietz  <kai,tietz@onevision.com>

        * calls.c (compute_argument_block_size): Add argument tree fndecl.
        (OUTGOING_REG_PARM_STACK_SPACE): Add function type argument.
        (emit_library_call_value_1): Add new variable fndecl initialized 
by
        NULL_TREE. It should be the decl type of orgfun, but this 
information
        seems not to be available here, so it uses the default calling 
abi.
        * config/arm/arm.c (arm_return_in_memory): Add fntype argumen.
        * config/arm/arm.h (RETURN_IN_MEMORY): Replace RETURN_IN_MEMORY
        by TARGET_RETURN_IN_MEMORY.
        * config/i386/i386-interix.h: Likewise.
        * config/i386/i386.h: Likewise.
        * config/i386/i386elf.h: Likewise.
        * config/i386/ptx4-i.h: Likewise.
        * config/i386/sol2-10.h: Likewise.
        * config/i386/sysv4.h: Likewise.
        * config/i386/vx-common.h: Likewise.
        * config/cris/cris.h: Add comment to #if 0 clause.
        * config/arm/arm-protos.h (arm_return_in_memory): Add fntype
        argument.
        * config/i386/i386-protos.h (ix86_return_in_memory): Add fntype
        argument.
        (ix86_sol10_return_in_memory): Likewise.
        (ix86_sysv4_return_in_memory): New.
        (ix86_ptx4i_return_in_memory): New.
        (ix86_i386elf_return_in_memory): New.
        (ix86_i386interix_return_in_memory): New.
        * config/mt/mt-protos.h (mt_return_in_memory): New.
        * config/mt/mt.c: Likewise.
        * config/mt/mt.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE 
argument.
        (RETURN_IN_MEMORY):  Replace by TARGET_RETURN_IN_MEMORY.
        * config/bfin/bfin.h: Likewise.
        * config/bfin/bfin-protos.h (bfin_return_in_memory): Add fntype
        argument.
        * config/bfin/bfin.c: Likewise.
        * config/pa/pa.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE 
argument.
        * config/alpha/unicosmk.h: Likewise.
        * config/i386/cygming.h: Likewise.
        * config/iq2000/iq2000.h: Likewise.
        * config/mips/mips.h: Likewise.
        * config/mn10300/mn10300.h: Likewise.
        * config/rs6000/rs6000.h: Likewise.
        * config/score/score.h: Likewise.
        * config/spu/spu.h: Likewise.
        * config/v850/v850.h: Likewise.
        * defaults.h: Likewise.
        * doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Adjust 
documentation.
        * expr.c (emit_block_move): Adjust use of 
OUTGOING_REG_PARM_STACK_SPACE.
        * function.c (STACK_DYNAMIC_OFFSET): Adjust use of
        OUTGOING_REG_PARM_STACK_SPACE.
        * targhooks.c (default_return_in_memory): Remove RETURN_IN_MEMORY.

Is this patch ok for apply on trunk?



Thanks in advance for reviewing
  Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

Attachment: amd64_abis_part1.txt
Description: Text document


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