target.h (targetm): Rename global from "target", so as not to conflict with local variables.

* target.h (targetm): Rename global from "target", so as not to
        conflict with local variables.
        * c-decl.c: Ditto.
        * c-typeck.c: Ditto.
        * final.c: Ditto.
        * tree.c: Ditto.
        * cp/decl.c: Ditto.
        * cp/decl2.c: Ditto.
        * cp/typeck.c: Ditto.
        * 1750a/1750a.c: Ditto.
        * a29k/a29k.c: Ditto.
        * arc/arc.c: Ditto.
        * arm/arm.c: Ditto.
        * avr/avr.c: Ditto.
        * clipper/clipper.c: Ditto.
        * convex/convex.c: Ditto.
        * d30v/d30v.c: Ditto.
        * dsp16xx/dsp16xx.c: Ditto.
        * elxsi/elxsi.c: Ditto.
        * fr30/fr30.c: Ditto.
        * h8300/h8300.c: Ditto.
        * i370/i370.c: Ditto.
        * i386/i386.c: Ditto.
        * i860/i860.c: Ditto.
        * i960/i960.c: Ditto.
        * ia64/ia64.c: Ditto.
        * m32r/m32r.c: Ditto.
        * m68hc11/m68hc11.c: Ditto.
        * m68k/m68k.c: Ditto.
        * m88k/m88k.c: Ditto.
        * mips/mips.c: Ditto.
        * ns32k/ns32k.c: Ditto.
        * pa/pa.c: Ditto.
        * pdp11/pdp11.c: Ditto.
        * romp/romp.c: Ditto.
        * rs6000/rs6000.c: Ditto.
        * sh/sh.c: Ditto.
        * sparc/sparc.c: Ditto.
        * vax/vax.c: Ditto.
        * we32k/we32k.c: Ditto.
        * doc/tm.texi: Update the manual to match.

From-SVN: r43831
This commit is contained in:
Stan Shebs 2001-07-07 01:07:22 +00:00 committed by Stan Shebs
parent 84fc8b47f3
commit f6897b10e1
48 changed files with 113 additions and 69 deletions

View File

@ -1,3 +1,47 @@
2001-07-06 Stan Shebs <shebs@apple.com>
* target.h (targetm): Rename global from "target", so as not to
conflict with local variables.
* c-decl.c: Ditto.
* c-typeck.c: Ditto.
* final.c: Ditto.
* tree.c: Ditto.
* cp/decl.c: Ditto.
* cp/decl2.c: Ditto.
* cp/typeck.c: Ditto.
* 1750a/1750a.c: Ditto.
* a29k/a29k.c: Ditto.
* arc/arc.c: Ditto.
* arm/arm.c: Ditto.
* avr/avr.c: Ditto.
* clipper/clipper.c: Ditto.
* convex/convex.c: Ditto.
* d30v/d30v.c: Ditto.
* dsp16xx/dsp16xx.c: Ditto.
* elxsi/elxsi.c: Ditto.
* fr30/fr30.c: Ditto.
* h8300/h8300.c: Ditto.
* i370/i370.c: Ditto.
* i386/i386.c: Ditto.
* i860/i860.c: Ditto.
* i960/i960.c: Ditto.
* ia64/ia64.c: Ditto.
* m32r/m32r.c: Ditto.
* m68hc11/m68hc11.c: Ditto.
* m68k/m68k.c: Ditto.
* m88k/m88k.c: Ditto.
* mips/mips.c: Ditto.
* ns32k/ns32k.c: Ditto.
* pa/pa.c: Ditto.
* pdp11/pdp11.c: Ditto.
* romp/romp.c: Ditto.
* rs6000/rs6000.c: Ditto.
* sh/sh.c: Ditto.
* sparc/sparc.c: Ditto.
* vax/vax.c: Ditto.
* we32k/we32k.c: Ditto.
* doc/tm.texi: Update the manual to match.
2001-07-06 Richard Henderson <rth@redhat.com>
* except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of

View File

@ -1404,7 +1404,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
if (DECL_P (olddecl))
DECL_MACHINE_ATTRIBUTES (newdecl)
= (*target.merge_decl_attributes) (olddecl, newdecl);
= (*targetm.merge_decl_attributes) (olddecl, newdecl);
if (TREE_CODE (newtype) == ERROR_MARK
|| TREE_CODE (oldtype) == ERROR_MARK)

View File

@ -206,7 +206,7 @@ common_type (t1, t2)
return t1;
/* Merge the attributes. */
attributes = (*target.merge_type_attributes) (t1, t2);
attributes = (*targetm.merge_type_attributes) (t1, t2);
/* Treat an enum type as the unsigned integer type of the same width. */
@ -484,7 +484,7 @@ comptypes (type1, type2)
return 1;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
if (! (attrval = (*target.comp_type_attributes) (t1, t2)))
if (! (attrval = (*targetm.comp_type_attributes) (t1, t2)))
return 0;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */

View File

@ -56,7 +56,7 @@ static void output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -100,7 +100,7 @@ int a29k_compare_fp_p;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Returns 1 if OP is a 8-bit constant. */

View File

@ -148,7 +148,7 @@ static rtx alpha_emit_xfloating_compare
/* Initialize the GCC target structure. */
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Parse target option strings. */

View File

@ -99,7 +99,7 @@ static void arc_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_VALID_DECL_ATTRIBUTE
#define TARGET_VALID_DECL_ATTRIBUTE arc_valid_decl_attribute
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called by OVERRIDE_OPTIONS to initialize various things. */

View File

@ -148,7 +148,7 @@ static void arm_set_default_type_attributes PARAMS ((tree));
#undef TARGET_SET_DEFAULT_TYPE_ATTRIBUTES
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES arm_set_default_type_attributes
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Obstack for minipool constant handling. */
static struct obstack minipool_obstack;

View File

@ -183,7 +183,7 @@ int avr_case_values_threshold = 30000;
#undef TARGET_VALID_TYPE_ATTRIBUTE
#define TARGET_VALID_TYPE_ATTRIBUTE avr_valid_type_attribute
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
void
avr_override_options ()

View File

@ -195,7 +195,7 @@ static int c4x_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
#undef TARGET_VALID_TYPE_ATTRIBUTE
#define TARGET_VALID_TYPE_ATTRIBUTE c4x_valid_type_attribute_p
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called to register all of our global variables with the garbage
collector. */

View File

@ -55,7 +55,7 @@ static int frame_size;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE clipper_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Compute size of a clipper stack frame where 'lsize' is the required
space for local variables. */

View File

@ -73,7 +73,7 @@ static void convex_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE convex_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -87,7 +87,7 @@ enum reg_class reg_class_from_letter[256];
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE d30v_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
sense on a particular target machine. You can define a macro

View File

@ -155,7 +155,7 @@ static void dsp16xx_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE dsp16xx_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
int
hard_regno_mode_ok (regno, mode)

View File

@ -47,7 +47,7 @@ static void elxsi_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE elxsi_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -139,7 +139,7 @@ static struct fr30_frame_info zero_frame_info;
/* Initialize the GCC target structure. */
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Returns the number of bytes offset between FROM_REG and TO_REG
for the current function. As a side effect it fills in the

View File

@ -105,7 +105,7 @@ const char *h8_push_op, *h8_pop_op, *h8_mov_op;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE h8300_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Initialize various cpu specific globals at start up. */

View File

@ -294,7 +294,7 @@ static const unsigned char ebcasc[256] =
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i370_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Map characters from one character set to another.
C is the character to be translated. */

View File

@ -631,7 +631,7 @@ static int ix86_comp_type_attributes PARAMS ((tree, tree));
# define TARGET_ASM_FUNCTION_PROLOGUE ix86_osf_output_function_prologue
#endif
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
sense on a particular target machine. You can define a macro

View File

@ -70,7 +70,7 @@ rtx i860_compare_op0, i860_compare_op1;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i860_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return non-zero if this pattern, can be evaluated safely, even if it
was not asked for. */

View File

@ -98,7 +98,7 @@ static int ret_label = 0;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE i960_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Initialize variables before compiling any files. */

View File

@ -149,7 +149,7 @@ static void ia64_function_epilogue PARAMS((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE ia64_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return 1 if OP is a valid operand for the MEM of a CALL insn. */

View File

@ -76,7 +76,7 @@ static void m32r_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE m32r_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called by OVERRIDE_OPTIONS to initialize various things. */

View File

@ -213,7 +213,7 @@ static int nb_soft_regs;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE m68hc11_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
int
m68hc11_override_options ()

View File

@ -86,7 +86,7 @@ int m68k_last_compare_had_fp_operands;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE m68k_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
sense on a particular target machine. You can define a macro

View File

@ -72,7 +72,7 @@ static void m88k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE m88k_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Determine what instructions are needed to manufacture the integer VALUE
in the given MODE. */

View File

@ -142,7 +142,7 @@ static int mcore_valid_decl_attribute PARAMS ((tree, tree,
#undef TARGET_VALID_DECL_ATTRIBUTE
#define TARGET_VALID_DECL_ATTRIBUTE mcore_valid_decl_attribute
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Adjust the stack and return the number of bytes taken to do it. */
static void

View File

@ -446,7 +446,7 @@ enum reg_class mips_char_to_class[256] =
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE mips_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return truth value of whether OP can be used as an operands
where a register or 16 bit unsigned integer is needed. */

View File

@ -68,7 +68,7 @@ static int out_of_line_epilogue;
/* Initialize the GCC target structure. */
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Indicate this file was compiled by gcc and what optimization
level was used. */

View File

@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */
/* Initialize the GCC target structure. */
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
void
asm_file_start (file)

View File

@ -77,7 +77,7 @@ static void ns32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE ns32k_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -116,7 +116,7 @@ int n_deferred_plabels = 0;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
void
override_options ()

View File

@ -61,7 +61,7 @@ static void pdp11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE pdp11_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Nonzero if OP is a valid second operand for an arithmetic insn. */

View File

@ -127,7 +127,7 @@ int pj_stuff_on_line;
/* Initialize the GCC target structure. */
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* printf to the asm_out_file, with special format control characters
for decoding operands.

View File

@ -59,7 +59,7 @@ static void romp_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE romp_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Return 1 if the insn using CC0 set by INSN does not contain
any unsigned tests applied to the condition codes.

View File

@ -175,7 +175,7 @@ static char alt_reg_names[][8] =
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE rs6000_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Override command line options. Mostly we process the processor
type and sometimes adjust other TARGET_ options. */

View File

@ -163,7 +163,7 @@ static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Print the operand address in x to the stream. */

View File

@ -192,7 +192,7 @@ enum processor_type sparc_cpu;
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE sparc_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Validate and override various options, and do some machine dependent
initialization. */

View File

@ -86,7 +86,7 @@ static int v850_interrupt_p = FALSE;
#undef TARGET_VALID_DECL_ATTRIBUTE
#define TARGET_VALID_DECL_ATTRIBUTE v850_valid_decl_attribute
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Sometimes certain combinations of command options do not make
sense on a particular target machine. You can define a macro

View File

@ -42,7 +42,7 @@ static void vax_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE vax_output_function_prologue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -44,7 +44,7 @@ static void we32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE we32k_output_function_epilogue
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
/* Generate the assembly code for function entry. FILE is a stdio
stream to output the code to. SIZE is an int: how many units of

View File

@ -3484,7 +3484,7 @@ duplicate_decls (newdecl, olddecl)
/* Copy all the DECL_... slots specified in the new decl
except for any that we copy here from the old type. */
DECL_MACHINE_ATTRIBUTES (newdecl)
= (*target.merge_decl_attributes) (olddecl, newdecl);
= (*targetm.merge_decl_attributes) (olddecl, newdecl);
if (TREE_CODE (newdecl) == TEMPLATE_DECL)
{

View File

@ -2456,16 +2456,16 @@ import_export_class (ctype)
if (CLASSTYPE_INTERFACE_ONLY (ctype))
return;
if ((*target.valid_type_attribute) (ctype,
TYPE_ATTRIBUTES (ctype),
get_identifier ("dllimport"),
NULL_TREE)
if ((*targetm.valid_type_attribute) (ctype,
TYPE_ATTRIBUTES (ctype),
get_identifier ("dllimport"),
NULL_TREE)
&& lookup_attribute ("dllimport", TYPE_ATTRIBUTES (ctype)))
import_export = -1;
else if ((*target.valid_type_attribute) (ctype,
TYPE_ATTRIBUTES (ctype),
get_identifier ("dllexport"),
NULL_TREE)
else if ((*targetm.valid_type_attribute) (ctype,
TYPE_ATTRIBUTES (ctype),
get_identifier ("dllexport"),
NULL_TREE)
&& lookup_attribute ("dllexport", TYPE_ATTRIBUTES (ctype)))
import_export = 1;

View File

@ -212,7 +212,7 @@ qualify_type_recursive (t1, t2)
tree b1;
int type_quals;
tree tgt;
tree attributes = (*target.merge_type_attributes) (t1, t2);
tree attributes = (*targetm.merge_type_attributes) (t1, t2);
if (TREE_CODE (tt1) == OFFSET_TYPE)
{
@ -343,7 +343,7 @@ type_after_usual_arithmetic_conversions (t1, t2)
/* In what follows, we slightly generalize the rules given in [expr]
so as to deal with `long long'. First, merge the attributes. */
attributes = (*target.merge_type_attributes) (t1, t2);
attributes = (*targetm.merge_type_attributes) (t1, t2);
/* If only one is real, use it as the result. */
if (code1 == REAL_TYPE && code2 != REAL_TYPE)
@ -549,7 +549,7 @@ common_type (t1, t2)
return type_after_usual_arithmetic_conversions (t1, t2);
/* Merge the attributes. */
attributes = (*target.merge_type_attributes) (t1, t2);
attributes = (*targetm.merge_type_attributes) (t1, t2);
/* Treat an enum type as the unsigned integer type of the same width. */
@ -999,7 +999,7 @@ comptypes (t1, t2, strict)
if (strict & COMPARE_NO_ATTRIBUTES)
attrval = 1;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
else if (! (attrval = (*target.comp_type_attributes) (t1, t2)))
else if (! (attrval = (*targetm.comp_type_attributes) (t1, t2)))
return 0;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */

View File

@ -55,8 +55,8 @@ through the macros defined in the @file{.h} file.
@cindex target hooks
@cindex target functions
@deftypevar {struct gcc_target} target
The target @file{.c} file must define the global @code{target} variable
@deftypevar {struct gcc_target} targetm
The target @file{.c} file must define the global @code{targetm} variable
which contains pointers to functions and data relating to the target
machine. The variable is declared in @file{target.h};
@file{target-def.h} defines the macro @code{TARGET_INITIALIZER} which is
@ -72,7 +72,7 @@ macros for which the default definition is inappropriate. For example:
#undef TARGET_VALID_TYPE_ATTRIBUTE
#define TARGET_VALID_TYPE_ATTRIBUTE @var{machine}_valid_type_attribute_p
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
@end smallexample
@end deftypevar

View File

@ -1630,7 +1630,7 @@ final_start_function (first, file, optimize)
}
/* First output the function prologue: code to set up the stack frame. */
(*target.asm_out.function_prologue) (file, get_frame_size ());
(*targetm.asm_out.function_prologue) (file, get_frame_size ());
/* If the machine represents the prologue as RTL, the profiling code must
be emitted when NOTE_INSN_PROLOGUE_END is scanned. */
@ -1773,7 +1773,7 @@ final_end_function (first, file, optimize)
/* Finally, output the function epilogue:
code to restore the stack frame and return to the caller. */
(*target.asm_out.function_epilogue) (file, get_frame_size ());
(*targetm.asm_out.function_epilogue) (file, get_frame_size ());
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)

View File

@ -33,9 +33,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
includes target.h and target-def.h, and overrides any inappropriate
defaults by undefining the relevant macro and defining a suitable
replacement. That file should then contain the definition of
"target" like so:
"targetm" like so:
struct gcc_target target = TARGET_INITIALIZER;
struct gcc_target targetm = TARGET_INITIALIZER;
Doing things this way allows us to bring together everything that
defines a target to GCC. By supplying a default that is
@ -83,4 +83,4 @@ struct gcc_target
void (* set_default_type_attributes) PARAMS ((tree type));
};
extern struct gcc_target target;
extern struct gcc_target targetm;

View File

@ -435,7 +435,7 @@ make_node (code)
/* Default to no attributes for type, but let target change that. */
TYPE_ATTRIBUTES (t) = NULL_TREE;
(*target.set_default_type_attributes) (t);
(*targetm.set_default_type_attributes) (t);
/* We have not yet computed the alias set for this type. */
TYPE_ALIAS_SET (t) = -1;
@ -2759,8 +2759,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
{
tree decl_attrs = DECL_MACHINE_ATTRIBUTES (decl);
if ((*target.valid_decl_attribute) (decl, decl_attrs, attr_name,
attr_args))
if ((*targetm.valid_decl_attribute) (decl, decl_attrs, attr_name,
attr_args))
{
tree attr = lookup_attribute (IDENTIFIER_POINTER (attr_name),
decl_attrs);
@ -2783,8 +2783,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
}
type_attrs = TYPE_ATTRIBUTES (type);
if ((*target.valid_type_attribute) (type, type_attrs, attr_name,
attr_args))
if ((*targetm.valid_type_attribute) (type, type_attrs, attr_name,
attr_args))
{
tree attr = lookup_attribute (IDENTIFIER_POINTER (attr_name),
type_attrs);
@ -2818,8 +2818,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
by putting the attribute on the function type. */
else if (POINTER_TYPE_P (type)
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE
&& (*target.valid_type_attribute) (TREE_TYPE (type), type_attrs,
attr_name, attr_args))
&& (*targetm.valid_type_attribute) (TREE_TYPE (type), type_attrs,
attr_name, attr_args))
{
tree inner_type = TREE_TYPE (type);
tree inner_attrs = TYPE_ATTRIBUTES (inner_type);