diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2017-06-08 11:24:45 +0100 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2017-06-13 12:06:29 +0000 |
commit | 4c0f8e7f95836cc5a9b59599c419181be2da7eaf (patch) | |
tree | 26df281d8f5ba18bfcde5f2dba7781c582559781 | |
parent | 998f31e56745129475744314d9b8cb7f7820e556 (diff) |
gcc/
Backport from trunk r222084.
2015-04-14 Christian Bruel <christian.bruel@st.com>
* execute_dwarf2_frame (dw_frame_pointer_regnum): Reinitialize for each
function.
Change-Id: I4e09ce8d38888991273e2671f72963dae70cbcf2
-rw-r--r-- | gcc/dwarf2cfi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 27474cba07d..ec2acc961d7 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -2941,7 +2941,6 @@ create_cie_data (void) dw_trace_info cie_trace; dw_stack_pointer_regnum = DWARF_FRAME_REGNUM (STACK_POINTER_REGNUM); - dw_frame_pointer_regnum = DWARF_FRAME_REGNUM (HARD_FRAME_POINTER_REGNUM); memset (&cie_trace, 0, sizeof (cie_trace)); cur_trace = &cie_trace; @@ -2994,6 +2993,9 @@ create_cie_data (void) static unsigned int execute_dwarf2_frame (void) { + /* Different HARD_FRAME_POINTER_REGNUM might coexist in the same file. */ + dw_frame_pointer_regnum = DWARF_FRAME_REGNUM (HARD_FRAME_POINTER_REGNUM); + /* The first time we're called, compute the incoming frame state. */ if (cie_cfi_vec == NULL) create_cie_data (); |