From e3a8f5827d882b00cca7b5ccb56377652584128e Mon Sep 17 00:00:00 2001 From: jakub Date: Thu, 17 Mar 2011 20:34:59 +0000 Subject: [PATCH] PR debug/48163 * var-tracking.c (prepare_call_arguments): If CALL target is a non-SYMBOL_REF CONSTANT_P, just add that into the list as pc instead of looking it up using cselib_lookup and use Pmode for it if x has VOIDmode. * dwarf2out.c (gen_subprogram_die): If also both first and second CONCAT arguments are VOIDmode, use mode of CONCAT itself. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171114 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/dwarf2out.c | 6 +++++- gcc/var-tracking.c | 11 ++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e4a5114572..815ab0ceee2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,14 @@ 2011-03-17 Jakub Jelinek PR debug/48163 + * var-tracking.c (prepare_call_arguments): If CALL target + is a non-SYMBOL_REF CONSTANT_P, just add that into the list as + pc instead of looking it up using cselib_lookup and use + Pmode for it if x has VOIDmode. + * dwarf2out.c (gen_subprogram_die): If also both first and + second CONCAT arguments are VOIDmode, use mode of CONCAT itself. + + PR debug/48163 * function.c (assign_parms): For data.passed_pointer parms use MEM of data.entry_parm instead of data.entry_parm itself as DECL_INCOMING_RTL. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 31d9a0e9925..74905e3f53e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19481,7 +19481,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) == REGNO (XEXP (XEXP (XEXP (next_arg, 0), 0), 0))) next_arg = XEXP (next_arg, 1); if (mode == VOIDmode) - mode = GET_MODE (XEXP (XEXP (arg, 0), 0)); + { + mode = GET_MODE (XEXP (XEXP (arg, 0), 0)); + if (mode == VOIDmode) + mode = GET_MODE (XEXP (arg, 0)); + } if (GET_MODE_CLASS (mode) != MODE_INT || GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE) continue; diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 7c4c2c57b36..d92ca59055e 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5818,7 +5818,16 @@ prepare_call_arguments (basic_block bb, rtx insn) if (GET_CODE (x) == CALL && MEM_P (XEXP (x, 0))) { x = XEXP (XEXP (x, 0), 0); - if (GET_CODE (x) != SYMBOL_REF) + if (GET_CODE (x) == SYMBOL_REF) + /* Don't record anything. */; + else if (CONSTANT_P (x)) + { + x = gen_rtx_CONCAT (GET_MODE (x) == VOIDmode ? Pmode : GET_MODE (x), + pc_rtx, x); + call_arguments + = gen_rtx_EXPR_LIST (VOIDmode, x, call_arguments); + } + else { cselib_val *val = cselib_lookup (x, GET_MODE (x), 0, VOIDmode); if (val && cselib_preserved_value_p (val)) -- 2.11.0