[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] target-arm: Make SETEND respect bswap_code (BE8) se
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH] target-arm: Make SETEND respect bswap_code (BE8) setting |
Date: |
Tue, 24 Apr 2012 19:03:00 +0100 |
Make the SETEND instruction respect the setting of bswap_code,
so that in BE8 mode we UNDEF for attempts to switch into
little-endian mode and nop for attempts to stay in big-endian
mode. (This is the inverse of the existing handling of SETEND
in the more common little-endian setup, which we use since
we don't implement the architecturally-mandated dynamic
endianness switching.)
Signed-off-by: Peter Maydell <address@hidden>
---
This tidies up a minor corner case following the introduction of
BE8 support recently.
target-arm/translate.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 7a3c7d6..437d9db 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -6767,8 +6767,8 @@ static void disas_arm_insn(CPUARMState * env,
DisasContext *s)
if ((insn & 0x0ffffdff) == 0x01010000) {
ARCH(6);
/* setend */
- if (insn & (1 << 9)) {
- /* BE8 mode not implemented. */
+ if (((insn >> 9) & 1) != s->bswap_code) {
+ /* Dynamic endianness switching not implemented. */
goto illegal_op;
}
return;
@@ -9710,8 +9710,8 @@ static void disas_thumb_insn(CPUARMState *env,
DisasContext *s)
case 2:
/* setend */
ARCH(6);
- if (insn & (1 << 3)) {
- /* BE8 mode not implemented. */
+ if (((insn >> 3) & 1) != s->bswap_code) {
+ /* Dynamic endianness switching not implemented. */
goto illegal_op;
}
break;
--
1.7.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] target-arm: Make SETEND respect bswap_code (BE8) setting,
Peter Maydell <=