diff options
author | Andreas Jaeger <aj@suse.de> | 2003-07-05 13:23:01 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2003-07-05 13:23:01 +0200 |
commit | 0641776cefb0ba35cc75c3bb27451a7e706dc2cd (patch) | |
tree | d15ef9a5b1d57584e24690ce03a860ec3d006db7 | |
parent | 977129f68d0dd100969506fd888cbdcae9d68c50 (diff) | |
download | gcc-0641776cefb0ba35cc75c3bb27451a7e706dc2cd.zip gcc-0641776cefb0ba35cc75c3bb27451a7e706dc2cd.tar.gz gcc-0641776cefb0ba35cc75c3bb27451a7e706dc2cd.tar.bz2 |
genattrtab.c (write_attr_get): Revert part of last patch to always write out a prototype.
* genattrtab.c (write_attr_get): Revert part of last patch to
always write out a prototype.
* genemit.c (gen_split): Readd lost unused attributes in last
patch.
From-SVN: r68967
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/genattrtab.c | 15 | ||||
-rw-r--r-- | gcc/genemit.c | 6 |
3 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3fb9436..f336963 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-07-05 Andreas Jaeger <aj@suse.de> + + * genattrtab.c (write_attr_get): Revert part of last patch to + always write out a prototype. + + * genemit.c (gen_split): Readd lost unused attributes in last + patch. + 2003-07-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> * cfgloopmanip.c (force_single_succ_latches): Force latch to be diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 990cb0e..a4f6e26 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -4765,6 +4765,21 @@ write_attr_get (struct attr_desc *attr) switch we will generate. */ common_av = find_most_used (attr); + /* Write out prototype of function. */ + if (!attr->is_numeric) + printf ("extern enum attr_%s ", attr->name); + else if (attr->unsigned_p) + printf ("extern unsigned int "); + else + printf ("extern int "); + /* If the attribute name starts with a star, the remainder is the name of + the subroutine to use, instead of `get_attr_...'. */ + if (attr->name[0] == '*') + printf ("%s (rtx);\n", &attr->name[1]); + else + printf ("get_attr_%s (%s);\n", attr->name, + (attr->is_const ? "void" : "rtx")); + /* Write out start of function, then all values with explicit `case' lines, then a `default', then the value with the most uses. */ if (!attr->is_numeric) diff --git a/gcc/genemit.c b/gcc/genemit.c index edeb154..35b58a0 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -587,13 +587,13 @@ gen_split (rtx split) { printf ("extern rtx gen_%s_%d (rtx, rtx *);\n", name, insn_code_number); - printf ("rtx\ngen_%s_%d (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands)\n", - name, insn_code_number); + printf ("rtx\ngen_%s_%d (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n", + name, insn_code_number, unused); } else { printf ("extern rtx gen_split_%d (rtx *);\n", insn_code_number); - printf ("rtx\ngen_%s_%d (rtx *operands)\n", name, insn_code_number); + printf ("rtx\ngen_%s_%d (rtx *operands%s)\n", name, insn_code_number, unused); } printf ("{\n"); |