summaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-03 01:40:33 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-03 01:40:33 +0000
commit567925e3b55e2cc7285b116f6460365f12e530ed (patch)
tree6cea9b2ad7c60bdcd1ca27428519046f1cb9729f /gcc/targhooks.c
parente8fe69c33b9164dabea5d77c80c03090a58e8ced (diff)
downloadgcc-567925e3b55e2cc7285b116f6460365f12e530ed.tar.gz
PR target/9350
PR target/24374 * dwarf2out.c (dwarf2out_reg_save_reg): New. (dwarf2out_frame_debug_expr): Return after dwarf_handle_frame_unspec. * function.c (assign_parms): Use calls.internal_arg_pointer. (expand_main_function): Remove FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN code. * target-def.h (TARGET_INTERNAL_ARG_POINTER): New. (TARGET_CALLS): Add it. * target.h (struct gcc_target): Add calls.internal_arg_pointer. * targhooks.c (default_internal_arg_pointer): New. * targhooks.h (default_internal_arg_pointer): Declare. * tree.h (dwarf2out_reg_save_reg): Declare. * doc/tm.texi (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Remove. * config/i386/i386.c (dbx_register_map): Add return column. (dbx64_register_map, svr4_dbx_register_map): Likewise. (TARGET_INTERNAL_ARG_POINTER, ix86_internal_arg_pointer): New. (TARGET_DWARF_HANDLE_FRAME_UNSPEC, ix86_dwarf_handle_frame_unspec): New. (ix86_function_ok_for_sibcall): Disable if force_align_arg_pointer. (ix86_save_reg): Save force_align_arg_pointer. (ix86_emit_save_regs): Make regno unsigned. (ix86_emit_save_regs_using_mov): Likewise. (ix86_expand_prologue): Handle force_align_arg_pointer. (ix86_expand_epilogue): Likewise. * config/i386/i386.h: (dbx_register_map): Update. (dbx64_register_map, svr4_dbx_register_map): Update. (struct machine_function): Add force_align_arg_pointer. * config/i386/i386.md (UNSPEC_REG_SAVE, UNSPEC_DEF_CFA): New. (UNSPEC_TP, UNSPEC_TLS_GD, UNSPEC_TLS_LD_BASE): Renumber. (TARGET_PUSH_MEMORY peepholes): Disable if RTX_FRAME_RELATED_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index c0c42019a04..94469a76b0f 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -62,6 +62,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "tm_p.h"
#include "target-def.h"
#include "ggc.h"
+#include "hard-reg-set.h"
void
@@ -439,4 +440,19 @@ default_function_value (tree ret_type ATTRIBUTE_UNUSED,
#endif
}
+rtx
+default_internal_arg_pointer (void)
+{
+ /* If the reg that the virtual arg pointer will be translated into is
+ not a fixed reg or is the stack pointer, make a copy of the virtual
+ arg pointer, and address parms via the copy. The frame pointer is
+ considered fixed even though it is not marked as such. */
+ if ((ARG_POINTER_REGNUM == STACK_POINTER_REGNUM
+ || ! (fixed_regs[ARG_POINTER_REGNUM]
+ || ARG_POINTER_REGNUM == FRAME_POINTER_REGNUM)))
+ return copy_to_reg (virtual_incoming_args_rtx);
+ else
+ return virtual_incoming_args_rtx;
+}
+
#include "gt-targhooks.h"