aboutsummaryrefslogtreecommitdiff
path: root/target/arm/translate.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-02-05 16:52:37 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-02-05 16:52:37 +0000
commit51bf0d7aa91a9d4e2563240a42e6cb705cef84aa (patch)
tree4072b59c5ac2c290bd577f62a77bb62e32461a44 /target/arm/translate.h
parent1bafc2ba7e6bfe89fff3503fdac8db39c973de48 (diff)
downloadqemu-51bf0d7aa91a9d4e2563240a42e6cb705cef84aa.zip
qemu-51bf0d7aa91a9d4e2563240a42e6cb705cef84aa.tar.gz
qemu-51bf0d7aa91a9d4e2563240a42e6cb705cef84aa.tar.bz2
target/arm: Default handling of BTYPE during translation
The branch target exception for guarded pages has high priority, and only 8 instructions are valid for that case. Perform this check before doing any other decode. Clear BTYPE after all insns that neither set BTYPE nor exit via exception (DISAS_NORETURN). Not yet handled are insns that exit via DISAS_NORETURN for some other reason, like direct branches. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190128223118.5255-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/translate.h')
-rw-r--r--target/arm/translate.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/target/arm/translate.h b/target/arm/translate.h
index 3d5e8ba..f73939d 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -71,8 +71,13 @@ typedef struct DisasContext {
bool pauth_active;
/* True with v8.5-BTI and SCTLR_ELx.BT* set. */
bool bt;
- /* A copy of PSTATE.BTYPE, which will be 0 without v8.5-BTI. */
- uint8_t btype;
+ /*
+ * >= 0, a copy of PSTATE.BTYPE, which will be 0 without v8.5-BTI.
+ * < 0, set by the current instruction.
+ */
+ int8_t btype;
+ /* True if this page is guarded. */
+ bool guarded_page;
/* Bottom two bits of XScale c15_cpar coprocessor access control reg */
int c15_cpar;
/* TCG op of the current insn_start. */