#define __STDC_LIMIT_MACROS
#include <stdint.h>
-#include "common.h"
-#include "config.h"
typedef int int128_t __attribute__((mode(TI)));
typedef unsigned int uint128_t __attribute__((mode(TI)));
#define sext_xprlen(x) (((sreg_t)(x) << (64-xprlen)) >> (64-xprlen))
#define zext_xprlen(x) (((reg_t)(x) << (64-xprlen)) >> (64-xprlen))
-#ifndef RISCV_ENABLE_RVC
-# define set_pc(x) \
- do { if((x) & (sizeof(insn_t)-1)) \
- { badvaddr = (x); throw trap_instruction_address_misaligned; } \
- npc = (x); \
- } while(0)
-#else
-# define set_pc(x) \
- do { if((x) & ((sr & SR_EC) ? 1 : 3)) \
- { badvaddr = (x); throw trap_instruction_address_misaligned; } \
- npc = (x); \
- } while(0)
-#endif
-
// RVC stuff
#define INSN_IS_RVC(x) (((x) & 0x3) < 0x3)
#include "decode.h"
#include <cstring>
#include "trap.h"
+#include "config.h"
#define MAX_UTS 2048
#include "dispatch.h"
};
+#ifndef RISCV_ENABLE_RVC
+# define set_pc(x) \
+ do { if((x) & (sizeof(insn_t)-1)) \
+ { badvaddr = (x); throw trap_instruction_address_misaligned; } \
+ npc = (x); \
+ } while(0)
+#else
+# define set_pc(x) \
+ do { if((x) & ((sr & SR_EC) ? 1 : 3)) \
+ { badvaddr = (x); throw trap_instruction_address_misaligned; } \
+ npc = (x); \
+ } while(0)
+#endif
+
#endif