[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 0187688] microblaze: Trap on illegal load/store s
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 0187688] microblaze: Trap on illegal load/store sizes. |
Date: |
Fri, 04 Sep 2009 08:48:14 -0000 |
From: Edgar E. Iglesias <address@hidden>
Signed-off-by: Edgar E. Iglesias <address@hidden>
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index b180d24..bb37f04 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -803,6 +803,12 @@ static void dec_load(DisasContext *dc)
unsigned int size;
size = 1 << (dc->opcode & 3);
+ if (size > 4 && (dc->tb_flags & MSR_EE_FLAG)
+ && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)) {
+ tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
+ t_gen_raise_exception(dc, EXCP_HW_EXCP);
+ return;
+ }
LOG_DIS("l %x %d\n", dc->opcode, size);
t_sync_flags(dc);
@@ -849,6 +855,13 @@ static void dec_store(DisasContext *dc)
size = 1 << (dc->opcode & 3);
+ if (size > 4 && (dc->tb_flags & MSR_EE_FLAG)
+ && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK)) {
+ tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP);
+ t_gen_raise_exception(dc, EXCP_HW_EXCP);
+ return;
+ }
+
LOG_DIS("s%d%s\n", size, dc->type_b ? "i" : "");
t_sync_flags(dc);
/* If we get a fault on a dslot, the jmpstate better be in sync. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 0187688] microblaze: Trap on illegal load/store sizes.,
Anthony Liguori <=