aboutsummaryrefslogtreecommitdiff
path: root/target/hexagon/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/hexagon/translate.c')
-rw-r--r--target/hexagon/translate.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c
index 724b4fc..e10ef36 100644
--- a/target/hexagon/translate.c
+++ b/target/hexagon/translate.c
@@ -204,7 +204,12 @@ static void mark_implicit_reg_write(DisasContext *ctx, Insn *insn,
int attrib, int rnum)
{
if (GET_ATTRIB(insn->opcode, attrib)) {
- bool is_predicated = GET_ATTRIB(insn->opcode, A_CONDEXEC);
+ /*
+ * USR is used to set overflow and FP exceptions,
+ * so treat it as conditional
+ */
+ bool is_predicated = GET_ATTRIB(insn->opcode, A_CONDEXEC) ||
+ rnum == HEX_REG_USR;
if (is_predicated && !is_preloaded(ctx, rnum)) {
tcg_gen_mov_tl(hex_new_value[rnum], hex_gpr[rnum]);
}
@@ -230,6 +235,8 @@ static void mark_implicit_reg_writes(DisasContext *ctx, Insn *insn)
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_SA0, HEX_REG_SA0);
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_LC1, HEX_REG_LC1);
mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_SA1, HEX_REG_SA1);
+ mark_implicit_reg_write(ctx, insn, A_IMPLICIT_WRITES_USR, HEX_REG_USR);
+ mark_implicit_reg_write(ctx, insn, A_FPOP, HEX_REG_USR);
}
static void mark_implicit_pred_writes(DisasContext *ctx, Insn *insn)