target.h (struct gcc_target): Add comp_type_attributes and set_default_type_attributes.
* target.h (struct gcc_target): Add comp_type_attributes and set_default_type_attributes. * target-def.h (TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define. (TARGET_INITIALIZER): Update. * doc/tm.texi (COMP_TYPE_ATTRIBUTES, TARGET_COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Update documentation of old target macros to describe new target hooks. * tree.c (make_node): Use target.set_default_type_attributes. (default_comp_type_attributes, default_set_default_type_attributes): New functions. * tree.h (default_comp_type_attributes, default_set_default_type_attributes): Declare. * c-typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. (comptypes): Use target.comp_type_attributes. * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h (arc_comp_type_attributes, arc_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove functions and macros with default behaviour. * config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h (m32r_comp_type_attributes, m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h (m68hc11_comp_type_attributes, m68hc11_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h (ns32k_comp_type_attributes, COMP_TYPE_ATTRIBUTES): Likewise. * config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h (rs6000_comp_type_attributes, rs6000_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/d30v/d30v.h (COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove commented out macro definitions. * config/i386/i386.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/ns32k/ns32k.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_set_default_type_attributes): Make static. (TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define. * config/arm/arm.h (COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Don't define. * config/arm/arm-protos.h (arm_comp_type_attributes, arm_set_default_type_attributes): Don't declare. * config/i386/i386.c (ix86_comp_type_attributes): Make static. (TARGET_COMP_TYPE_ATTRIBUTES): Define. * config/i386/i386.h (COMP_TYPE_ATTRIBUTES): Don't define. * config/i386/i386-protos.h (ix86_comp_type_attributes): Don't declare. cp: * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. (comptypes): Use target.comp_type_attributes. From-SVN: r43655
This commit is contained in:
parent
8440bf4367
commit
8d8e52be8a
|
@ -1,3 +1,59 @@
|
|||
2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* target.h (struct gcc_target): Add comp_type_attributes and
|
||||
set_default_type_attributes.
|
||||
* target-def.h (TARGET_COMP_TYPE_ATTRIBUTES,
|
||||
TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define.
|
||||
(TARGET_INITIALIZER): Update.
|
||||
* doc/tm.texi (COMP_TYPE_ATTRIBUTES, TARGET_COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES):
|
||||
Update documentation of old target macros to describe new target
|
||||
hooks.
|
||||
* tree.c (make_node): Use target.set_default_type_attributes.
|
||||
(default_comp_type_attributes,
|
||||
default_set_default_type_attributes): New functions.
|
||||
* tree.h (default_comp_type_attributes,
|
||||
default_set_default_type_attributes): Declare.
|
||||
* c-typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
|
||||
(comptypes): Use target.comp_type_attributes.
|
||||
* config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h
|
||||
(arc_comp_type_attributes, arc_set_default_type_attributes,
|
||||
COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove
|
||||
functions and macros with default behaviour.
|
||||
* config/m32r/m32r-protos.h, config/m32r/m32r.c,
|
||||
config/m32r/m32r.h (m32r_comp_type_attributes,
|
||||
m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
|
||||
config/m68hc11/m68hc11.h (m68hc11_comp_type_attributes,
|
||||
m68hc11_set_default_type_attributes, COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c,
|
||||
config/ns32k/ns32k.h (ns32k_comp_type_attributes,
|
||||
COMP_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
|
||||
config/rs6000/rs6000.h (rs6000_comp_type_attributes,
|
||||
rs6000_set_default_type_attributes, COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/d30v/d30v.h (COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES): Remove commented out macro
|
||||
definitions.
|
||||
* config/i386/i386.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/ns32k/ns32k.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise.
|
||||
* config/arm/arm.c (arm_comp_type_attributes,
|
||||
arm_set_default_type_attributes): Make static.
|
||||
(TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES):
|
||||
Define.
|
||||
* config/arm/arm.h (COMP_TYPE_ATTRIBUTES,
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES): Don't define.
|
||||
* config/arm/arm-protos.h (arm_comp_type_attributes,
|
||||
arm_set_default_type_attributes): Don't declare.
|
||||
* config/i386/i386.c (ix86_comp_type_attributes): Make static.
|
||||
(TARGET_COMP_TYPE_ATTRIBUTES): Define.
|
||||
* config/i386/i386.h (COMP_TYPE_ATTRIBUTES): Don't define.
|
||||
* config/i386/i386-protos.h (ix86_comp_type_attributes): Don't
|
||||
declare.
|
||||
|
||||
2001-06-28 Jan van Male <jan.vanmale@fenk.wau.nl>
|
||||
|
||||
* predict.c (dump_prediction): Eliminate fprintf warning.
|
||||
|
|
|
@ -483,12 +483,8 @@ comptypes (type1, type2)
|
|||
if (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
|
||||
return 1;
|
||||
|
||||
#ifndef COMP_TYPE_ATTRIBUTES
|
||||
#define COMP_TYPE_ATTRIBUTES(t1,t2) 1
|
||||
#endif
|
||||
|
||||
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
|
||||
if (! (attrval = COMP_TYPE_ATTRIBUTES (t1, t2)))
|
||||
if (! (attrval = (*target.comp_type_attributes) (t1, t2)))
|
||||
return 0;
|
||||
|
||||
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
|
||||
|
|
|
@ -60,8 +60,6 @@ extern int shift_operator PARAMS ((rtx, enum machine_mode));
|
|||
|
||||
#ifdef TREE_CODE
|
||||
extern enum arc_function_type arc_compute_function_type PARAMS ((tree));
|
||||
extern int arc_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern void arc_set_default_type_attributes PARAMS ((tree));
|
||||
extern void arc_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
|
||||
enum machine_mode, tree,
|
||||
int *, int));
|
||||
|
|
|
@ -342,24 +342,6 @@ arc_valid_decl_attribute (type, attributes, identifier, args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Return zero if TYPE1 and TYPE are incompatible, one if they are compatible,
|
||||
and two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
int
|
||||
arc_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED, type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set the default attributes for TYPE. */
|
||||
|
||||
void
|
||||
arc_set_default_type_attributes (type)
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
/* Acceptable arguments to the call insn. */
|
||||
|
||||
|
|
|
@ -1575,16 +1575,6 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
|
|||
/* A function address in a call instruction. */
|
||||
#define FUNCTION_MODE SImode
|
||||
|
||||
/* A C expression that returns zero if the attributes on TYPE1 and TYPE2 are
|
||||
incompatible, one if they are compatible, and two if they are
|
||||
nearly compatible (which causes a warning to be generated). */
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
arc_comp_type_attributes (TYPE1, TYPE2)
|
||||
|
||||
/* Give newly defined TYPE some default attributes. */
|
||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||
arc_set_default_type_attributes (TYPE)
|
||||
|
||||
/* alloca should avoid clobbering the old register save area. */
|
||||
/* ??? Not defined in tm.texi. */
|
||||
#define SETJMP_VIA_SAVE_AREA
|
||||
|
|
|
@ -38,8 +38,6 @@ extern unsigned long arm_current_func_type PARAMS ((void));
|
|||
|
||||
#ifdef TREE_CODE
|
||||
extern int arm_return_in_memory PARAMS ((tree));
|
||||
extern int arm_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern void arm_set_default_type_attributes PARAMS ((tree));
|
||||
extern void arm_encode_call_attribute PARAMS ((tree, int));
|
||||
extern int arm_function_ok_for_sibcall PARAMS ((tree));
|
||||
#endif
|
||||
|
|
|
@ -106,6 +106,8 @@ static int arm_valid_type_attribute_p PARAMS ((tree, tree,
|
|||
tree, tree));
|
||||
static int arm_valid_decl_attribute_p PARAMS ((tree, tree,
|
||||
tree, tree));
|
||||
static int arm_comp_type_attributes PARAMS ((tree, tree));
|
||||
static void arm_set_default_type_attributes PARAMS ((tree));
|
||||
#undef Hint
|
||||
#undef Mmode
|
||||
#undef Ulong
|
||||
|
@ -128,6 +130,12 @@ static int arm_valid_decl_attribute_p PARAMS ((tree, tree,
|
|||
# define TARGET_VALID_DECL_ATTRIBUTE arm_valid_decl_attribute_p
|
||||
#endif
|
||||
|
||||
#undef TARGET_COMP_TYPE_ATTRIBUTES
|
||||
#define TARGET_COMP_TYPE_ATTRIBUTES arm_comp_type_attributes
|
||||
|
||||
#undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES
|
||||
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES arm_set_default_type_attributes
|
||||
|
||||
struct gcc_target target = TARGET_INITIALIZER;
|
||||
|
||||
/* Obstack for minipool constant handling. */
|
||||
|
@ -1913,7 +1921,7 @@ arm_valid_type_attribute_p (type, attributes, identifier, args)
|
|||
/* Return 0 if the attributes for two types are incompatible, 1 if they
|
||||
are compatible, and 2 if they are nearly compatible (which causes a
|
||||
warning to be generated). */
|
||||
int
|
||||
static int
|
||||
arm_comp_type_attributes (type1, type2)
|
||||
tree type1;
|
||||
tree type2;
|
||||
|
@ -1984,7 +1992,7 @@ arm_encode_call_attribute (decl, flag)
|
|||
/* Assigns default attributes to newly defined type. This is used to
|
||||
set short_call/long_call attributes for function types of
|
||||
functions defined inside corresponding #pragma scopes. */
|
||||
void
|
||||
static void
|
||||
arm_set_default_type_attributes (type)
|
||||
tree type;
|
||||
{
|
||||
|
|
|
@ -2542,18 +2542,6 @@ extern const char * arm_pic_register_string;
|
|||
offset. */
|
||||
extern int making_const_table;
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
(arm_comp_type_attributes (TYPE1, TYPE2))
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||
arm_set_default_type_attributes (TYPE)
|
||||
|
||||
/* Handle pragmas for compatibility with Intel's compilers. */
|
||||
#define REGISTER_TARGET_PRAGMAS(PFILE) do { \
|
||||
cpp_register_pragma (PFILE, 0, "long_calls", arm_pr_long_calls); \
|
||||
|
|
|
@ -5889,15 +5889,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
|
|||
must also be defined). */
|
||||
/* #define HANDLE_WEAK_PRAGMA */
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on TYPE1
|
||||
and TYPE2 are incompatible, one if they are compatible, and two if they are
|
||||
nearly compatible (which causes a warning to be generated). */
|
||||
/* #define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) */
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly defined
|
||||
TYPE. */
|
||||
/* #define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) */
|
||||
|
||||
/* Define this macro to control use of the character `$' in identifier names.
|
||||
The value should be 0, 1, or 2. 0 means `$' is not allowed by default; 1
|
||||
means it is allowed by default if `-traditional' is used; 2 means it is
|
||||
|
|
|
@ -169,7 +169,6 @@ extern rtx ix86_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int))
|
|||
#endif
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int ix86_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern int ix86_return_pops_args PARAMS ((tree, tree, int));
|
||||
|
||||
extern int ix86_data_alignment PARAMS ((tree, int));
|
||||
|
|
|
@ -607,6 +607,7 @@ static int ix86_fp_comparison_sahf_cost PARAMS ((enum rtx_code code));
|
|||
static int ix86_fp_comparison_cost PARAMS ((enum rtx_code code));
|
||||
static int ix86_save_reg PARAMS ((int, int));
|
||||
static void ix86_compute_frame_layout PARAMS ((struct ix86_frame *));
|
||||
static int ix86_comp_type_attributes PARAMS ((tree, tree));
|
||||
|
||||
/* Initialize the GCC target structure. */
|
||||
#ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES
|
||||
|
@ -617,6 +618,9 @@ static void ix86_compute_frame_layout PARAMS ((struct ix86_frame *));
|
|||
#undef TARGET_VALID_TYPE_ATTRIBUTE
|
||||
#define TARGET_VALID_TYPE_ATTRIBUTE ix86_valid_type_attribute_p
|
||||
|
||||
#undef TARGET_COMP_TYPE_ATTRIBUTES
|
||||
#define TARGET_COMP_TYPE_ATTRIBUTES ix86_comp_type_attributes
|
||||
|
||||
struct gcc_target target = TARGET_INITIALIZER;
|
||||
|
||||
/* Sometimes certain combinations of command options do not make
|
||||
|
@ -928,7 +932,7 @@ ix86_valid_type_attribute_p (type, attributes, identifier, args)
|
|||
are compatible, and 2 if they are nearly compatible (which causes a
|
||||
warning to be generated). */
|
||||
|
||||
int
|
||||
static int
|
||||
ix86_comp_type_attributes (type1, type2)
|
||||
tree type1;
|
||||
tree type2;
|
||||
|
|
|
@ -2240,19 +2240,6 @@ do \
|
|||
while (0)
|
||||
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
(ix86_comp_type_attributes (TYPE1, TYPE2))
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
/* #define SET_DEFAULT_TYPE_ATTRIBUTES (TYPE) */
|
||||
|
||||
/* Max number of args passed in registers. If this is more than 3, we will
|
||||
have problems with ebx (register #4), since it is a caller save register and
|
||||
is also used as the pic register in ELF. So for now, don't allow more than
|
||||
|
|
|
@ -36,12 +36,10 @@ extern void m32r_asm_file_start PARAMS ((FILE *));
|
|||
extern void m32r_sched_init PARAMS ((FILE *, int));
|
||||
extern int direct_return PARAMS ((void));
|
||||
#ifdef TREE_CODE
|
||||
extern int m32r_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern void m32r_select_section PARAMS ((tree, int));
|
||||
extern void m32r_encode_section_info PARAMS ((tree));
|
||||
extern enum m32r_function_type m32r_compute_function_type PARAMS ((tree));
|
||||
extern void m32r_select_section PARAMS ((tree, int));
|
||||
extern void m32r_set_default_type_attributes PARAMS ((tree));
|
||||
|
||||
#ifdef HAVE_MACHINE_MODES
|
||||
extern void m32r_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, Mmode, tree, int *, int));
|
||||
|
|
|
@ -279,26 +279,6 @@ m32r_valid_decl_attribute (type, attributes, identifier, args)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return zero if TYPE1 and TYPE are incompatible, one if they are compatible,
|
||||
and two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
int
|
||||
m32r_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED;
|
||||
tree type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set the default attributes for TYPE. */
|
||||
|
||||
void
|
||||
m32r_set_default_type_attributes (type)
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
/* A C statement or statements to switch to the appropriate
|
||||
section for output of DECL. DECL is either a `VAR_DECL' node
|
||||
|
|
|
@ -2111,16 +2111,6 @@ extern char m32r_punct_chars[];
|
|||
|
||||
/* A function address in a call instruction. */
|
||||
#define FUNCTION_MODE SImode
|
||||
|
||||
/* A C expression that returns zero if the attributes on TYPE1 and TYPE2 are
|
||||
incompatible, one if they are compatible, and two if they are
|
||||
nearly compatible (which causes a warning to be generated). */
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
m32r_comp_type_attributes (TYPE1, TYPE2)
|
||||
|
||||
/* Give newly defined TYPE some default attributes. */
|
||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||
m32r_set_default_type_attributes (TYPE)
|
||||
|
||||
/* Define the information needed to generate branch and scc insns. This is
|
||||
stored from the compare operation. Note that we can't use "rtx" here
|
||||
|
|
|
@ -43,8 +43,6 @@ extern void m68hc11_function_arg_advance PARAMS((CUMULATIVE_ARGS*,
|
|||
enum machine_mode,
|
||||
tree,
|
||||
int));
|
||||
extern int m68hc11_comp_type_attributes PARAMS((tree, tree));
|
||||
extern void m68hc11_set_default_type_attributes PARAMS((tree));
|
||||
extern void m68hc11_encode_section_info PARAMS((tree));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1151,28 +1151,6 @@ m68hc11_valid_type_attribute_p (type, attributes, identifier, args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
int
|
||||
m68hc11_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED;
|
||||
tree type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
void
|
||||
m68hc11_set_default_type_attributes (type)
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
/* Define this macro if references to a symbol must be treated
|
||||
differently depending on something about the variable or function
|
||||
named by the symbol (such as what section it is in).
|
||||
|
|
|
@ -1194,20 +1194,6 @@ typedef struct m68hc11_args
|
|||
m68hc11_initialize_trampoline ((TRAMP), (FNADDR), (CXT))
|
||||
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
(m68hc11_comp_type_attributes (TYPE1, TYPE2))
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||
(m68hc11_set_default_type_attributes (TYPE))
|
||||
|
||||
/* Define this macro if references to a symbol must be treated
|
||||
differently depending on something about the variable or function
|
||||
named by the symbol (such as what section it is in).
|
||||
|
|
|
@ -38,7 +38,6 @@ extern int symbolic_reference_mentioned_p PARAMS ((rtx));
|
|||
#endif /* RTX_CODE */
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int ns32k_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern int ns32k_return_pops_args PARAMS ((tree, tree, int));
|
||||
#endif /* TREE_CODE */
|
||||
|
||||
|
|
|
@ -670,18 +670,6 @@ ns32k_valid_type_attribute_p (type, attributes, identifier, args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Return 0 if the attributes for two types are incompatible, 1 if they
|
||||
are compatible, and 2 if they are nearly compatible (which causes a
|
||||
warning to be generated). */
|
||||
|
||||
int
|
||||
ns32k_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED;
|
||||
tree type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Value is the number of bytes of arguments automatically
|
||||
popped when returning from a subroutine call.
|
||||
|
|
|
@ -1294,19 +1294,6 @@ while (0)
|
|||
{ if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \
|
||||
goto LABEL;}
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
(ns32k_comp_type_attributes (TYPE1, TYPE2))
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
/* #define SET_DEFAULT_TYPE_ATTRIBUTES (TYPE) */
|
||||
|
||||
/* Specify the machine mode that this machine uses
|
||||
for the index in the tablejump instruction.
|
||||
HI mode is more efficient but the range is not wide enough for
|
||||
|
|
|
@ -137,8 +137,6 @@ extern void setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
|
|||
int *, int));
|
||||
extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
|
||||
extern void output_mi_thunk PARAMS ((FILE *, tree, int, tree));
|
||||
extern int rs6000_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern void rs6000_set_default_type_attributes PARAMS ((tree));
|
||||
extern void rs6000_encode_section_info PARAMS ((tree));
|
||||
extern void rs6000_select_section PARAMS ((tree, int));
|
||||
extern void rs6000_unique_section PARAMS ((tree, int));
|
||||
|
|
|
@ -7853,29 +7853,6 @@ rs6000_valid_type_attribute_p (type, attributes, identifier, args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
int
|
||||
rs6000_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED;
|
||||
tree type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
void
|
||||
rs6000_set_default_type_attributes (type)
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Return a reference suitable for calling a function with the
|
||||
longcall attribute. */
|
||||
struct rtx_def *
|
||||
|
|
|
@ -1611,21 +1611,6 @@ typedef struct rs6000_args
|
|||
#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \
|
||||
rs6000_initialize_trampoline (ADDR, FNADDR, CXT)
|
||||
|
||||
/* If defined, a C expression whose value is zero if the attributes on
|
||||
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
|
||||
two if they are nearly compatible (which causes a warning to be
|
||||
generated). */
|
||||
|
||||
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
|
||||
(rs6000_comp_type_attributes (TYPE1, TYPE2))
|
||||
|
||||
/* If defined, a C statement that assigns default attributes to newly
|
||||
defined TYPE. */
|
||||
|
||||
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
|
||||
(rs6000_set_default_type_attributes (TYPE))
|
||||
|
||||
|
||||
/* Definitions for __builtin_return_address and __builtin_frame_address.
|
||||
__builtin_return_address (0) should give link register (65), enable
|
||||
this. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
|
||||
(comptypes): Use target.comp_type_attributes.
|
||||
|
||||
2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
|
||||
|
|
|
@ -996,16 +996,10 @@ comptypes (t1, t2, strict)
|
|||
if (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
|
||||
return 1;
|
||||
|
||||
/* ??? COMP_TYPE_ATTRIBUTES is currently useless for variables as each
|
||||
attribute is its own main variant (`val' will remain 0). */
|
||||
#ifndef COMP_TYPE_ATTRIBUTES
|
||||
#define COMP_TYPE_ATTRIBUTES(t1,t2) 1
|
||||
#endif
|
||||
|
||||
if (strict & COMPARE_NO_ATTRIBUTES)
|
||||
attrval = 1;
|
||||
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
|
||||
else if (! (attrval = COMP_TYPE_ATTRIBUTES (t1, t2)))
|
||||
else if (! (attrval = (*target.comp_type_attributes) (t1, t2)))
|
||||
return 0;
|
||||
|
||||
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
|
||||
|
|
|
@ -8299,19 +8299,18 @@ arguments @var{args} is a valid machine specific attribute for @var{type}.
|
|||
The attributes in @var{attributes} have previously been assigned to @var{type}.
|
||||
@end deftypefn
|
||||
|
||||
@table @code
|
||||
@findex COMP_TYPE_ATTRIBUTES
|
||||
@item COMP_TYPE_ATTRIBUTES (@var{type1}, @var{type2})
|
||||
If defined, a C expression whose value is zero if the attributes on
|
||||
@deftypefn {Target Hook} int TARGET_COMP_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
|
||||
If defined, this target hook is a function which returns zero if the attributes on
|
||||
@var{type1} and @var{type2} are incompatible, one if they are compatible,
|
||||
and two if they are nearly compatible (which causes a warning to be
|
||||
generated).
|
||||
generated). If this is not defined, machine-specific attributes are
|
||||
supposed always to be compatible.
|
||||
@end deftypefn
|
||||
|
||||
@findex SET_DEFAULT_TYPE_ATTRIBUTES
|
||||
@item SET_DEFAULT_TYPE_ATTRIBUTES (@var{type})
|
||||
If defined, a C statement that assigns default attributes to
|
||||
@deftypefn {Target Hook} void TARGET_SET_DEFAULT_TYPE_ATTRIBUTES (tree @var{type})
|
||||
If defined, this target hook is a function which assigns default attributes to
|
||||
newly defined @var{type}.
|
||||
@end table
|
||||
@end deftypefn
|
||||
|
||||
@deftypefn {Target Hook} tree TARGET_MERGE_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
|
||||
Define this target hook if the merging of type attributes needs special
|
||||
|
|
|
@ -30,6 +30,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
|
||||
#define TARGET_VALID_DECL_ATTRIBUTE default_valid_attribute_p
|
||||
#define TARGET_VALID_TYPE_ATTRIBUTE default_valid_attribute_p
|
||||
#define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes
|
||||
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes
|
||||
|
||||
/* The whole shebang. */
|
||||
#define TARGET_INITIALIZER \
|
||||
|
@ -37,5 +39,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
TARGET_MERGE_DECL_ATTRIBUTES, \
|
||||
TARGET_MERGE_TYPE_ATTRIBUTES, \
|
||||
TARGET_VALID_DECL_ATTRIBUTE, \
|
||||
TARGET_VALID_TYPE_ATTRIBUTE \
|
||||
TARGET_VALID_TYPE_ATTRIBUTE, \
|
||||
TARGET_COMP_TYPE_ATTRIBUTES, \
|
||||
TARGET_SET_DEFAULT_TYPE_ATTRIBUTES \
|
||||
}
|
||||
|
|
|
@ -63,6 +63,14 @@ struct gcc_target
|
|||
previously been assigned to TYPE. */
|
||||
int (* valid_type_attribute) PARAMS ((tree type, tree attributes,
|
||||
tree identifier, tree args));
|
||||
|
||||
/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible,
|
||||
one if they are compatible and two if they are nearly compatible
|
||||
(which causes a warning to be generated). */
|
||||
int (* comp_type_attributes) PARAMS ((tree type1, tree type2));
|
||||
|
||||
/* Assign default attributes to the newly defined TYPE. */
|
||||
void (* set_default_type_attributes) PARAMS ((tree type));
|
||||
};
|
||||
|
||||
extern struct gcc_target target;
|
||||
|
|
23
gcc/tree.c
23
gcc/tree.c
|
@ -433,9 +433,7 @@ make_node (code)
|
|||
TYPE_USER_ALIGN (t) = 0;
|
||||
TYPE_MAIN_VARIANT (t) = t;
|
||||
TYPE_ATTRIBUTES (t) = NULL_TREE;
|
||||
#ifdef SET_DEFAULT_TYPE_ATTRIBUTES
|
||||
SET_DEFAULT_TYPE_ATTRIBUTES (t);
|
||||
#endif
|
||||
(* target.set_default_type_attributes) (t);
|
||||
/* Note that we have not yet computed the alias set for this
|
||||
type. */
|
||||
TYPE_ALIAS_SET (t) = -1;
|
||||
|
@ -2720,6 +2718,25 @@ default_valid_attribute_p PARAMS ((attr_name, attr_args, decl, type))
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Default value of target.comp_type_attributes that always returns 1. */
|
||||
|
||||
int
|
||||
default_comp_type_attributes (type1, type2)
|
||||
tree type1 ATTRIBUTE_UNUSED;
|
||||
tree type2 ATTRIBUTE_UNUSED;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Default version of target.set_default_type_attributes that always does
|
||||
nothing. */
|
||||
|
||||
void
|
||||
default_set_default_type_attributes (type)
|
||||
tree type ATTRIBUTE_UNUSED;
|
||||
{
|
||||
}
|
||||
|
||||
/* Return 1 if ATTR_NAME and ATTR_ARGS is valid for either declaration
|
||||
DECL or type TYPE and 0 otherwise. Validity is determined the
|
||||
target functions valid_decl_attribute and valid_machine_attribute. */
|
||||
|
|
|
@ -2044,6 +2044,8 @@ extern tree build_decl_attribute_variant PARAMS ((tree, tree));
|
|||
extern tree merge_decl_attributes PARAMS ((tree, tree));
|
||||
extern tree merge_type_attributes PARAMS ((tree, tree));
|
||||
extern int default_valid_attribute_p PARAMS ((tree, tree, tree, tree));
|
||||
extern int default_comp_type_attributes PARAMS ((tree, tree));
|
||||
extern void default_set_default_type_attributes PARAMS ((tree));
|
||||
|
||||
/* Split a list of declspecs and attributes into two. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue