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]

flow.c/dwarf2out.c and multiple entry points


Hi
(back with my old mutt configuration to avoid another embrasling mistakes)

If I understand it correctly, the LABEL_ALTERNATE_NAME was added to provide
alternate entry points to the functions (I don't see any other sane purpose for
it).  To make this working (as the stack alignment code attempts so), we need
to make at least flow.c/dwarf2out aware of this fact.

Honza

Thu Feb 22 16:15:54 CET 2001  Jan Hubicka  <jh@suse.cz>
	* flow.c (make_edges): Add edge from entry for blocks starting with
	label having ALTERNATE_NAME
	* dwarf2out.c (dwarf2out_frame_debug): Re-initialize when ALTERNATE_NAME
	label is reached.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.380
diff -c -3 -p -r1.380 flow.c
*** flow.c	2001/02/21 16:52:40	1.380
--- flow.c	2001/02/22 15:10:20
*************** make_edges (label_value_list)
*** 1121,1126 ****
--- 1221,1230 ----
        enum rtx_code code;
        int force_fallthru = 0;
  
+       if (GET_CODE (bb->head) == CODE_LABEL
+ 	  && LABEL_ALTERNATE_NAME (bb->head))
+ 	make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0);
+ 
        /* Examine the last instruction of the block, and discover the
  	 ways we can leave the block.  */
  
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.244
diff -c -3 -p -r1.244 dwarf2out.c
*** dwarf2out.c	2001/02/21 14:42:17	1.244
--- dwarf2out.c	2001/02/22 15:11:29
*************** dwarf2out_frame_debug (insn)
*** 1742,1747 ****
--- 1742,1760 ----
        cfa_temp.offset = 0;
        return;
      }
+   if (GET_CODE (insn) == CODE_LABEL && LABEL_ALTERNATE_NAME (insn))
+     {
+       /* Set up state for generating call frame debug info.  */
+       lookup_cfa (&cfa);
+       cfa.reg = STACK_POINTER_REGNUM;
+       cfa.offset = 0;
+       cfa_store = cfa;
+       cfa_temp.reg = -1;
+       cfa_temp.offset = 0;
+       label = dwarf2out_cfi_label ();
+       def_cfa_1 (label, &cfa);
+       return;
+     }
  
    if (! RTX_FRAME_RELATED_P (insn))
      {


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