diff options
author | Peter Bergner <bergner@vnet.ibm.com> | 2008-01-26 11:18:35 -0600 |
---|---|---|
committer | Peter Bergner <bergner@gcc.gnu.org> | 2008-01-26 11:18:35 -0600 |
commit | e41b2a33b3b105d7615e92b0de11f894a3f52fbe (patch) | |
tree | de5ed68bd1dcac2783d01a32de9bf0a342283a72 /gcc/function.c | |
parent | 6f536f74ed2ea25a598bda90599202712e5fe632 (diff) | |
download | gcc-e41b2a33b3b105d7615e92b0de11f894a3f52fbe.zip gcc-e41b2a33b3b105d7615e92b0de11f894a3f52fbe.tar.gz gcc-e41b2a33b3b105d7615e92b0de11f894a3f52fbe.tar.bz2 |
re PR target/34814 (SDmode function args not passed according to ABI specification)
PR target/34814
* doc/tm.texi (TARGET_EXPAND_TO_RTL_HOOK): Document.
(TARGET_INSTANTIATE_DECLS): Likewise.
* target.h (expand_to_rtl_hook): New target hook.
(instantiate_decls): Likewise.
* function.c (instantiate_decl): Make non-static. Rename to...
(instantiate_decl_rtl): ... this.
(instantiate_expr): Use instantiate_decl_rtl.
(instantiate_decls_1): Likewise.
(instantiate_decls): Likewise.
(instantiate_virtual_regs: Call new instantiate_decls taget hook.
* function.h (instantiate_decl_rtl): Add prototype.
* cfgexpand.c (target.h): New include.
(tree_expand_cfg): Call new expand_to_rtl_hook target hook.
* target-def.h (TARGET_EXPAND_TO_RTL_HOOK): New define.
(TARGET_INSTANTIATE_DECLS): Likewise.
(TARGET_INITIALIZER): New target hooks added.
* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
New prototype.
* config/rs6000/rs6000.c (tree-flow.h): New include.
(machine_function): Add sdmode_stack_slot field.
(rs6000_alloc_sdmode_stack_slot): New function.
(rs6000_instantiate_decls): Likewise.
(rs6000_secondary_memory_needed_rtx): Likewise.
(rs6000_check_sdmode): Likewise.
(TARGET_EXPAND_TO_RTL_HOOK): Target macro defined.
(TARGET_INSTANTIATE_DECLS): Likewise.
(rs6000_hard_regno_mode_ok): Allow SDmode.
(num_insns_constant): Likewise. Handle _Decimal32 constants.
(rs6000_emit_move): Handle SDmode.
(function_arg_advance): Likewise.
(function_arg): Likewise.
(rs6000_gimplify_va_arg): Likewise. Add special handling of
SDmode var args for 32-bit compiles.
(rs6000_secondary_reload_class): Handle SDmode.
(rs6000_output_function_epilogue): Likewise.
(rs6000_function_value): Simplify if statement.
(rs6000_libcall_value): Likewise.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Handle SDmode.
(SECONDARY_MEMORY_NEEDED_RTX): Add define.
* config/rs6000/dfp.md (movsd): New define_expand and splitter.
(movsd_hardfloat): New define_insn.
(movsd_softfloat): Likewise.
(movsd_store): Likewise.
(movsd_load): Likewise.
(extendsddd2): Likewise.
(extendsdtd2): Likewise.
(truncddsd2): Likewise.
(movdd_hardfloat64): Fixup comment.
(UNSPEC_MOVSD_LOAD): New constant.
(UNSPEC_MOVSD_STORE): Likewise.
Co-Authored-By: Janis Johnson <janis187@us.ibm.com>
From-SVN: r131869
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/function.c b/gcc/function.c index d89a040..401bb21 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1568,8 +1568,8 @@ instantiate_virtual_regs_in_insn (rtx insn) /* Subroutine of instantiate_decls. Given RTL representing a decl, do any instantiation required. */ -static void -instantiate_decl (rtx x) +void +instantiate_decl_rtl (rtx x) { rtx addr; @@ -1579,8 +1579,8 @@ instantiate_decl (rtx x) /* If this is a CONCAT, recurse for the pieces. */ if (GET_CODE (x) == CONCAT) { - instantiate_decl (XEXP (x, 0)); - instantiate_decl (XEXP (x, 1)); + instantiate_decl_rtl (XEXP (x, 0)); + instantiate_decl_rtl (XEXP (x, 1)); return; } @@ -1610,7 +1610,7 @@ instantiate_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) { *walk_subtrees = 0; if (DECL_P (t) && DECL_RTL_SET_P (t)) - instantiate_decl (DECL_RTL (t)); + instantiate_decl_rtl (DECL_RTL (t)); } return NULL; } @@ -1626,7 +1626,7 @@ instantiate_decls_1 (tree let) for (t = BLOCK_VARS (let); t; t = TREE_CHAIN (t)) { if (DECL_RTL_SET_P (t)) - instantiate_decl (DECL_RTL (t)); + instantiate_decl_rtl (DECL_RTL (t)); if (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t)) { tree v = DECL_VALUE_EXPR (t); @@ -1650,8 +1650,8 @@ instantiate_decls (tree fndecl) /* Process all parameters of the function. */ for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl)) { - instantiate_decl (DECL_RTL (decl)); - instantiate_decl (DECL_INCOMING_RTL (decl)); + instantiate_decl_rtl (DECL_RTL (decl)); + instantiate_decl_rtl (DECL_INCOMING_RTL (decl)); if (DECL_HAS_VALUE_EXPR_P (decl)) { tree v = DECL_VALUE_EXPR (decl); @@ -1715,6 +1715,8 @@ instantiate_virtual_regs (void) /* Instantiate the virtual registers in the DECLs for debugging purposes. */ instantiate_decls (current_function_decl); + targetm.instantiate_decls (); + /* Indicate that, from now on, assign_stack_local should use frame_pointer_rtx. */ virtuals_instantiated = 1; |