Commit 27646dba by Jim Blandy Committed by Geoffrey Keating

dbxout.c (dbxout_parms): Correctly describe parameters passed by invisible…

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
parent 08106825
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> 2000-12-01 Alexandre Oliva <aoliva@redhat.com>
* final.c (output_addr_const) <PLUS>: Don't assume at least one * 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> ...@@ -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 Merge handling of -D and -U. Update handling of pending
directives. Free the memory after use. directives. Free the memory after use.
>>>>>>> 1.8477
2000-11-27 Bernd Schmidt <bernds@redhat.co.uk> 2000-11-27 Bernd Schmidt <bernds@redhat.co.uk>
* flow.c (entry_exit_blocks): Add entry for cond_local_set. * flow.c (entry_exit_blocks): Add entry for cond_local_set.
......
...@@ -2470,6 +2470,24 @@ dbxout_parms (parms) ...@@ -2470,6 +2470,24 @@ dbxout_parms (parms)
dbxout_finish_symbol (parms); dbxout_finish_symbol (parms);
} }
else if (GET_CODE (DECL_RTL (parms)) == MEM 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 && XEXP (DECL_RTL (parms), 0) != const0_rtx
/* ??? A constant address for a parm can happen /* ??? A constant address for a parm can happen
when the reg it lives in is equiv to a constant in memory. when the reg it lives in is equiv to a constant in memory.
...@@ -2477,22 +2495,14 @@ dbxout_parms (parms) ...@@ -2477,22 +2495,14 @@ dbxout_parms (parms)
&& ! CONSTANT_P (XEXP (DECL_RTL (parms), 0))) && ! CONSTANT_P (XEXP (DECL_RTL (parms), 0)))
{ {
/* Parm was passed in registers but lives on the stack. */ /* Parm was passed in registers but lives on the stack. */
int aux_sym_value = 0;
current_sym_code = N_PSYM; current_sym_code = N_PSYM;
/* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))), /* DECL_RTL looks like (MEM (PLUS (REG...) (CONST_INT...))),
in which case we want the value of that 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. */ in which case we use a value of zero. */
if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG) if (GET_CODE (XEXP (DECL_RTL (parms), 0)) == REG)
current_sym_value = 0; 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 else
current_sym_value current_sym_value
= INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)); = INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
...@@ -2532,17 +2542,6 @@ dbxout_parms (parms) ...@@ -2532,17 +2542,6 @@ dbxout_parms (parms)
XEXP (DECL_RTL (parms), 0)); XEXP (DECL_RTL (parms), 0));
dbxout_type (TREE_TYPE (parms), 0, 0); dbxout_type (TREE_TYPE (parms), 0, 0);
dbxout_finish_symbol (parms); 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);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment