+2021-05-02 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin-sim.c: Include ansidecl.h.
+ (illegal_instruction): Change __attribute__((noreturn)) to
+ ATTRIBUTE_NORETURN.
+ (illegal_instruction_combination, illegal_instruction_or_combination,
+ unhandled_instruction): Likewise.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_mmu.c (bfin_mmu_options): Mark static.
#include <string.h>
#include <inttypes.h>
+#include "ansidecl.h"
#include "opcode/bfin.h"
#include "sim-main.h"
#include "dv-bfin_cec.h"
#define SIGNEXTEND(v, n) \
(((bs32)(v) << (HOST_LONG_WORD_SIZE - (n))) >> (HOST_LONG_WORD_SIZE - (n)))
-static __attribute__ ((noreturn)) void
+static ATTRIBUTE_NORETURN void
illegal_instruction (SIM_CPU *cpu)
{
TRACE_INSN (cpu, "ILLEGAL INSTRUCTION");
cec_exception (cpu, VEC_UNDEF_I);
}
-static __attribute__ ((noreturn)) void
+static ATTRIBUTE_NORETURN void
illegal_instruction_combination (SIM_CPU *cpu)
{
TRACE_INSN (cpu, "ILLEGAL INSTRUCTION COMBINATION");
cec_exception (cpu, VEC_ILGAL_I);
}
-static __attribute__ ((noreturn)) void
+static ATTRIBUTE_NORETURN void
illegal_instruction_or_combination (SIM_CPU *cpu)
{
if (PARALLEL_GROUP != BFIN_PARALLEL_NONE)
illegal_instruction (cpu);
}
-static __attribute__ ((noreturn)) void
+static ATTRIBUTE_NORETURN void
unhandled_instruction (SIM_CPU *cpu, const char *insn)
{
SIM_DESC sd = CPU_STATE (cpu);
+2021-05-02 Mike Frysinger <vapier@gentoo.org>
+
+ * callback.c (os_error): Change __attribute__((noreturn)) to
+ ATTRIBUTE_NORETURN.
+ * hw-device.h (hw_abort, hw_vabort, hw_halthw_trace): Change
+ attributes to ATTRIBUTE_PRINTF and ATTRIBUTE_NORETURN.
+ * hw-events.h (hw_event_queue_schedule_tracef): Likewise.
+ * hw-tree.h (hw_tree_delete): Likewise.
+ * sim-basics.h (__attribute__): Delete.
+ * sim-engine.h (sim_engine_halt): Change __attribute__((noreturn))
+ to ATTRIBUTE_NORETURN.
+ (sim_engine_abort, sim_engine_vabort): Likewise.
+ * sim-hw.h (sim_hw_install, sim_hw_abort): Change
+ __attribute__((printf)) to ATTRIBUTE_PRINTF.
+ * sim-inline.h (NORETURN): Delete.
+ (UNUSED): Change to ATTRIBUTE_UNUSED.
+ * sim-io.h (sim_io_printf): Change attributes to ATTRIBUTE_PRINTF
+ and ATTRIBUTE_NORETURN.
+ (sim_io_eprintf, sim_io_error): Likewise.
+ * sim-profile.c (profile_printf): Likewise.
+ * sim-trace.h (trace_prefix, trace_generic, trace_printf,
+ sim_debug_printf): Likewise.
+
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* sim-options.c (dup_arg_p): Call htab_empty.
}
/* VARARGS */
-#ifdef __GNUC__
-__attribute__ ((__noreturn__))
-#endif
-static void ATTRIBUTE_PRINTF (2, 3)
+static void ATTRIBUTE_PRINTF (2, 3) ATTRIBUTE_NORETURN
os_error (host_callback *p ATTRIBUTE_UNUSED, const char *format, ...)
{
va_list args;
void hw_abort
(struct hw *me,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3), noreturn));
+ ...) ATTRIBUTE_PRINTF (2, 3) ATTRIBUTE_NORETURN;
void hw_vabort
(struct hw *me,
const char *fmt,
- va_list ap) __attribute__ ((noreturn));
+ va_list ap) ATTRIBUTE_NORETURN;
void hw_halt
(struct hw *me,
int reason,
- int status) __attribute__ ((noreturn));
+ int status) ATTRIBUTE_NORETURN;
#define hw_trace_p(hw) ((hw)->trace_of_hw_p + 0)
void hw_trace
(struct hw *me,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF (2, 3);
#define HW_TRACE(ARGS) \
do { \
hw_event_callback *handler,
void *data,
const char *fmt,
- ...) __attribute__ ((format (printf, 5, 6)));
+ ...) ATTRIBUTE_PRINTF (5, 6);
struct hw_event *hw_event_queue_schedule_vtracef
(struct hw *me,
struct hw *hw_tree_parse
(struct hw *root,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF (2, 3);
struct hw *hw_tree_vparse
(struct hw *root,
#endif
-/* Some versions of GCC include an attribute operator, define it */
-
-#if !defined (__attribute__)
-#if (!defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
-#define __attribute__(arg)
-#endif
-#endif
-
-
/* Global types that code manipulates */
struct hw;
sim_cpu *next_cpu, /* NULL -> succ (last_cpu) or event-mgr */
sim_cia cia,
enum sim_stop reason,
- int sigrc) __attribute__ ((noreturn));
+ int sigrc) ATTRIBUTE_NORETURN;
/* Halt hook - allow target specific operation when halting a
simulator */
sim_cpu *cpu,
sim_cia cia,
const char *fmt,
- ...) ATTRIBUTE_PRINTF (4, 5) __attribute__ ((noreturn));
+ ...) ATTRIBUTE_PRINTF (4, 5) ATTRIBUTE_NORETURN;
extern void sim_engine_vabort
(SIM_DESC sd,
sim_cpu *cpu,
sim_cia cia,
const char *fmt,
- va_list ap) ATTRIBUTE_PRINTF (4, 0) __attribute__ ((noreturn));
+ va_list ap) ATTRIBUTE_PRINTF (4, 0) ATTRIBUTE_NORETURN;
/* No abort hook - when possible this function exits using the
engine_halt function (and SIM_ENGINE_HALT_HOOK). */
struct hw *sim_hw_parse
(struct sim_state *sd,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF (2, 3);
/* Print the hardware tree */
(SIM_DESC sd,
struct hw *hw,
const char *fmt,
- ...) __attribute__ ((format (printf, 3, 4), noreturn));
+ ...) ATTRIBUTE_PRINTF (3, 4) ATTRIBUTE_NORETURN;
#endif
-/* Your compiler's no-return reserved word */
-
-#ifndef NORETURN
-#define NORETURN
-#endif
-
-
-
/* Your compilers's unused reserved word */
#if !defined (UNUSED)
-#if (!defined (__GNUC__) \
- || (__GNUC__ < 2) \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
-#define UNUSED
-#else
-#define UNUSED __attribute__((__unused__))
-#endif
+#define UNUSED ATTRIBUTE_UNUSED
#endif
void sim_io_printf (SIM_DESC sd,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF (2, 3);
void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap);
void sim_io_eprintf (SIM_DESC sd,
const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF (2, 3);
void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap);
void sim_io_error (SIM_DESC sd,
const char *fmt,
...)
- __attribute__ ((format (printf, 2, 3)))
- __attribute__ ((__noreturn__));
+ ATTRIBUTE_PRINTF (2, 3)
+ ATTRIBUTE_NORETURN;
void sim_io_poll_quit (SIM_DESC sd);
sim_io_evprintf (sd, fmt, ap);
}
-__attribute__ ((format (printf, 3, 4)))
+ATTRIBUTE_PRINTF (3, 4)
static void
profile_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
{
const char *file_name,
int line_nr,
const char *fmt,
- ...)
- __attribute__((format (printf, 8, 9)));
+ ...) ATTRIBUTE_PRINTF (8, 9);
/* Generic trace print, assumes trace_prefix() has been called */
sim_cpu *cpu,
int trace_idx,
const char *fmt,
- ...)
- __attribute__((format (printf, 4, 5)));
+ ...) ATTRIBUTE_PRINTF (4, 5);
/* Disassemble the specified address. */
\f
extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...)
- __attribute__((format (printf, 3, 4)));
+ ATTRIBUTE_PRINTF (3, 4);
extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list);
bfd_vma trace_sym_value (SIM_DESC, const char *name);
extern void sim_debug_printf (sim_cpu *, const char *, ...)
- __attribute__((format (printf, 2, 3)));
+ ATTRIBUTE_PRINTF (2, 3);
#endif /* SIM_TRACE_H */
+2021-05-02 Mike Frysinger <vapier@gentoo.org>
+
+ * lf.h: Include ansidecl.h.
+ (lf_printf): Change __attribute__((printf)) to ATTRIBUTE_PRINTF.
+
2021-04-02 Mike Frysinger <vapier@gentoo.org>
* local.mk: New file.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
+#include "ansidecl.h"
/* LF: Line Numbered Output Stream */
extern int lf_putbin (lf *file, int decimal, int width);
extern int lf_printf
- (lf *file, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+ (lf *file, const char *fmt, ...) ATTRIBUTE_PRINTF (2, 3);
/* Indentation control.
+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.
#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
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++;
#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