[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/12] target-xtensa: fetch 3rd opcode byte only whe
From: |
Max Filippov |
Subject: |
[Qemu-devel] [PATCH 03/12] target-xtensa: fetch 3rd opcode byte only when needed |
Date: |
Sat, 18 Feb 2012 21:11:34 +0400 |
According to ISA, 3.5.4, third opcode byte should not be fetched for
2-byte instructions.
Signed-off-by: Max Filippov <address@hidden>
---
target-xtensa/translate.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index c81450d..6a0177f 100644
--- a/target-xtensa/translate.c
+++ b/target-xtensa/translate.c
@@ -749,7 +749,7 @@ static void disas_xtensa_insn(DisasContext *dc)
uint8_t b0 = ldub_code(dc->pc);
uint8_t b1 = ldub_code(dc->pc + 1);
- uint8_t b2 = ldub_code(dc->pc + 2);
+ uint8_t b2 = 0;
static const uint32_t B4CONST[] = {
0xffffffff, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 16, 32, 64, 128, 256
@@ -764,6 +764,7 @@ static void disas_xtensa_insn(DisasContext *dc)
HAS_OPTION(XTENSA_OPTION_CODE_DENSITY);
} else {
dc->next_pc = dc->pc + 3;
+ b2 = ldub_code(dc->pc + 2);
}
switch (OP0) {
--
1.7.7.6
- [Qemu-devel] [PULL 00/12] target-xtensa queue, Max Filippov, 2012/02/18
- Re: [Qemu-devel] [PULL 00/12] target-xtensa queue, Andreas Färber, 2012/02/18
- [Qemu-devel] [PATCH 01/12] target-xtensa: define TLB_TEMPLATE for MMU-less cores, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 03/12] target-xtensa: fetch 3rd opcode byte only when needed,
Max Filippov <=
- [Qemu-devel] [PATCH 02/12] target-xtensa: implement info tlb monitor command, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 04/12] target-xtensa: add DEBUGCAUSE SR and configuration, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 05/12] target-xtensa: implement instruction breakpoints, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 06/12] target-xtensa: add ICOUNT SR and debug exception, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 07/12] exec: add missing breaks to the watch_mem_write, Max Filippov, 2012/02/18
- Re: [Qemu-devel] [PATCH 07/12] exec: add missing breaks to the watch_mem_write, Meador Inge, 2012/02/20
- [Qemu-devel] [PATCH 08/12] exec: fix check_watchpoint exiting cpu_loop, Max Filippov, 2012/02/18
- [Qemu-devel] [PATCH 09/12] exec: let cpu_watchpoint_insert accept larger watchpoints, Max Filippov, 2012/02/18