From f0c4dc40b2e16a876b5b61986de5014a78f76a5c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 2 May 2021 00:07:21 -0400 Subject: 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. --- sim/m32c/ChangeLog | 8 ++++++++ sim/m32c/m32c.opc | 3 +-- sim/m32c/opc2c.c | 7 ++++--- sim/m32c/r8c.opc | 3 +-- 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'sim/m32c') 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 + + * 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 * 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 . */ #include #include +#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 . */ #include #include +#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 -- cgit v1.1