|
|
|
@ -153,7 +153,11 @@ private: |
|
|
|
#define sext_xlen(x) (((sreg_t)(x) << (64-xlen)) >> (64-xlen)) |
|
|
|
#define zext_xlen(x) (((reg_t)(x) << (64-xlen)) >> (64-xlen)) |
|
|
|
|
|
|
|
#define set_pc(x) (npc = sext_xlen(x)) |
|
|
|
#define set_pc(x) \ |
|
|
|
do { if ((x) & 3 /* For now... */) \ |
|
|
|
throw trap_instruction_address_misaligned(x); \ |
|
|
|
npc = sext_xlen(x); \ |
|
|
|
} while(0) |
|
|
|
|
|
|
|
#define validate_csr(which, write) ({ \ |
|
|
|
unsigned my_priv = get_field(STATE.mstatus, MSTATUS_PRV); \ |
|
|
|
|