This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] config: Fix some comments mentioning deprecated macros.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Jan 2004 18:17:09 -0500 (EST)
- Subject: [patch] config: Fix some comments mentioning deprecated macros.
Hi,
Attached is a patch to fix some comments mentioning deprecated macros.
I didn't bother writing a precise ChangeLog entry for each file.
Committed as obvious.
Kazu Hirata
2004-01-30 Kazu Hirata <kazu@cs.umass.edu>
* config/alpha/alpha.c: Remove mentions of deprecates macros
in comments, remove some target-independent comments about target
macros, and/or add minimal function comments for target hook
implementations.
* config/avr/avr.c: Likewise.
* config/ia64/ia64.h: Likewise.
* config/ip2k/ip2k.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/m32r/m32r.h: Likewise.
* config/m68hc11/m68hc11.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/mmix/mmix.c: Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pdp11/pdp11.c: Likewise.
* config/rs6000/rs6000.h: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/sh.h: Likewise.
* config/sparc/sparc.c: Likewise.
* config/sparc/sparc.h: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
Index: alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.345
diff -u -r1.345 alpha.c
--- alpha/alpha.c 21 Jan 2004 15:52:47 -0000 1.345
+++ alpha/alpha.c 30 Jan 2004 22:58:58 -0000
@@ -6240,7 +6240,7 @@
if (TARGET_ABI_UNICOSMK)
std_expand_builtin_va_start (valist, nextarg);
- /* For Unix, SETUP_INCOMING_VARARGS moves the starting address base
+ /* For Unix, TARGET_SETUP_INCOMING_VARARGS moves the starting address base
up by 48, storing fp arg registers in the first 48 bytes, and the
integer arg registers in the next 48 bytes. This is only done,
however, if any integer registers need to be stored.
Index: avr/avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.109
diff -u -r1.109 avr.c
--- avr/avr.c 25 Jan 2004 17:10:02 -0000 1.109
+++ avr/avr.c 30 Jan 2004 22:59:00 -0000
@@ -5361,6 +5361,8 @@
return "";
}
+/* Worker function for TARGET_ASM_CONSTRUCTOR. */
+
static void
avr_asm_out_ctor (rtx symbol, int priority)
{
@@ -5368,12 +5370,16 @@
default_ctor_section_asm_out_constructor (symbol, priority);
}
+/* Worker function for TARGET_ASM_DESTRUCTOR. */
+
static void
avr_asm_out_dtor (rtx symbol, int priority)
{
fputs ("\t.global __do_global_dtors\n", asm_out_file);
default_dtor_section_asm_out_destructor (symbol, priority);
}
+
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
static bool
avr_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
Index: ia64/ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.164
diff -u -r1.164 ia64.h
--- ia64/ia64.h 26 Jan 2004 15:32:42 -0000 1.164
+++ ia64/ia64.h 30 Jan 2004 22:59:01 -0000
@@ -1422,9 +1422,6 @@
/* How Large Values are Returned */
-/* If you define this macro to be 0, then the conventions used for structure
- and union return values are decided by the `RETURN_IN_MEMORY' macro. */
-
#define DEFAULT_PCC_STRUCT_RETURN 0
Index: ip2k/ip2k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ip2k/ip2k.c,v
retrieving revision 1.30
diff -u -r1.30 ip2k.c
--- ip2k/ip2k.c 25 Jan 2004 17:14:38 -0000 1.30
+++ ip2k/ip2k.c 30 Jan 2004 22:59:03 -0000
@@ -6196,11 +6196,15 @@
&& unsigned_condition (GET_CODE (op)) == GET_CODE (op));
}
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
+
static bool
ip2k_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
return (TYPE_MODE (type) == BLKmode) ? int_size_in_bytes (type) > 8 : 0;
}
+
+/* Worker function for TARGET_SETUP_INCOMING_VARARGS. */
static void
ip2k_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
Index: iq2000/iq2000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/iq2000/iq2000.c,v
retrieving revision 1.7
diff -u -r1.7 iq2000.c
--- iq2000/iq2000.c 27 Jan 2004 19:20:02 -0000 1.7
+++ iq2000/iq2000.c 30 Jan 2004 22:59:05 -0000
@@ -3284,12 +3284,16 @@
return NULL_RTX;
}
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
+
static bool
iq2000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
return ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
|| (int_size_in_bytes (type) == -1));
}
+
+/* Worker function for TARGET_SETUP_INCOMING_VARARGS. */
static void
iq2000_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
Index: m32r/m32r.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.h,v
retrieving revision 1.102
diff -u -r1.102 m32r.h
--- m32r/m32r.h 29 Jan 2004 02:06:02 -0000 1.102
+++ m32r/m32r.h 30 Jan 2004 22:59:06 -0000
@@ -1158,7 +1158,7 @@
/* ??? What about r1 in DI/DF values. */
#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
-/* Tell GCC to use RETURN_IN_MEMORY. */
+/* Tell GCC to use TARGET_RETURN_IN_MEMORY. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Function entry and exit. */
Index: m68hc11/m68hc11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.c,v
retrieving revision 1.92
diff -u -r1.92 m68hc11.c
--- m68hc11/m68hc11.c 25 Jan 2004 17:35:42 -0000 1.92
+++ m68hc11/m68hc11.c 30 Jan 2004 22:59:08 -0000
@@ -5504,6 +5504,8 @@
}
+/* Worker function for TARGET_ASM_FILE_START. */
+
static void
m68hc11_file_start (void)
{
@@ -5513,6 +5515,8 @@
}
+/* Worker function for TARGET_ASM_CONSTRUCTOR. */
+
static void
m68hc11_asm_out_constructor (rtx symbol, int priority)
{
@@ -5520,12 +5524,16 @@
fprintf (asm_out_file, "\t.globl\t__do_global_ctors\n");
}
+/* Worker function for TARGET_ASM_DESTRUCTOR. */
+
static void
m68hc11_asm_out_destructor (rtx symbol, int priority)
{
default_dtor_section_asm_out_destructor (symbol, priority);
fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n");
}
+
+/* Worker function for TARGET_STRUCT_VALUE_RTX. */
static rtx
m68hc11_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
Index: mcore/mcore.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mcore/mcore.c,v
retrieving revision 1.57
diff -u -r1.57 mcore.c
--- mcore/mcore.c 29 Jan 2004 02:19:44 -0000 1.57
+++ mcore/mcore.c 30 Jan 2004 22:59:09 -0000
@@ -1949,7 +1949,7 @@
/* Code to generate prologue and epilogue sequences. */
static int number_of_regs_before_varargs;
-/* Set by SETUP_INCOMING_VARARGS to indicate to prolog that this is
+/* Set by TARGET_SETUP_INCOMING_VARARGS to indicate to prolog that this is
for a varargs function. */
static int current_function_anonymous_args;
Index: mmix/mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.56
diff -u -r1.56 mmix.c
--- mmix/mmix.c 25 Jan 2004 17:28:19 -0000 1.56
+++ mmix/mmix.c 30 Jan 2004 22:59:11 -0000
@@ -792,9 +792,9 @@
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
tree func)
{
- /* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM,
- (i.e. pass location of structure to return as invisible first
- argument) you need to tweak this code too. */
+ /* If you define TARGET_STRUCT_VALUE_RTX that returns 0 (i.e. pass
+ location of structure to return as invisible first argument), you
+ need to tweak this code too. */
const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM];
if (delta >= 0 && delta < 65536)
Index: mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.62
diff -u -r1.62 mn10300.c
--- mn10300/mn10300.c 25 Jan 2004 20:17:44 -0000 1.62
+++ mn10300/mn10300.c 30 Jan 2004 22:59:12 -0000
@@ -1418,6 +1418,8 @@
abort ();
}
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
+
static bool
mn10300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
Index: pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.239
diff -u -r1.239 pa.c
--- pa/pa.c 28 Jan 2004 01:37:28 -0000 1.239
+++ pa/pa.c 30 Jan 2004 22:59:15 -0000
@@ -9096,12 +9096,16 @@
}
}
+/* Worker function for TARGET_STRUCT_VALUE_RTX. */
+
static rtx
pa_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
int incoming ATTRIBUTE_UNUSED)
{
return gen_rtx_REG (Pmode, PA_STRUCT_VALUE_REGNUM);
}
+
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
bool
pa_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
Index: pdp11/pdp11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pdp11/pdp11.c,v
retrieving revision 1.33
diff -u -r1.33 pdp11.c
--- pdp11/pdp11.c 26 Jan 2004 18:17:58 -0000 1.33
+++ pdp11/pdp11.c 30 Jan 2004 22:59:16 -0000
@@ -1700,6 +1700,8 @@
}
}
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
+
static bool
pdp11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
Index: rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.308
diff -u -r1.308 rs6000.h
--- rs6000/rs6000.h 27 Jan 2004 11:15:23 -0000 1.308
+++ rs6000/rs6000.h 30 Jan 2004 22:59:18 -0000
@@ -1645,7 +1645,7 @@
/* DRAFT_V4_STRUCT_RET defaults off. */
#define DRAFT_V4_STRUCT_RET 0
-/* Let RETURN_IN_MEMORY control what happens. */
+/* Let TARGET_RETURN_IN_MEMORY control what happens. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Mode of stack savearea.
Index: sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.250
diff -u -r1.250 sh.c
--- sh/sh.c 23 Jan 2004 15:29:09 -0000 1.250
+++ sh/sh.c 30 Jan 2004 22:59:22 -0000
@@ -92,7 +92,7 @@
interrupted. */
int pragma_nosave_low_regs;
-/* This is used for communication between SETUP_INCOMING_VARARGS and
+/* This is used for communication between TARGET_SETUP_INCOMING_VARARGS and
sh_expand_prologue. */
int current_function_anonymous_args;
@@ -6520,10 +6520,6 @@
: ROUND_ADVANCE (GET_MODE_SIZE (mode)))));
}
-/* If the structure value address is not passed in a register, define
- `STRUCT_VALUE' as an expression returning an RTX for the place
- where the address is passed. If it returns 0, the address is
- passed as an "invisible" first argument. */
/* The Renesas calling convention doesn't quite fit into this scheme since
the address is passed like an invisible argument, but one that is always
passed in memory. */
@@ -6534,6 +6530,8 @@
return 0;
return gen_rtx_REG (Pmode, 2);
}
+
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
static bool
sh_return_in_memory (tree type, tree fndecl)
Index: sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.231
diff -u -r1.231 sh.h
--- sh/sh.h 25 Jan 2004 20:23:09 -0000 1.231
+++ sh/sh.h 30 Jan 2004 22:59:24 -0000
@@ -1126,7 +1126,8 @@
#define STATIC_CHAIN_REGNUM (TARGET_SH5 ? 1 : 3)
/* Don't default to pcc-struct-return, because we have already specified
- exactly how to return structures in the RETURN_IN_MEMORY macro. */
+ exactly how to return structures in the TARGET_RETURN_IN_MEMORY
+ target hook. */
#define DEFAULT_PCC_STRUCT_RETURN 0
Index: sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.281
diff -u -r1.281 sparc.c
--- sparc/sparc.c 30 Jan 2004 14:46:42 -0000 1.281
+++ sparc/sparc.c 30 Jan 2004 22:59:28 -0000
@@ -4852,7 +4852,7 @@
cum->libcall_p = fntype == 0;
}
-/* Handle the PROMOTE_PROTOTYPES macro.
+/* Handle the TARGET_PROMOTE_PROTOTYPES target hook.
When a prototype says `char' or `short', really pass an `int'. */
static bool
@@ -4861,7 +4861,7 @@
return TARGET_ARCH32 ? true : false;
}
-/* Handle the STRICT_ARGUMENT_NAMING macro. */
+/* Handle the TARGET_STRICT_ARGUMENT_NAMING target hook. */
static bool
sparc_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
@@ -4870,7 +4870,7 @@
return TARGET_V9 ? true : false;
}
-/* Handle the RETURN_IN_MEMORY macro.
+/* Handle the TARGET_RETURN_IN_MEMORY target hook.
Specify whether to return the return value in memory. */
static bool
@@ -4887,7 +4887,7 @@
&& (unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 32));
}
-/* Handle the STRUCT_VALUE macro.
+/* Handle the TARGET_STRUCT_VALUE target hook.
Return where to find the structure return value address. */
static rtx
Index: sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.239
diff -u -r1.239 sparc.h
--- sparc/sparc.h 30 Jan 2004 14:46:43 -0000 1.239
+++ sparc/sparc.h 30 Jan 2004 22:59:30 -0000
@@ -748,10 +748,6 @@
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
(MODE) = word_mode;
-/* Define this macro if the promotion described by PROMOTE_MODE
- should _only_ be performed for outgoing function arguments or
- function return values, as specified by PROMOTE_FUNCTION_ARGS
- and PROMOTE_FUNCTION_RETURN, respectively. */
/* This is only needed for TARGET_ARCH64, but since PROMOTE_MODE is a no-op
for TARGET_ARCH32 this is ok. Otherwise we'd need to add a runtime test
for this value. For TARGET_ARCH64 we need it, as we don't have instructions
Index: stormy16/stormy16.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.c,v
retrieving revision 1.53
diff -u -r1.53 stormy16.c
--- stormy16/stormy16.c 29 Jan 2004 01:51:28 -0000 1.53
+++ stormy16/stormy16.c 30 Jan 2004 22:59:31 -0000
@@ -1420,25 +1420,8 @@
emit_move_insn (reg_addr_mem, reg_fnaddr);
}
-/* Create an RTX representing the place where a function returns a
- value of data type VALTYPE. VALTYPE is a tree node representing a
- data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode
- used to represent that type. On many machines, only the mode is
- relevant. (Actually, on most machines, scalar values are returned
- in the same place regardless of mode).
+/* Worker function for FUNCTION_VALUE. */
- If `TARGET_PROMOTE_FUNCTION_RETURN' is defined to return true, you
- must apply the same promotion rules specified in `PROMOTE_MODE' if
- VALTYPE is a scalar type.
-
- If the precise function being called is known, FUNC is a tree node
- (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it
- possible to use a different value-returning convention for specific
- functions when all their calls are known.
-
- `FUNCTION_VALUE' is not used for return vales with aggregate data types,
- because these are returned in another way. See `STRUCT_VALUE_REGNUM' and
- related macros. */
rtx
xstormy16_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
{
Index: xtensa/xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.47
diff -u -r1.47 xtensa.c
--- xtensa/xtensa.c 27 Jan 2004 20:24:59 -0000 1.47
+++ xtensa/xtensa.c 30 Jan 2004 22:59:33 -0000
@@ -3052,6 +3052,8 @@
}
}
+/* Worker function for TARGET_RETURN_IN_MEMORY. */
+
static bool
xtensa_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{