[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 29/69] target/arm: Diagnose writeback register in
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 29/69] target/arm: Diagnose writeback register in list for LDM for v7 |
Date: |
Wed, 28 Aug 2019 12:04:16 -0700 |
Prior to v7, for the A32 encoding, this operation wrote an UNKNOWN
value back to the base register. Starting in v7 this is UNPREDICTABLE.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/translate.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 3a96866531..529660eb35 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -9964,6 +9964,15 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a)
static bool trans_LDM_a32(DisasContext *s, arg_ldst_block *a)
{
+ /*
+ * Writeback register in register list is UNPREDICTABLE
+ * for ArchVersion() >= 7. Prior to v7, A32 would write
+ * an UNKNOWN value to the base register.
+ */
+ if (ENABLE_ARCH_7 && a->w && (a->list & (1 << a->rn))) {
+ unallocated_encoding(s);
+ return true;
+ }
return do_ldm(s, a);
}
--
2.17.1
- [Qemu-devel] [PATCH v3 13/69] target/arm: Convert MRS/MSR (banked, register), (continued)
- [Qemu-devel] [PATCH v3 13/69] target/arm: Convert MRS/MSR (banked, register), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 14/69] target/arm: Convert Cyclic Redundancy Check, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 17/69] target/arm: Convert ERET, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 19/69] target/arm: Convert T32 ADDW/SUBW, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 18/69] target/arm: Convert the rest of A32 Miscelaneous instructions, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 22/69] target/arm: Diagnose UNPREDICTABLE ldrex/strex cases, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 23/69] target/arm: Convert USAD8, USADA8, SBFX, UBFX, BFC, BFI, UDF, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 21/69] target/arm: Convert Synchronization primitives, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 24/69] target/arm: Convert Parallel addition and subtraction, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 27/69] target/arm: Convert MOVW, MOVT, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 29/69] target/arm: Diagnose writeback register in list for LDM for v7,
Richard Henderson <=
- [Qemu-devel] [PATCH v3 25/69] target/arm: Convert packing, unpacking, saturation, and reversal, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 20/69] target/arm: Convert load/store (register, immediate, literal), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 31/69] target/arm: Diagnose base == pc for LDM/STM, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 26/69] target/arm: Convert Signed multiply, signed and unsigned divide, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 32/69] target/arm: Convert B, BL, BLX (immediate), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 30/69] target/arm: Diagnose too few registers in list for LDM/STM, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 40/69] target/arm: Convert Table Branch, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 36/69] target/arm: Convert CPS (privileged), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 37/69] target/arm: Convert SETEND, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 38/69] target/arm: Convert PLI, PLD, PLDW, Richard Henderson, 2019/08/28