aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-02 00:07:21 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-02 10:58:20 -0400
commitf0c4dc40b2e16a876b5b61986de5014a78f76a5c (patch)
tree081740977f36d35892d79c180e792104293acfe8 /sim/m32c
parentd89a87ba3c100bdbe82c7bd98ad7b8a2435e002f (diff)
downloadfsf-binutils-gdb-f0c4dc40b2e16a876b5b61986de5014a78f76a5c.zip
fsf-binutils-gdb-f0c4dc40b2e16a876b5b61986de5014a78f76a5c.tar.gz
fsf-binutils-gdb-f0c4dc40b2e16a876b5b61986de5014a78f76a5c.tar.bz2
sim: replace custom attributes with ansidecl.h
A lot of this code predates the common attributes. We had already started migrating over piece by piece, so just do a pass across all the attributes and replace most of them.
Diffstat (limited to 'sim/m32c')
-rw-r--r--sim/m32c/ChangeLog8
-rw-r--r--sim/m32c/m32c.opc3
-rw-r--r--sim/m32c/opc2c.c7
-rw-r--r--sim/m32c/r8c.opc3
4 files changed, 14 insertions, 7 deletions
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index b2a02a6..e3393c9 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,11 @@
+2021-05-02 Mike Frysinger <vapier@gentoo.org>
+
+ * m32c.opc: Include ansidecl.h.
+ (AU): Delete.
+ * opc2c.c (dump_lines): Change AU to ATTRIBUTE_UNUSED.
+ * r8c.opc: Include ansidecl.h.
+ (AU): Delete.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
diff --git a/sim/m32c/m32c.opc b/sim/m32c/m32c.opc
index feee1e9..efe0495 100644
--- a/sim/m32c/m32c.opc
+++ b/sim/m32c/m32c.opc
@@ -22,13 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdlib.h>
+#include "ansidecl.h"
#include "cpu.h"
#include "mem.h"
#include "misc.h"
#include "int.h"
-#define AU __attribute__((unused))
-
#define tprintf if (trace) printf
static unsigned char
diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c
index 3d8f2c1..6487427 100644
--- a/sim/m32c/opc2c.c
+++ b/sim/m32c/opc2c.c
@@ -249,13 +249,14 @@ dump_lines (opcode * op, int level, Indirect * ind)
errors++;
}
else if (shift && (mask != 0xff))
- printf ("%*s int %s AU = (op[%d] >> %d) & 0x%02x;\n",
+ printf ("%*s int %s ATTRIBUTE_UNUSED = (op[%d] >> %d) & 0x%02x;\n",
level, "", name, byte, shift, mask);
else if (mask != 0xff)
- printf ("%*s int %s AU = op[%d] & 0x%02x;\n",
+ printf ("%*s int %s ATTRIBUTE_UNUSED = op[%d] & 0x%02x;\n",
level, "", name, byte, mask);
else
- printf ("%*s int %s AU = op[%d];\n", level, "", name, byte);
+ printf ("%*s int %s ATTRIBUTE_UNUSED = op[%d];\n", level, "", name,
+ byte);
}
else
i++;
diff --git a/sim/m32c/r8c.opc b/sim/m32c/r8c.opc
index aba2679..dc447b5 100644
--- a/sim/m32c/r8c.opc
+++ b/sim/m32c/r8c.opc
@@ -22,13 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdlib.h>
+#include "ansidecl.h"
#include "cpu.h"
#include "mem.h"
#include "misc.h"
#include "int.h"
-#define AU __attribute__((unused))
-
#define tprintf if (trace) printf
static unsigned char