From c9c4555f8d38053ed2da4b0f81fd86301a14d8cb Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 12 Nov 2010 13:11:18 +0100 Subject: Implement more instructions --- nios2sim-ng.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nios2sim-ng.h') diff --git a/nios2sim-ng.h b/nios2sim-ng.h index e4f4bcf..9be1d0d 100644 --- a/nios2sim-ng.h +++ b/nios2sim-ng.h @@ -5,18 +5,20 @@ #ifndef _NIOS2SIM_NG_H_ #define _NIOS2SIM_NG_H_ -#include #include #include #include "bits.h" #include "compiler.h" +#include "util.h" extern bool verbose; #define __round_mask(x, y) ((__typeof__(x))((y) - 1)) #define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1) +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + #define err(fmt, args...) fprintf(stderr, "Error: " fmt, ##args) #define warn(fmt, args...) fprintf(stderr, "Warning: " fmt, ##args) #define info(fmt, args...) fprintf(stdout, fmt, ##args) -- cgit v1.2.3-54-g00ecf