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]
Other format: [Raw text]

Re: patch: fix unwinder to map dwarf regs to unwinder columns


info_ptr->spe_64bit_regs_used = insn_chain_scanned;

Oh, I didn't notice before, but your code for insn_chain_scanned here is wrong. Using a static variable means that you only scan the first function in a translation unit. You need to put this in struct machine_function instead.

You mean like this?


2003-03-11 Aldy Hernandez <aldyh at redhat dot com>

	* config/rs6000/rs6000.c (rs6000_stack_info): Remove
	insn_chain_scanned.  Use insn_chain_scanned_p in machine_function.

* config/rs6000/rs6000.h (machine_function): Add insn_chain_scanned_p.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.437
diff -c -p -r1.437 rs6000.c
*** config/rs6000/rs6000.c	11 Mar 2003 21:26:12 -0000	1.437
--- config/rs6000/rs6000.c	11 Mar 2003 21:34:00 -0000
*************** rs6000_stack_info ()
*** 9169,9175 ****
    enum rs6000_abi abi;
    int ehrd_size;
    int total_raw_size;
-   static int insn_chain_scanned = -1;

/* Zero all fields portably. */
info = zero_info;
--- 9169,9174 ----
*************** rs6000_stack_info ()
*** 9177,9185 ****
if (TARGET_SPE)
{
/* Cache value so we don't rescan instruction chain over and over. */
! if (insn_chain_scanned < 0)
! insn_chain_scanned = (int) spe_func_has_64bit_regs_p ();
! info_ptr->spe_64bit_regs_used = insn_chain_scanned;
}


/* Select which calling sequence. */
--- 9176,9186 ----
if (TARGET_SPE)
{
/* Cache value so we don't rescan instruction chain over and over. */
! if (cfun->machine->insn_chain_scanned_p == 0)
! {
! cfun->machine->insn_chain_scanned_p = 1;
! info_ptr->spe_64bit_regs_used = (int) spe_func_has_64bit_regs_p ();
! }
}


    /* Select which calling sequence.  */
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.255
diff -c -p -r1.255 rs6000.h
*** config/rs6000/rs6000.h	11 Mar 2003 20:40:54 -0000	1.255
--- config/rs6000/rs6000.h	11 Mar 2003 21:34:10 -0000
*************** typedef struct machine_function GTY(())
*** 1649,1654 ****
--- 1649,1656 ----
    int sysv_varargs_p;
    /* Flags if __builtin_return_address (n) with n >= 1 was used.  */
    int ra_needs_full_frame;
+   /* Whether the instruction chain has been scanned already.  */
+   int insn_chain_scanned_p;
  } machine_function;

/* Define a data type for recording info about an argument list


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