* stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
for the structure's type. All callers changed. * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR for each structure argument rather than assuming it's either true or false for all structure arguments. * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only on the length structure passed, not the compiler used. * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional argument for the structure's type.
This commit is contained in:
parent
7dfa376e9b
commit
84ad95c118
3 changed files with 23 additions and 5 deletions
|
@ -1,3 +1,18 @@
|
|||
Tue Mar 22 20:12:53 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||
|
||||
* stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
|
||||
for the structure's type. All callers changed.
|
||||
|
||||
* valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
|
||||
for each structure argument rather than assuming it's either
|
||||
true or false for all structure arguments.
|
||||
|
||||
* config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
|
||||
on the length structure passed, not the compiler used.
|
||||
|
||||
* config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
|
||||
argument for the structure's type.
|
||||
|
||||
Tue Mar 22 15:28:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* values.c (set_internalvar): Don't set var->value until we are
|
||||
|
|
|
@ -30,7 +30,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart enough to
|
||||
distinguish between Sun cc, gcc version 1 and gcc version 2. */
|
||||
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p) (gcc_p != 1)
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,type) (gcc_p != 1)
|
||||
|
||||
/* Sun /bin/cc gets this right as of SunOS 4.1.x. We need to define
|
||||
BELIEVE_PCC_PROMOTION to get this right now that the code which
|
||||
|
|
|
@ -485,7 +485,7 @@ read_type_number (pp, typenums)
|
|||
static char *type_synonym_name;
|
||||
|
||||
#if !defined (REG_STRUCT_HAS_ADDR)
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p) 0
|
||||
#define REG_STRUCT_HAS_ADDR(gcc_p,type) 0
|
||||
#endif
|
||||
|
||||
/* ARGSUSED */
|
||||
|
@ -983,7 +983,8 @@ define_symbol (valu, string, desc, type, objfile)
|
|||
|
||||
if (local_symbols
|
||||
&& local_symbols->nsyms > 0
|
||||
&& REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
|
||||
&& 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))
|
||||
{
|
||||
|
@ -1176,7 +1177,8 @@ define_symbol (valu, string, desc, type, objfile)
|
|||
to LOC_REGPARM_ADDR for structures and unions. */
|
||||
|
||||
if (SYMBOL_CLASS (sym) == LOC_REGPARM
|
||||
&& REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
|
||||
&& 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)))
|
||||
SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
|
||||
|
@ -1184,7 +1186,8 @@ define_symbol (valu, string, desc, type, objfile)
|
|||
/* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th and
|
||||
subsequent arguments on the sparc, for example). */
|
||||
if (SYMBOL_CLASS (sym) == LOC_ARG
|
||||
&& REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
|
||||
&& 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)))
|
||||
SYMBOL_CLASS (sym) = LOC_REF_ARG;
|
||||
|
|
Loading…
Add table
Reference in a new issue