This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] - Use of powerpc 64bit instructions in 32bit ABI
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Fariborz Jahanian <fjahanian at apple dot com>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, Richard Henderson <rth at redhat dot com>, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, ian at wasabisystems dot com, davem at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Dec 2003 14:31:57 -0500
- Subject: Re: [PATCH] - Use of powerpc 64bit instructions in 32bit ABI
- References: <D99247F4-2435-11D8-9951-000393B9ED88@apple.com>
>>>>> Fariborz Jahanian writes:
Fariborz> This code was added for when pattern for 'long long' is
Fariborz> passed-by-value is generated in -mpowerpc64 mode (64bit insns
Fariborz> with 32bit ABI).
Fariborz> Following diff should fix the SPARC problem.
Testing on the mode is not appropriate. This is in a common part
of the compiler and should not be tuned for the configuration of a
specific platform.
I am testing with the following patch.
Thanks, David
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.470
diff -c -p -r1.470 function.c
*** function.c 24 Nov 2003 21:19:33 -0000 1.470
--- function.c 1 Dec 2003 19:29:02 -0000
*************** assign_parms (tree fndecl)
*** 4706,4716 ****
if (GET_CODE (entry_parm) == PARALLEL && nominal_mode != BLKmode)
{
! /* Objects the size of a register can be combined in registers */
rtx parmreg = gen_reg_rtx (nominal_mode);
! emit_group_store (parmreg, entry_parm, TREE_TYPE (parm),
! int_size_in_bytes (TREE_TYPE (parm)));
! SET_DECL_RTL (parm, parmreg);
}
if (nominal_mode == BLKmode
--- 4706,4720 ----
if (GET_CODE (entry_parm) == PARALLEL && nominal_mode != BLKmode)
{
! /* Objects the size of a register can be combined in registers. */
rtx parmreg = gen_reg_rtx (nominal_mode);
!
! if (REG_P (parmreg))
! {
! emit_group_store (parmreg, entry_parm, TREE_TYPE (parm),
! int_size_in_bytes (TREE_TYPE (parm)));
! SET_DECL_RTL (parm, parmreg);
! }
}
if (nominal_mode == BLKmode