summaryrefslogtreecommitdiff
path: root/target/mips/tcg/translate.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-07-29 19:17:02 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-08-02 12:34:00 -0700
commitd44971e725c02e0656d2f53d4fb564f92e06aef7 (patch)
treebd997d6fd75f68109c166243284c14ad074e2034 /target/mips/tcg/translate.h
parent430a388ef4a6e02e762a9c5f86c539f886a6a61a (diff)
target/mips: Advance pc after semihosting exception
Delay generating the exception until after we know the insn length, and record that length in env->error_code. Fixes: 8ec7e3c53d4 ("target/mips: Use an exception for semihosting") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1126 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/mips/tcg/translate.h')
-rw-r--r--target/mips/tcg/translate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index 55053226ae..69f85841d2 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -51,6 +51,10 @@ typedef struct DisasContext {
int gi;
} DisasContext;
+#define DISAS_STOP DISAS_TARGET_0
+#define DISAS_EXIT DISAS_TARGET_1
+#define DISAS_SEMIHOST DISAS_TARGET_2
+
/* MIPS major opcodes */
#define MASK_OP_MAJOR(op) (op & (0x3F << 26))