diff options
author | rupp <rupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 18:49:36 +0000 |
---|---|---|
committer | rupp <rupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 18:49:36 +0000 |
commit | f250798503228f3450989c93ae59c03a37b4ab5e (patch) | |
tree | 7b24c98ceafdd26537ce1ffb8a7338ee0e8b357b /gcc | |
parent | a560ff2b0ff9a04508e51c4119863006fc8203da (diff) | |
download | gcc-f250798503228f3450989c93ae59c03a37b4ab5e.tar.gz |
* dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function.
* dwarf2out.h (dwarf2out_vms_debug_main_pointer): Declare new function.
* config/ia64/ia64-protos.h (ia64_start_function): Declare.
* config/ia64/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Move contents
to ia64_start_function. Invoke it.
* config/ia64/ia64.c (ia64_start_function): Call new function
dwarf2out_vms_debug_main_pointer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/ia64/ia64-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 23 | ||||
-rw-r--r-- | gcc/config/ia64/sysv4.h | 9 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 33 | ||||
-rw-r--r-- | gcc/dwarf2out.h | 3 |
6 files changed, 73 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 34afcc15c71..2ce75077b0a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2010-06-25 Douglas B Rupp <rupp@gnat.com> + + * dwarf2out.c (dwarf2out_vms_debug_main_pointer): New function. + * dwarf2out.h (dwarf2out_vms_debug_main_pointer): Declare new function. + * config/ia64/ia64-protos.h (ia64_start_function): Declare. + * config/ia64/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Move contents + to ia64_start_function. Invoke it. + * config/ia64/ia64.c (ia64_start_function): Call new function + dwarf2out_vms_debug_main_pointer. + 2010-06-25 Sebastian Pop <sebastian.pop@amd.com> * tree-if-conv.c (insert_gimplified_predicates): Do not insert diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 43d58641b9a..cd89e7c8d14 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler for IA-64. - Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2007 + Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -79,6 +79,7 @@ extern void ia64_vms_output_aligned_decl_common (FILE *, tree, const char *, unsigned HOST_WIDE_INT, unsigned int); extern void ia64_vms_elf_asm_named_section (const char *, unsigned int, tree); +extern void ia64_start_function (FILE *, const char *, tree); #endif /* TREE_CODE */ extern int ia64_register_move_cost (enum machine_mode, enum reg_class, diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 9e2aa7ab50d..4d6dbde3da6 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3423,6 +3423,29 @@ ia64_expand_prologue (void) finish_spill_pointers (); } +/* Output the textual info surrounding the prologue. */ + +void +ia64_start_function (FILE *file, const char *fnname, + tree decl ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUGGING_INFO + if (vms_debug_main + && strncmp (vms_debug_main, fnname, strlen (vms_debug_main)) == 0) + { + targetm.asm_out.globalize_label (asm_out_file, VMS_DEBUG_MAIN_POINTER); + ASM_OUTPUT_DEF (asm_out_file, VMS_DEBUG_MAIN_POINTER, fnname); + dwarf2out_vms_debug_main_pointer (); + vms_debug_main = 0; + } +#endif + + fputs ("\t.proc ", file); + assemble_name (file, fnname); + fputc ('\n', file); + ASM_OUTPUT_LABEL (file, fnname); +} + /* Called after register allocation to add any instructions needed for the epilogue. Using an epilogue insn is favored compared to putting all of the instructions in output_function_prologue(), since it allows the scheduler diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h index 678a81ec628..0d760731b46 100644 --- a/gcc/config/ia64/sysv4.h +++ b/gcc/config/ia64/sysv4.h @@ -1,7 +1,7 @@ /* Override definitions in elfos.h/svr4.h to be correct for IA64. Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, -2007 Free Software Foundation, Inc. +2007, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -127,12 +127,7 @@ do { \ #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -do { \ - fputs ("\t.proc ", FILE); \ - assemble_name (FILE, NAME); \ - fputc ('\n', FILE); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ -} while (0) + ia64_start_function(FILE,NAME,DECL) /* We redefine this to use the ia64 .endp pseudo-op. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5c4999dbb60..ecfb37e4fec 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -17414,6 +17414,39 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl) #endif } +#ifdef VMS_DEBUGGING_INFO + +/* Output the debug main pointer die for VMS */ + +void +dwarf2out_vms_debug_main_pointer (void) +{ + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + dw_die_ref die; + + /* Allocate the VMS debug main subprogram die. */ + die = ggc_alloc_cleared_die_node (); + die->die_tag = DW_TAG_subprogram; + add_name_attribute (die, VMS_DEBUG_MAIN_POINTER); + ASM_GENERATE_INTERNAL_LABEL (label, PROLOGUE_END_LABEL, + current_function_funcdef_no); + add_AT_lbl_id (die, DW_AT_entry_pc, label); + + /* Make it the first child of comp_unit_die. */ + die->die_parent = comp_unit_die; + if (comp_unit_die->die_child) + { + die->die_sib = comp_unit_die->die_child->die_sib; + comp_unit_die->die_child->die_sib = die; + } + else + { + die->die_sib = die; + comp_unit_die->die_child = die; + } +} +#endif + /* Push a new declaration scope. */ static void diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h index 21d87cbfb6e..d70b26f6ffd 100644 --- a/gcc/dwarf2out.h +++ b/gcc/dwarf2out.h @@ -27,6 +27,9 @@ extern void debug_dwarf (void); struct die_struct; extern void debug_dwarf_die (struct die_struct *); extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *)); +#ifdef VMS_DEBUGGING_INFO +extern void dwarf2out_vms_debug_main_pointer (void); +#endif struct array_descr_info { |