aboutsummaryrefslogtreecommitdiff
path: root/risu_aarch64.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-07-08 21:16:38 +0530
committerPeter Maydell <peter.maydell@linaro.org>2022-07-18 13:14:07 +0100
commit8555449dbe66fae0623469c5afae8e1333e4e230 (patch)
tree2344755561f58a8aaba2ca30df7fcdca90e19a1b /risu_aarch64.c
parent5355d0ff68b5eb468893f24ff570691561fc7bc3 (diff)
Add enum RisuOp
Formalize the set of defines, plus -1, into an enum. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220708154700.18682-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risu_aarch64.c')
-rw-r--r--risu_aarch64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/risu_aarch64.c b/risu_aarch64.c
index 492d141..f8a8412 100644
--- a/risu_aarch64.c
+++ b/risu_aarch64.c
@@ -29,16 +29,16 @@ uint64_t get_reginfo_paramreg(struct reginfo *ri)
return ri->regs[0];
}
-int get_risuop(struct reginfo *ri)
+RisuOp get_risuop(struct reginfo *ri)
{
/* Return the risuop we have been asked to do
- * (or -1 if this was a SIGILL for a non-risuop insn)
+ * (or OP_SIGILL if this was a SIGILL for a non-risuop insn)
*/
uint32_t insn = ri->faulting_insn;
uint32_t op = insn & 0xf;
uint32_t key = insn & ~0xf;
uint32_t risukey = 0x00005af0;
- return (key != risukey) ? -1 : op;
+ return (key != risukey) ? OP_SIGILL : op;
}
uintptr_t get_pc(struct reginfo *ri)