[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 37/69] target/arm: Convert SETEND
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 37/69] target/arm: Convert SETEND |
Date: |
Wed, 28 Aug 2019 12:04:24 -0700 |
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/translate.c | 22 +++++++++++++---------
target/arm/a32-uncond.decode | 4 ++++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index e8764a88ae..f81f369544 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -10217,6 +10217,18 @@ static bool trans_SB(DisasContext *s, arg_SB *a)
return true;
}
+static bool trans_SETEND(DisasContext *s, arg_SETEND *a)
+{
+ if (!ENABLE_ARCH_6) {
+ return false;
+ }
+ if (a->E != (s->be_data == MO_BE)) {
+ gen_helper_setend(cpu_env);
+ s->base.is_jmp = DISAS_UPDATE;
+ }
+ return true;
+}
+
/*
* Legacy decoder.
*/
@@ -10302,15 +10314,7 @@ static void disas_arm_insn(DisasContext *s, unsigned
int insn)
return; /* v7MP: Unallocated memory hint: must NOP */
}
- if ((insn & 0x0ffffdff) == 0x01010000) {
- ARCH(6);
- /* setend */
- if (((insn >> 9) & 1) != !!(s->be_data == MO_BE)) {
- gen_helper_setend(cpu_env);
- s->base.is_jmp = DISAS_UPDATE;
- }
- return;
- } else if ((insn & 0x0e000f00) == 0x0c000100) {
+ if ((insn & 0x0e000f00) == 0x0c000100) {
if (arm_dc_feature(s, ARM_FEATURE_IWMMXT)) {
/* iWMMXt register transfer. */
if (extract32(s->c15_cpar, 1, 1)) {
diff --git a/target/arm/a32-uncond.decode b/target/arm/a32-uncond.decode
index de611e8aff..32253b4f9a 100644
--- a/target/arm/a32-uncond.decode
+++ b/target/arm/a32-uncond.decode
@@ -24,6 +24,7 @@
&empty !extern
&i !extern imm
+&setend E
# Branch with Link and Exchange
@@ -50,3 +51,6 @@ DSB 1111 0101 0111 1111 1111 0000 0100 ----
DMB 1111 0101 0111 1111 1111 0000 0101 ----
ISB 1111 0101 0111 1111 1111 0000 0110 ----
SB 1111 0101 0111 1111 1111 0000 0111 0000
+
+# Set Endianness
+SETEND 1111 0001 0000 0001 0000 00 E:1 0 0000 0000 &setend
--
2.17.1
- [Qemu-devel] [PATCH v3 27/69] target/arm: Convert MOVW, MOVT, (continued)
- [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, 2019/08/28
- [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 <=
- [Qemu-devel] [PATCH v3 38/69] target/arm: Convert PLI, PLD, PLDW, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 34/69] target/arm: Convert RFE and SRS, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 42/69] target/arm: Convert TT, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 44/69] target/arm: Simplify disas_arm_insn, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 47/69] target/arm: Convert T16 load/store (register offset), Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 50/69] target/arm: Convert T16 load/store multiple, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 41/69] target/arm: Convert SG, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 28/69] target/arm: Convert LDM, STM, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 39/69] target/arm: Convert Unallocated memory hint, Richard Henderson, 2019/08/28
- [Qemu-devel] [PATCH v3 43/69] target/arm: Simplify disas_thumb2_insn, Richard Henderson, 2019/08/28