case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;
- case HEX_EXCP_TRAP0:
+ case HEX_EVENT_TRAP0:
syscallnum = env->gpr[6];
env->gpr[HEX_REG_PC] += 4;
ret = do_syscall(env,
env->gpr[0] = ret;
}
break;
- case HEX_EXCP_PC_NOT_ALIGNED:
+ case HEX_CAUSE_PC_NOT_ALIGNED:
force_sig_fault(TARGET_SIGBUS, TARGET_BUS_ADRALN,
env->gpr[HEX_REG_R31]);
break;
}
*flags = hex_flags;
if (*pc & PCALIGN_MASK) {
- hexagon_raise_exception_err(env, HEX_EXCP_PC_NOT_ALIGNED, 0);
+ hexagon_raise_exception_err(env, HEX_CAUSE_PC_NOT_ALIGNED, 0);
}
}
#define PCALIGN 4
#define PCALIGN_MASK (PCALIGN - 1)
-#define HEX_EXCP_FETCH_NO_UPAGE 0x012
-#define HEX_EXCP_INVALID_PACKET 0x015
-#define HEX_EXCP_INVALID_OPCODE 0x015
-#define HEX_EXCP_PC_NOT_ALIGNED 0x01e
-#define HEX_EXCP_PRIV_NO_UREAD 0x024
-#define HEX_EXCP_PRIV_NO_UWRITE 0x025
-
-#define HEX_EXCP_TRAP0 0x172
+#define HEX_EVENT_TRAP0 0x008
+
+#define HEX_CAUSE_TRAP0 0x172
+#define HEX_CAUSE_FETCH_NO_UPAGE 0x012
+#define HEX_CAUSE_INVALID_PACKET 0x015
+#define HEX_CAUSE_INVALID_OPCODE 0x015
+#define HEX_CAUSE_PC_NOT_ALIGNED 0x01e
+#define HEX_CAUSE_PRIV_NO_UREAD 0x024
+#define HEX_CAUSE_PRIV_NO_UWRITE 0x025
#define PACKET_WORDS_MAX 4
do { \
uiV = uiV; \
tcg_gen_movi_tl(hex_gpr[HEX_REG_PC], ctx->pkt->pc); \
- TCGv excp = tcg_constant_tl(HEX_EXCP_TRAP0); \
+ TCGv excp = tcg_constant_tl(HEX_EVENT_TRAP0); \
gen_helper_raise_exception(tcg_env, excp); \
} while (0)
#endif
ctx->insn->generate(ctx);
mark_store_width(ctx);
} else {
- gen_exception_end_tb(ctx, HEX_EXCP_INVALID_OPCODE);
+ gen_exception_end_tb(ctx, HEX_CAUSE_INVALID_OPCODE);
}
}
nwords = read_packet_words(env, ctx, words);
if (!nwords) {
- gen_exception_end_tb(ctx, HEX_EXCP_INVALID_PACKET);
+ gen_exception_end_tb(ctx, HEX_CAUSE_INVALID_PACKET);
return;
}
gen_commit_packet(ctx);
ctx->base.pc_next += pkt.encod_pkt_size_in_bytes;
} else {
- gen_exception_end_tb(ctx, HEX_EXCP_INVALID_PACKET);
+ gen_exception_end_tb(ctx, HEX_CAUSE_INVALID_PACKET);
}
}