diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d765745266da5a5e01fab0894f8198fbfe9f9991..4cf58733372ab0554df03ab44a6fe21c164072c3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2001-10-15 Neil Booth <neil@daikokuya.demon.co.uk> + + * system.h: Poison old unused target macros. + * config/dsp16xx.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. + * config/stormy16/stormy16.c: Update references to obsolete macros. + * config/stormy16/stormy16.h: Similarly. + * config/stormy16/stormy16.md: Similarly. + * config/cris/cris.h: Similarly. + 2001-10-15 Neil Booth <neil@daikokuya.demon.co.uk> * cpplib.c (struct pragma_entry): Store the name as a hashnode. diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 8e62c4119fec2143f575ed6e06362a43aaa7199c..5795358f03d22a988dac525dcc9b211d893fa835 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -509,8 +509,8 @@ extern int target_flags; Old comment: (2.1: still valid in 2.7.2?) Note that to make this macro affect the alignment of stack locals, a fix was required, and special precautions when handling - the stack pointer in various other macros (FUNCTION_PROLOGUE et al) - were required. See file "function.c". If you would just define + the stack pointer in various other macros (TARGET_ASM_FUNCTION_PROLOGUE + et al) were required. See file "function.c". If you would just define this macro, it would only affect the builtin alloca and variable local data (non-ANSI, non-K&R, Gnu C extension). */ #define STACK_BOUNDARY \ diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h index dae1d742c493dfe905fdac23675afe777f93b123..4ad062ee89ce850ef030db468637c0948904f075 100644 --- a/gcc/config/dsp16xx/dsp16xx.h +++ b/gcc/config/dsp16xx/dsp16xx.h @@ -1736,10 +1736,6 @@ const_section () \ (OUTPUT) = (char *) alloca (strlen (NAME) + 11); \ ASM_GENERATE_INTERNAL_LABEL (OUTPUT, temp, LABELNO); \ } while (0) - -#define ASM_OPEN_PAREN "(" -#define ASM_CLOSE_PAREN ")" - /* OUTPUT OF UNINITIALIZED VARIABLES */ diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 6ecf8ae819e9a87c7150d9e9fa4eaadb9e772401..5847e2ad086d3aaa80266868cc6e11a87de60268 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -908,12 +908,13 @@ emit_addhi3_postreload (dest, src0, src1) return insn; } -/* Called after register allocation to add any instructions needed for the - prologue. Using a prologue insn is favored compared to putting all of the - instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler - to intermix instructions with the saves of the caller saved registers. In - some cases, it might be necessary to emit a barrier instruction as the last - insn to prevent such scheduling. +/* Called after register allocation to add any instructions needed for + the prologue. Using a prologue insn is favored compared to putting + all of the instructions in the TARGET_ASM_FUNCTION_PROLOGUE macro, + since it allows the scheduler to intermix instructions with the + saves of the caller saved registers. In some cases, it might be + necessary to emit a barrier instruction as the last insn to prevent + such scheduling. Also any insns generated here should have RTX_FRAME_RELATED_P(insn) = 1 so that the debug info generation code can handle them properly. */ @@ -1003,12 +1004,13 @@ direct_return () && stormy16_compute_stack_layout ().frame_size == 0); } -/* Called after register allocation to add any instructions needed for the - epilogue. Using a epilogue insn is favored compared to putting all of the - instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler - to intermix instructions with the saves of the caller saved registers. In - some cases, it might be necessary to emit a barrier instruction as the last - insn to prevent such scheduling. */ +/* Called after register allocation to add any instructions needed for + the epilogue. Using a epilogue insn is favored compared to putting + all of the instructions in the TARGET_ASM_FUNCTION_PROLOGUE macro, + since it allows the scheduler to intermix instructions with the + saves of the caller saved registers. In some cases, it might be + necessary to emit a barrier instruction as the last insn to prevent + such scheduling. */ void stormy16_expand_epilogue () diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h index a0a3961b7b635e9de1108d866c269919ecdc5a51..9a4e13917ae9690fd8286c27b7a64a48413f6cb3 100644 --- a/gcc/config/stormy16/stormy16.h +++ b/gcc/config/stormy16/stormy16.h @@ -2421,10 +2421,11 @@ typedef int CUMULATIVE_ARGS; the return address. Hence returning from FUNCTION will return to whoever called the current `thunk'. - The effect must be as if FUNCTION had been called directly with the adjusted - first argument. This macro is responsible for emitting all of the code for - a thunk function; `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' are not - invoked. + The effect must be as if @var{function} had been called directly + with the adjusted first argument. This macro is responsible for + emitting all of the code for a thunk function; + TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE are + not invoked. The THUNK_FNDECL is redundant. (DELTA and FUNCTION have already been extracted from it.) It might possibly be useful on some targets, but @@ -2564,10 +2565,11 @@ typedef int CUMULATIVE_ARGS; code to call function `__bb_trace_ret'. The assembler code should only be output if the global compile flag `profile_block_flag' == 2. This macro has to be used at every place where code for - returning from a function is generated (e.g. `FUNCTION_EPILOGUE'). - Although you have to write the definition of `FUNCTION_EPILOGUE' - as well, you have to define this macro to tell the compiler, that - the proper call to `__bb_trace_ret' is produced. */ + returning from a function is generated + (e.g. `TARGET_ASM_FUNCTION_EPILOGUE'). Although you have to write + the definition of `TARGET_ASM_FUNCTION_EPILOGUE' as well, you have + to define this macro to tell the compiler, that the proper call to + `__bb_trace_ret' is produced. */ /* #define FUNCTION_BLOCK_PROFILER_EXIT(FILE) */ /* A C statement or compound statement to save all registers, which may be @@ -2576,17 +2578,19 @@ typedef int CUMULATIVE_ARGS; the assembler code can be concatenated with the string ID, to obtain a unique lable name. - Registers or condition codes clobbered by `FUNCTION_PROLOGUE' or - `FUNCTION_EPILOGUE' must be saved in the macros `FUNCTION_BLOCK_PROFILER', + Registers or condition codes clobbered by + `TARGET_ASM_FUNCTION_PROLOGUE' or `TARGET_ASM_FUNCTION_EPILOGUE' + must be saved in the macros `FUNCTION_BLOCK_PROFILER', `FUNCTION_BLOCK_PROFILER_EXIT' and `BLOCK_PROFILER' prior calling - `__bb_init_trace_func', `__bb_trace_ret' and `__bb_trace_func' respectively. */ + `__bb_init_trace_func', `__bb_trace_ret' and `__bb_trace_func' + respectively. */ /* #define MACHINE_STATE_SAVE(ID) */ /* A C statement or compound statement to restore all registers, including condition codes, saved by `MACHINE_STATE_SAVE'. - Registers or condition codes clobbered by `FUNCTION_PROLOGUE' or - `FUNCTION_EPILOGUE' must be restored in the macros + Registers or condition codes clobbered by `TARGET_ASM_FUNCTION_PROLOGUE' or + `TARGET_ASM_FUNCTION_EPILOGUE' must be restored in the macros `FUNCTION_BLOCK_PROFILER', `FUNCTION_BLOCK_PROFILER_EXIT' and `BLOCK_PROFILER' after calling `__bb_init_trace_func', `__bb_trace_ret' and `__bb_trace_func' respectively. */ @@ -2720,7 +2724,8 @@ typedef int CUMULATIVE_ARGS; stack slot. This default is right for most machines. The exceptions are machines where it is impossible to execute instructions in the stack area. On such machines, you may have to implement a separate stack, using this - macro in conjunction with `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE'. + macro in conjunction with `TARGET_ASM_FUNCTION_PROLOGUE' and + `TARGET_ASM_FUNCTION_EPILOGUE'. FP points to a data structure, a `struct function', which describes the compilation status of the immediate containing function of the function @@ -4875,8 +4880,8 @@ do { \ To support optional call frame debugging information, you must also define `INCOMING_RETURN_ADDR_RTX' and either set `RTX_FRAME_RELATED_P' on the prologue insns if you use RTL for the prologue, or call `dwarf2out_def_cfa' - and `dwarf2out_reg_save' as appropriate from `FUNCTION_PROLOGUE' if you - don't. + and `dwarf2out_reg_save' as appropriate from `TARGET_ASM_FUNCTION_PROLOGUE' + if you don't. Defined in svr4.h. */ /* #define DWARF2_DEBUGGING_INFO */ @@ -5210,25 +5215,6 @@ do { \ #pragma pack(push,<n>) and #pragma pack(pop). */ /* HANDLE_PRAGMA_PACK_PUSH_POP 1 */ -/* If defined, a C expression whose value is nonzero if IDENTIFIER with - arguments ARGS is a valid machine specific attribute for DECL. The - attributes in ATTRIBUTES have previously been assigned to DECL. */ -/* #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) */ - -/* If defined, a C expression whose value is nonzero if IDENTIFIER with - arguments ARGS is a valid machine specific attribute for TYPE. The - attributes in ATTRIBUTES have previously been assigned to TYPE. */ -/* #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) */ - -/* 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 diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index ae3b76a44a871dcb62a950087de68df4078e77b9..a27d1bcce1b33e349bb6c1d3b66fe273062894fb 100644 --- a/gcc/config/stormy16/stormy16.md +++ b/gcc/config/stormy16/stormy16.md @@ -917,12 +917,13 @@ ;; :: ;; :::::::::::::::::::: -;; Called after register allocation to add any instructions needed for the -;; prologue. Using a prologue insn is favored compared to putting all of the -;; instructions in the FUNCTION_PROLOGUE macro, since it allows the scheduler -;; to intermix instructions with the saves of the caller saved registers. In -;; some cases, it might be necessary to emit a barrier instruction as the last -;; insn to prevent such scheduling. +;; Called after register allocation to add any instructions needed for +;; the prologue. Using a prologue insn is favored compared to putting +;; all of the instructions in the TARGET_ASM_FUNCTION_PROLOGUE macro, +;; since it allows the scheduler to intermix instructions with the +;; saves of the caller saved registers. In some cases, it might be +;; necessary to emit a barrier instruction as the last insn to prevent +;; such scheduling. (define_expand "prologue" [(const_int 1)] "" @@ -932,12 +933,13 @@ DONE; }") -;; Called after register allocation to add any instructions needed for the -;; epilogue. Using a epilogue insn is favored compared to putting all of the -;; instructions in the FUNCTION_EPILOGUE macro, since it allows the scheduler -;; to intermix instructions with the restires of the caller saved registers. -;; In some cases, it might be necessary to emit a barrier instruction as the -;; first insn to prevent such scheduling. +;; Called after register allocation to add any instructions needed for +;; the epilogue. Using a epilogue insn is favored compared to putting +;; all of the instructions in the TARGET_ASM_FUNCTION_EPILOGUE macro, +;; since it allows the scheduler to intermix instructions with the +;; restires of the caller saved registers. In some cases, it might be +;; necessary to emit a barrier instruction as the first insn to +;; prevent such scheduling. (define_expand "epilogue" [(const_int 2)] "" diff --git a/gcc/system.h b/gcc/system.h index 97c021774c908f56dad11e3b6aaec3e576b593fb..55a9370aca4536c013737a7dcd57cd4e692a5edd 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -584,6 +584,16 @@ typedef union tree_node *tree; #undef calloc #undef strdup #pragma GCC poison malloc realloc calloc strdup + +/* Old target macros that have moved to the target hooks structure. */ + #pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \ + FUNCTION_PROLOGUE FUNCTION_EPILOGUE \ + FUNCTION_END_PROLOGUE FUNCTION_BEGIN_EPILOGUE \ + DECL_MACHINE_ATTRIBUTES COMP_TYPE_ATTRIBUTES INSERT_ATTRIBUTES \ + VALID_MACHINE_DECL_ATTRIBUTE VALID_MACHINE_TYPE_ATTRIBUTE \ + SET_DEFAULT_TYPE_ATTRIBUTES SET_DEFAULT_DECL_ATTRIBUTES \ + MERGE_MACHINE_TYPE_ATTRIBUTES MERGE_MACHINE_DECL_ATTRIBUTES \ + MD_INIT_BUILTINS MD_EXPAND_BUILTIN #endif /* IN_GCC */ /* Note: not all uses of the `index' token (e.g. variable names and