aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>2000-12-02 00:18:46 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2000-12-02 00:18:46 +0000
commit27646dba39c421705f0a651bf68223680e3351e9 (patch)
treea9017265fd3bf7b9904620d787cc6634e26be5dc
parent08106825b963ae6505e978a0986d134d9860ac7a (diff)
downloadgcc-27646dba39c421705f0a651bf68223680e3351e9.zip
gcc-27646dba39c421705f0a651bf68223680e3351e9.tar.gz
gcc-27646dba39c421705f0a651bf68223680e3351e9.tar.bz2
dbxout.c (dbxout_parms): Correctly describe parameters passed by invisible reference in registers...
2000-12-01 Jim Blandy <jimb@redhat.com> * dbxout.c (dbxout_parms): Correctly describe parameters passed by invisible reference in registers, but then spilled to the stack. Remove code to emit a second stab for such parameters; it attempts to describe the value's location by introducing a synthetic C++ `reference' type, and then saying the stack slot has that reference type. This loses type information (breaking GDB's `ptype' command, among other things) just to describe a location which stabs can represent correctly in other ways. From-SVN: r37936
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/dbxout.c39
2 files changed, 31 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 007d98c..82cbc8f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2000-12-01 Jim Blandy <jimb@redhat.com>
+
+ * dbxout.c (dbxout_parms): Correctly describe parameters passed by
+ invisible reference in registers, but then spilled to the stack.
+ Remove code to emit a second stab for such parameters; it attempts
+ to describe the value's location by introducing a synthetic C++
+ `reference' type, and then saying the stack slot has that
+ reference type. This loses type information (breaking GDB's
+ `ptype' command, among other things) just to describe a location
+ which stabs can represent correctly in other ways.
+
2000-12-01 Alexandre Oliva <aoliva@redhat.com>
* final.c (output_addr_const) <PLUS>: Don't assume at least one
@@ -533,6 +544,7 @@ Tue Nov 28 09:53:50 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Merge handling of -D and -U. Update handling of pending
directives. Free the memory after use.
+>>>>>>> 1.8477
2000-11-27 Bernd Schmidt <bernds@redhat.co.uk>
* flow.c (entry_exit_blocks): Add entry for cond_local_set.
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 2c147f6..268a6c6 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2470,6 +2470,24 @@ dbxout_parms (parms)
dbxout_finish_symbol (parms);
}
else if (GET_CODE (DECL_RTL (parms)) == MEM
+ && GET_CODE (XEXP (DECL_RTL (parms), 0)) == MEM)
+ {
+ /* Parm was passed via invisible reference, with the reference
+ living on the stack. DECL_RTL looks like
+ (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))). */
+ const char *decl_name = (DECL_NAME (parms)
+ ? IDENTIFIER_POINTER (DECL_NAME (parms))
+ : "(anon)");
+ current_sym_value
+ = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
+ current_sym_addr = 0;
+
+ FORCE_TEXT;
+ fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name);
+ dbxout_type (TREE_TYPE (parms), 0, 0);
+ dbxout_finish_symbol (parms);
+ }
+ else if (GET_CODE (DECL_RTL (parms)) == MEM
&& XEXP (DECL_RTL (parms), 0) != const0_rtx
/* ??? A constant address for a parm can happen
when the reg it lives in is equiv to a constant in memory.
@@ -2477,22 +2495,14 @@ dbxout_parms (parms)
&& ! CONSTANT_P (XEXP (DECL_RTL (parms), 0)))
{
/* Parm was passed in registers but lives on the stack. */
- int aux_sym_value = 0;
current_sym_code = N_PSYM;
/* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))),
in which case we want the value of that CONST_INT,
- or (MEM (REG ...)) or (MEM (MEM ...)),
+ or (MEM (REG ...)),
in which case we use a value of zero. */
if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG)
current_sym_value = 0;
- else if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == MEM)
- {
- /* Remember the location on the stack the parm is moved to */
- aux_sym_value
- = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
- current_sym_value = 0;
- }
else
current_sym_value
= INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
@@ -2532,17 +2542,6 @@ dbxout_parms (parms)
XEXP (DECL_RTL (parms), 0));
dbxout_type (TREE_TYPE (parms), 0, 0);
dbxout_finish_symbol (parms);
- if (aux_sym_value != 0)
- {
- /* Generate an entry for the stack location */
-
- fprintf (asmfile, "%s\"%s:", ASM_STABS_OP,
- IDENTIFIER_POINTER (DECL_NAME (parms)));
- current_sym_value = aux_sym_value;
- current_sym_code = N_LSYM;
- dbxout_type (build_reference_type (TREE_TYPE (parms)), 0, 0);
- dbxout_finish_symbol (parms);
- }
}
}
}