From a66272f6d2d307e7c06b2c4e48bbbd7ec331d919 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Fri, 5 Dec 2014 17:01:42 +0000 Subject: [PATCH] defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default. 2014-12-05 Olivier Hainque gcc/ * defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default. * dwarf2cfi.c (init_one_dwarf_reg_size): Honor DWARF_REG_TO_UNWIND_COLUMN. libgcc/ * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Remove default def, now provided by defaults.h. From-SVN: r218429 --- gcc/ChangeLog | 6 ++++++ gcc/defaults.h | 5 +++++ gcc/dwarf2cfi.c | 3 ++- libgcc/ChangeLog | 5 +++++ libgcc/unwind-dw2.c | 4 ---- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a91551b283..3fc9bf138ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-05 Olivier Hainque + + * defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default. + * dwarf2cfi.c (init_one_dwarf_reg_size): Honor + DWARF_REG_TO_UNWIND_COLUMN. + 2014-12-05 Olivier Hainque * dwarf2cfi.c (init_one_dwarf_reg_size): New helper, processing diff --git a/gcc/defaults.h b/gcc/defaults.h index d2609e761c2..26e5750b29b 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -438,6 +438,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG) #endif +/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */ +#ifndef DWARF_REG_TO_UNWIND_COLUMN +#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO) +#endif + /* Map register numbers held in the call frame info that gcc has collected using DWARF_FRAME_REGNUM to those that should be output in .debug_frame and .eh_frame. */ diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 0cd7220584d..04a17bd36ab 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -286,8 +286,9 @@ void init_one_dwarf_reg_size (int regno, machine_mode regmode, { const unsigned int dnum = DWARF_FRAME_REGNUM (regno); const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1); + const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum); - const HOST_WIDE_INT slotoffset = rnum * GET_MODE_SIZE (slotmode); + const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode); const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode); init_state->processed_regno[regno] = true; diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d7a522d5ef1..ce8c1f7470f 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-05 Olivier Hainque + + * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Remove default def, + now provided by defaults.h. + 2014-11-30 Oleg Endo * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c index e4744336031..b262fd9f5b9 100644 --- a/libgcc/unwind-dw2.c +++ b/libgcc/unwind-dw2.c @@ -55,10 +55,6 @@ #define PRE_GCC3_DWARF_FRAME_REGISTERS __LIBGCC_DWARF_FRAME_REGISTERS__ #endif -#ifndef DWARF_REG_TO_UNWIND_COLUMN -#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO) -#endif - /* ??? For the public function interfaces, we tend to gcc_assert that the column numbers are in range. For the dwarf2 unwind info this does happen, although so far in a case that doesn't actually matter. -- 2.30.2