aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2012-08-24 13:21:55 +0000
committerH.J. Lu <hongjiu.lu@intel.com>2012-08-24 13:21:55 +0000
commit5348e7a68f5e9505f141d56daf9fd3a5864860fa (patch)
treee1b6375b0815774f868b46c58812a17d2acdfef4 /gcc/dwarf2out.c
parent4f8ed59be4207255d166b0c2662c892872c9ce08 (diff)
Allow arg_pointer_rtx/frame_pointer_rtx for based_loc_descr
gcc/ PR debug/52857 * dwarf2out.c (mem_loc_descriptor): Allow arg_pointer_rtx and frame_pointer_rtx for based_loc_descr. gcc/testsuite/ PR debug/52857 * gcc.target/i386/pr52857-1.c: New. * gcc.target/i386/pr52857-2.c: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 11d925b9432..4c268d48eea 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -11253,6 +11253,8 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
case REG:
if (GET_MODE_CLASS (mode) != MODE_INT
|| (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE
+ && rtl != arg_pointer_rtx
+ && rtl != frame_pointer_rtx
#ifdef POINTERS_EXTEND_UNSIGNED
&& (mode != Pmode || mem_mode == VOIDmode)
#endif
@@ -11525,7 +11527,9 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
case PLUS:
plus:
if (is_based_loc (rtl)
- && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
+ && (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
+ || XEXP (rtl, 0) == arg_pointer_rtx
+ || XEXP (rtl, 0) == frame_pointer_rtx)
&& GET_MODE_CLASS (mode) == MODE_INT)
mem_loc_result = based_loc_descr (XEXP (rtl, 0),
INTVAL (XEXP (rtl, 1)),