mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'
While these functions are not TCG specific, they are not target specific. Move them to "exec/cpu-common.h" so their callers don't have to be tainted as target specific. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Anton Johansson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
This commit is contained in:
1 parent
65b074daa0
commit
3549118b49
2 files changed
+32
-30
No files matched your search
@@ -173,4 +173,36 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
|
||||
/* vl.c */
|
||||
void list_cpus(void);
|
||||
|
||||
#ifdef CONFIG_TCG
|
||||
/**
|
||||
* cpu_unwind_state_data:
|
||||
* @cpu: the cpu context
|
||||
* @host_pc: the host pc within the translation
|
||||
* @data: output data
|
||||
*
|
||||
* Attempt to load the the unwind state for a host pc occurring in
|
||||
* translated code. If @host_pc is not in translated code, the
|
||||
* function returns false; otherwise @data is loaded.
|
||||
* This is the same unwind info as given to restore_state_to_opc.
|
||||
*/
|
||||
bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
|
||||
|
||||
/**
|
||||
* cpu_restore_state:
|
||||
* @cpu: the cpu context
|
||||
* @host_pc: the host pc within the translation
|
||||
* @return: true if state was restored, false otherwise
|
||||
*
|
||||
* Attempt to restore the state for a fault occurring in translated
|
||||
* code. If @host_pc is not in translated code no state is
|
||||
* restored and the function returns false.
|
||||
*/
|
||||
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc);
|
||||
|
||||
G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu);
|
||||
G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc);
|
||||
#endif /* CONFIG_TCG */
|
||||
G_NORETURN void cpu_loop_exit(CPUState *cpu);
|
||||
G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
|
||||
|
||||
#endif /* CPU_COMMON_H */
|
||||
@@ -27,36 +27,6 @@
|
||||
#include "exec/translation-block.h"
|
||||
#include "qemu/clang-tsa.h"
|
||||
|
||||
/**
|
||||
* cpu_unwind_state_data:
|
||||
* @cpu: the cpu context
|
||||
* @host_pc: the host pc within the translation
|
||||
* @data: output data
|
||||
*
|
||||
* Attempt to load the the unwind state for a host pc occurring in
|
||||
* translated code. If @host_pc is not in translated code, the
|
||||
* function returns false; otherwise @data is loaded.
|
||||
* This is the same unwind info as given to restore_state_to_opc.
|
||||
*/
|
||||
bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data);
|
||||
|
||||
/**
|
||||
* cpu_restore_state:
|
||||
* @cpu: the cpu context
|
||||
* @host_pc: the host pc within the translation
|
||||
* @return: true if state was restored, false otherwise
|
||||
*
|
||||
* Attempt to restore the state for a fault occurring in translated
|
||||
* code. If @host_pc is not in translated code no state is
|
||||
* restored and the function returns false.
|
||||
*/
|
||||
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc);
|
||||
|
||||
G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu);
|
||||
G_NORETURN void cpu_loop_exit(CPUState *cpu);
|
||||
G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
|
||||
G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc);
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_requested:
|
||||
* @cpu: The CPU state to be tested
|
||||
|
||||
Reference in new issue
Block a user