[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 50/76] target/microblaze: Replace MSR_EE_FLAG with MSR_EE
From: |
Richard Henderson |
Subject: |
[PATCH v2 50/76] target/microblaze: Replace MSR_EE_FLAG with MSR_EE |
Date: |
Fri, 28 Aug 2020 07:19:03 -0700 |
There's no reason to define MSR_EE_FLAG; we can just use the
original MSR_EE define. Document the other flags copied into
tb_flags with iflag to reserve those bits.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/microblaze/cpu.h | 4 +++-
target/microblaze/translate.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h
index 013858b8e0..594501e4e7 100644
--- a/target/microblaze/cpu.h
+++ b/target/microblaze/cpu.h
@@ -254,7 +254,9 @@ struct CPUMBState {
/* Internal flags. */
#define IMM_FLAG 4
-#define MSR_EE_FLAG (1 << 8)
+/* MSR_EE (1 << 8) */
+/* MSR_UM (1 << 11) */
+/* MSR_VM (1 << 13) */
#define DRTI_FLAG (1 << 16)
#define DRTE_FLAG (1 << 17)
#define DRTB_FLAG (1 << 18)
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 72541905ec..1f6731e0af 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -162,7 +162,7 @@ static void gen_goto_tb(DisasContext *dc, int n,
target_ulong dest)
*/
static bool trap_illegal(DisasContext *dc, bool cond)
{
- if (cond && (dc->tb_flags & MSR_EE_FLAG)
+ if (cond && (dc->tb_flags & MSR_EE)
&& dc->cpu->cfg.illegal_opcode_exception) {
gen_raise_hw_excp(dc, ESR_EC_ILLEGAL_OP);
}
@@ -178,7 +178,7 @@ static bool trap_userspace(DisasContext *dc, bool cond)
int mem_index = cpu_mmu_index(&dc->cpu->env, false);
bool cond_user = cond && mem_index == MMU_USER_IDX;
- if (cond_user && (dc->tb_flags & MSR_EE_FLAG)) {
+ if (cond_user && (dc->tb_flags & MSR_EE)) {
gen_raise_hw_excp(dc, ESR_EC_PRIVINSN);
}
return cond_user;
--
2.25.1
- [PATCH v2 40/76] target/microblaze: Convert dec_and, dec_or, dec_xor to decodetree, (continued)
- [PATCH v2 40/76] target/microblaze: Convert dec_and, dec_or, dec_xor to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 42/76] target/microblaze: Convert dec_div to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 41/76] target/microblaze: Convert dec_mul to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 45/76] target/microblaze: Convert dec_barrel to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 43/76] target/microblaze: Unwind properly when raising divide-by-zero, Richard Henderson, 2020/08/28
- [PATCH v2 44/76] target/microblaze: Convert dec_bit to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 46/76] target/microblaze: Convert dec_imm to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 47/76] target/microblaze: Convert dec_fpu to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 49/76] target/microblaze: Mark fpu helpers TCG_CALL_NO_WG, Richard Henderson, 2020/08/28
- [PATCH v2 48/76] target/microblaze: Fix cpu unwind for fpu exceptions, Richard Henderson, 2020/08/28
- [PATCH v2 50/76] target/microblaze: Replace MSR_EE_FLAG with MSR_EE,
Richard Henderson <=
- [PATCH v2 51/76] target/microblaze: Cache mem_index in DisasContext, Richard Henderson, 2020/08/28
- [PATCH v2 52/76] target/microblaze: Fix cpu unwind for stackprot, Richard Henderson, 2020/08/28
- [PATCH v2 54/76] target/microblaze: Assert no overlap in flags making up tb_flags, Richard Henderson, 2020/08/28
- [PATCH v2 53/76] target/microblaze: Convert dec_load and dec_store to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 56/76] target/microblaze: Fix no-op mb_cpu_transaction_failed, Richard Henderson, 2020/08/28
- [PATCH v2 57/76] target/microblaze: Store "current" iflags in insn_start, Richard Henderson, 2020/08/28
- [PATCH v2 58/76] tcg: Add tcg_get_insn_start_param, Richard Henderson, 2020/08/28
- [PATCH v2 55/76] target/microblaze: Move bimm to BIMM_FLAG, Richard Henderson, 2020/08/28
- [PATCH v2 59/76] target/microblaze: Use cc->do_unaligned_access, Richard Henderson, 2020/08/28