[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/18] include/exec/exec-all: document common exit co
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 04/18] include/exec/exec-all: document common exit conditions |
Date: |
Mon, 17 Jul 2017 13:44:40 +0100 |
From: Alex Bennée <address@hidden>
As a precursor to later patches attempt to come up with a more
concrete wording for what each of the common exit cases would be.
CC: Emilio G. Cota <address@hidden>
CC: Richard Henderson <address@hidden>
CC: Lluís Vilanova <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
include/exec/exec-all.h | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index bf8da2a..6b6e287 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -35,11 +35,34 @@ typedef abi_ulong tb_page_addr_t;
typedef ram_addr_t tb_page_addr_t;
#endif
-/* is_jmp field values */
+/* DisasContext is_jmp field values
+ *
+ * is_jmp starts as DISAS_NEXT. The translator will keep processing
+ * instructions until an exit condition is reached. If we reach the
+ * exit condition and is_jmp is still DISAS_NEXT (because of some
+ * other condition) we simply "jump" to the next address.
+ * The remaining exit cases are:
+ *
+ * DISAS_JUMP - Only the PC was modified dynamically (e.g computed)
+ * DISAS_TB_JUMP - Only the PC was modified statically (e.g. branch)
+ *
+ * In these cases as long as the PC is updated we can chain to the
+ * next TB either by exiting the loop or looking up the next TB via
+ * the loookup helper.
+ *
+ * DISAS_UPDATE - CPU State was modified dynamically
+ *
+ * This covers any other CPU state which necessities us exiting the
+ * TCG code to the main run-loop. Typically this includes anything
+ * that might change the interrupt state.
+ *
+ * Individual translators may define additional exit cases to deal
+ * with per-target special conditions.
+ */
#define DISAS_NEXT 0 /* next instruction can be analyzed */
#define DISAS_JUMP 1 /* only pc was modified dynamically */
-#define DISAS_UPDATE 2 /* cpu state was modified dynamically */
-#define DISAS_TB_JUMP 3 /* only pc was modified statically */
+#define DISAS_TB_JUMP 2 /* only pc was modified statically */
+#define DISAS_UPDATE 3 /* cpu state was modified dynamically */
#include "qemu/log.h"
--
2.7.4
- [Qemu-devel] [PULL 17/18] hw/arm/mps2: Add ethernet, (continued)
- [Qemu-devel] [PULL 17/18] hw/arm/mps2: Add ethernet, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 14/18] hw/arm/mps2: Add timers, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 18/18] MAINTAINERS: Add entries for MPS2 board, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 12/18] hw/arm/mps2: Add UARTs, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 06/18] target/arm/translate.h: expand comment on DISAS_EXIT, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 15/18] hw/misc/mps2_scc: Implement MPS2 Serial Communication Controller, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 13/18] hw/char/cmsdk-apb-timer: Implement CMSDK APB timer device, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 08/18] target/arm: use gen_goto_tb for ISB handling, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 07/18] target/arm/translate: ensure gen_goto_tb sets exit flags, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 10/18] hw/arm/mps2: Implement skeleton mps2-an385 and mps2-an511 board models, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 04/18] include/exec/exec-all: document common exit conditions,
Peter Maydell <=
- [Qemu-devel] [PULL 05/18] target/arm/translate: make DISAS_UPDATE match declared semantics, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 03/18] target/arm: Make Cortex-M3 and M4 default to 8 PMSA regions, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 01/18] qdev-properties.h: Explicitly set the default value for arraylen properties, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 11/18] hw/char/cmsdk-apb-uart.c: Implement CMSDK APB UART, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 02/18] qdev: support properties which don't set a default value, Peter Maydell, 2017/07/17
- [Qemu-devel] [PULL 09/18] target/arm: use DISAS_EXIT for eret handling, Peter Maydell, 2017/07/17
- Re: [Qemu-devel] [PULL 00/18] target-arm queue, no-reply, 2017/07/17
- Re: [Qemu-devel] [PULL 00/18] target-arm queue, Peter Maydell, 2017/07/18