diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2010-11-12 13:11:18 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2010-11-12 13:11:18 +0100 |
commit | c9c4555f8d38053ed2da4b0f81fd86301a14d8cb (patch) | |
tree | 59a32bee8ef753da2399650200473a93645bedbd /nios2sim-ng.h | |
parent | e0330d9534d8cfeffff81f426df1d3277702b835 (diff) |
Implement more instructions
Diffstat (limited to 'nios2sim-ng.h')
-rw-r--r-- | nios2sim-ng.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <stdlib.h> #include <stdint.h> #include <stdbool.h> #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) |