mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-01 23:21:08 +00:00
qemu-common: push cpu.h inclusion out of qemu-common.h
Backports commit 33c11879fd422b759483ed25fef133ea900ea8d7 from qemu
This commit is contained in:
parent
e84da64a2b
commit
37f26922dd
|
@ -26,6 +26,8 @@
|
|||
|
||||
/* Needed early for CONFIG_BSD etc. */
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/thread.h"
|
||||
|
|
|
@ -3213,6 +3213,7 @@ mips_symbols = (
|
|||
'mips_cpu_register_types',
|
||||
'cpu_mips_init',
|
||||
'cpu_state_reset',
|
||||
'do_raise_exception_err',
|
||||
'helper_msa_andi_b',
|
||||
'helper_msa_ori_b',
|
||||
'helper_msa_nori_b',
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "hw/boards.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
|
||||
static int tosa_init(struct uc_struct *uc, MachineState *machine)
|
||||
{
|
||||
if (uc->mode & UC_MODE_MCLASS) {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "hw/boards.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "sysemu/cpus.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "hw/boards.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "hw/i386/apic_internal.h"
|
||||
#include "hw/i386/apic.h"
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* License along with this library; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/i386/apic.h"
|
||||
#include "hw/i386/apic_internal.h"
|
||||
|
|
|
@ -9,12 +9,13 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/m68k/m68k.h"
|
||||
#include "hw/boards.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
|
||||
/* Board init. */
|
||||
static int dummy_m68k_init(struct uc_struct *uc, MachineState *machine)
|
||||
{
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/mips/cpudevs.h"
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/mips/cpudevs.h"
|
||||
#include "qemu/timer.h"
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
#ifndef HWADDR_H
|
||||
#define HWADDR_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "unicorn/platform.h"
|
||||
|
||||
#define HWADDR_BITS 64
|
||||
/* hwaddr is the type of a physical address (its size can
|
||||
be different from 'target_ulong'). */
|
||||
|
||||
#include "unicorn/platform.h"
|
||||
|
||||
typedef uint64_t hwaddr;
|
||||
#define HWADDR_MAX UINT64_MAX
|
||||
#define TARGET_FMT_plx "%016" PRIx64
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "sysemu/accel.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "qom/object.h"
|
||||
#include "qom/cpu.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
typedef int QEMUMachineInitFunc(struct uc_struct *uc, MachineState *ms);
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#ifndef QEMU_HW_H
|
||||
#define QEMU_HW_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY) && !defined(NEED_CPU_H)
|
||||
#include "exec/cpu-common.h"
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#error Cannot include hw/hw.h from user emulation
|
||||
#endif
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "exec/ioport.h"
|
||||
#include "qemu/log.h"
|
||||
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
|
||||
#include "unicorn/platform.h"
|
||||
|
||||
/* FIXME: Remove NEED_CPU_H. */
|
||||
#ifdef NEED_CPU_H
|
||||
#include "cpu.h"
|
||||
#endif /* !defined(NEED_CPU_H) */
|
||||
|
||||
#define qemu_isalnum(c) isalnum((unsigned char)(c))
|
||||
#define qemu_isalpha(c) isalpha((unsigned char)(c))
|
||||
#define qemu_iscntrl(c) iscntrl((unsigned char)(c))
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/ioport.h"
|
||||
#include "exec/memory.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "exec/memory.h"
|
||||
|
|
|
@ -3160,6 +3160,7 @@
|
|||
#define mips_cpu_register_types mips_cpu_register_types_mips
|
||||
#define cpu_mips_init cpu_mips_init_mips
|
||||
#define cpu_state_reset cpu_state_reset_mips
|
||||
#define do_raise_exception_err do_raise_exception_err_mips
|
||||
#define helper_msa_andi_b helper_msa_andi_b_mips
|
||||
#define helper_msa_ori_b helper_msa_ori_b_mips
|
||||
#define helper_msa_nori_b helper_msa_nori_b_mips
|
||||
|
|
|
@ -3160,6 +3160,7 @@
|
|||
#define mips_cpu_register_types mips_cpu_register_types_mips64
|
||||
#define cpu_mips_init cpu_mips_init_mips64
|
||||
#define cpu_state_reset cpu_state_reset_mips64
|
||||
#define do_raise_exception_err do_raise_exception_err_mips64
|
||||
#define helper_msa_andi_b helper_msa_andi_b_mips64
|
||||
#define helper_msa_ori_b helper_msa_ori_b_mips64
|
||||
#define helper_msa_nori_b helper_msa_nori_b_mips64
|
||||
|
|
|
@ -3160,6 +3160,7 @@
|
|||
#define mips_cpu_register_types mips_cpu_register_types_mips64el
|
||||
#define cpu_mips_init cpu_mips_init_mips64el
|
||||
#define cpu_state_reset cpu_state_reset_mips64el
|
||||
#define do_raise_exception_err do_raise_exception_err_mips64el
|
||||
#define helper_msa_andi_b helper_msa_andi_b_mips64el
|
||||
#define helper_msa_ori_b helper_msa_ori_b_mips64el
|
||||
#define helper_msa_nori_b helper_msa_nori_b_mips64el
|
||||
|
|
|
@ -3160,6 +3160,7 @@
|
|||
#define mips_cpu_register_types mips_cpu_register_types_mipsel
|
||||
#define cpu_mips_init cpu_mips_init_mipsel
|
||||
#define cpu_state_reset cpu_state_reset_mipsel
|
||||
#define do_raise_exception_err do_raise_exception_err_mipsel
|
||||
#define helper_msa_andi_b helper_msa_andi_b_mipsel
|
||||
#define helper_msa_ori_b helper_msa_ori_b_mipsel
|
||||
#define helper_msa_nori_b helper_msa_nori_b_mipsel
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
||||
const int ARM64_REGS_STORAGE_SIZE = offsetof(CPUARMState, tlb_table);
|
||||
|
||||
static void arm64_set_pc(struct uc_struct *uc, uint64_t address)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "tcg.h"
|
||||
#include "unicorn_common.h"
|
||||
#include <unicorn/x86.h> /* needed for uc_x86_mmr */
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/m68k/m68k.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
||||
const int M68K_REGS_STORAGE_SIZE = offsetof(CPUM68KState, tlb_table);
|
||||
|
||||
static void m68k_set_pc(struct uc_struct *uc, uint64_t address)
|
||||
|
|
|
@ -1140,22 +1140,11 @@ static inline void cpu_mips_store_cause(CPUMIPSState *env, target_ulong val)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
|
||||
uint32_t exception,
|
||||
int error_code,
|
||||
uintptr_t pc)
|
||||
{
|
||||
CPUState *cs = CPU(mips_env_get_cpu(env));
|
||||
void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env, uint32_t exception,
|
||||
int error_code, uintptr_t pc);
|
||||
|
||||
if (exception < EXCP_SC) {
|
||||
qemu_log_mask(CPU_LOG_INT, "%s: %d %d\n",
|
||||
__func__, exception, error_code);
|
||||
}
|
||||
cs->exception_index = exception;
|
||||
env->error_code = error_code;
|
||||
|
||||
cpu_loop_exit_restore(cs, pc);
|
||||
}
|
||||
void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env, uint32_t exception,
|
||||
int error_code, uintptr_t pc);
|
||||
|
||||
static inline void QEMU_NORETURN do_raise_exception(CPUMIPSState *env,
|
||||
uint32_t exception,
|
||||
|
|
|
@ -827,3 +827,21 @@ void r4k_invalidate_tlb (CPUMIPSState *env, int idx, int use_extra)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
|
||||
uint32_t exception,
|
||||
int error_code,
|
||||
uintptr_t pc)
|
||||
{
|
||||
CPUState *cs = CPU(mips_env_get_cpu(env));
|
||||
|
||||
if (exception < EXCP_SC) {
|
||||
qemu_log_mask(CPU_LOG_INT, "%s: %d %d\n",
|
||||
__func__, exception, error_code);
|
||||
}
|
||||
cs->exception_index = exception;
|
||||
env->error_code = error_code;
|
||||
|
||||
cpu_loop_exit_restore(cs, pc);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/mips/mips.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/sparc/sparc.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "unicorn.h"
|
||||
#include "cpu.h"
|
||||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
||||
const int SPARC_REGS_STORAGE_SIZE = offsetof(CPUSPARCState, tlb_table);
|
||||
|
||||
static bool sparc_stop_interrupt(int intno)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2015 */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/sparc/sparc.h"
|
||||
#include "sysemu/cpus.h"
|
||||
|
@ -9,7 +11,6 @@
|
|||
#include "unicorn_common.h"
|
||||
#include "uc_priv.h"
|
||||
|
||||
|
||||
const int SPARC64_REGS_STORAGE_SIZE = offsetof(CPUSPARCState, tlb_table);
|
||||
|
||||
static bool sparc_stop_interrupt(int intno)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "qemu/osdep.h"
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "tcg-op.h"
|
||||
|
||||
#define CASE_OP_32_64(x) \
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "tcg.h"
|
||||
#include "tcg-op.h"
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#define TCG_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "tcg-target.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
|
Loading…
Reference in a new issue