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.
This commit is contained in:
Mike Frysinger 2021-05-02 00:07:21 -04:00
parent d89a87ba3c
commit f0c4dc40b2
20 changed files with 79 additions and 63 deletions

View file

@ -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.

View file

@ -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

View file

@ -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++;

View file

@ -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