* config/sparc/tm-sparc.h: Define USE_REGISTER_NOT_ARG.

* stabsread (define_symbol): If USE_REGISTER_NOT_ARG, go back to
	combining all 'p' and 'r' pairs into a LOC_REGPARM.
This commit is contained in:
Jim Kingdon 1994-03-26 16:00:02 +00:00
parent 72e35288c7
commit 649694ea87
3 changed files with 20 additions and 4 deletions

View File

@ -1,5 +1,9 @@
Sat Mar 26 07:05:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* config/sparc/tm-sparc.h: Define USE_REGISTER_NOT_ARG.
* stabsread (define_symbol): If USE_REGISTER_NOT_ARG, go back to
combining all 'p' and 'r' pairs into a LOC_REGPARM.
* command.c (do_setshow_command, case var_string): Never add a
space to the end of the string.
* NEWS: Document this change.

View File

@ -24,6 +24,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Floating point is IEEE compatible. */
#define IEEE_FLOAT
/* If an argument is declared "register", Sun cc will keep it in a register,
never saving it onto the stack. So we better not believe the "p" symbol
descriptor stab. */
#define USE_REGISTER_NOT_ARG
/* When passing a structure to a function, Sun cc passes the address
not the structure itself. It (under SunOS4) creates two symbols,
which we need to combine to a LOC_REGPARM. Gcc version two (as of

View File

@ -977,9 +977,11 @@ define_symbol (valu, string, desc, type, objfile)
/* Sun cc uses a pair of symbols, one 'p' and one 'r' with the same
name to represent an argument passed in a register.
GCC uses 'P' for the same case. So if we find such a symbol pair
we combine it into one 'P' symbol.
we combine it into one 'P' symbol. For Sun cc we need to do this
regardless of REG_STRUCT_HAS_ADDR, because the compiler puts out
the 'p' symbol even if it never saves the argument onto the stack.
But we only do this in the REG_STRUCT_HAS_ADDR case, so that
On most machines, we want to preserve both symbols, so that
we can still get information about what is going on with the
stack (VAX for computing args_printed, using stack slots instead
of saved registers in backtraces, etc.).
@ -991,14 +993,18 @@ define_symbol (valu, string, desc, type, objfile)
if (local_symbols
&& local_symbols->nsyms > 0
#ifndef USE_REGISTER_NOT_ARG
&& REG_STRUCT_HAS_ADDR (processing_gcc_compilation,
SYMBOL_TYPE (sym))
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION))
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION)
#endif
)
{
struct symbol *prev_sym;
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
if (SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
|| SYMBOL_CLASS (prev_sym) == LOC_ARG)
&& STREQ (SYMBOL_NAME (prev_sym), SYMBOL_NAME(sym)))
{
SYMBOL_CLASS (prev_sym) = LOC_REGPARM;