summaryrefslogtreecommitdiff
path: root/gcc/genattr.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-25 13:47:00 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-25 13:47:00 +0000
commit94b627ed98b3243ba963662a46ba451dc81064ae (patch)
treee18c3ceccb95e146da62dee5734307ce7271c2ea /gcc/genattr.c
parentdf9f2bb6b0b71b385db19ed35428347a5ccd75f1 (diff)
downloadgcc-94b627ed98b3243ba963662a46ba451dc81064ae.tar.gz
* genattr.c (gen_attr): Add prototype arguments for get_attr_*().
Remove unused prototype for `init_lengths'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattr.c')
-rw-r--r--gcc/genattr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 86c078f46de..35bc4b221bc 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -101,12 +101,14 @@ gen_attr (attr)
rtx attr;
{
char *p;
+ int is_const = GET_CODE (XEXP (attr, 2)) == CONST;
printf ("#define HAVE_ATTR_%s\n", XSTR (attr, 0));
/* If numeric attribute, don't need to write an enum. */
if (*XSTR (attr, 1) == '\0')
- printf ("extern int get_attr_%s ();\n", XSTR (attr, 0));
+ printf ("extern int get_attr_%s PROTO((%s));\n", XSTR (attr, 0),
+ (is_const ? "void" : "rtx"));
else
{
printf ("enum attr_%s {", XSTR (attr, 0));
@@ -128,15 +130,14 @@ gen_attr (attr)
}
printf ("};\n");
- printf ("extern enum attr_%s get_attr_%s ();\n\n",
- XSTR (attr, 0), XSTR (attr, 0));
+ printf ("extern enum attr_%s get_attr_%s PROTO((%s));\n\n",
+ XSTR (attr, 0), XSTR (attr, 0), (is_const ? "void" : "rtx"));
}
/* If `length' attribute, write additional function definitions and define
variables used by `insn_current_length'. */
if (! strcmp (XSTR (attr, 0), "length"))
{
- printf ("extern void init_lengths ();\n");
printf ("extern void shorten_branches PROTO((rtx));\n");
printf ("extern int insn_default_length PROTO((rtx));\n");
printf ("extern int insn_variable_length_p PROTO((rtx));\n");