mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 06:25:12 +00:00
target/arm: Make set_feature() available for other files
Move the common set_feature() and unset_feature() functions from cpu.c and cpu64.c to cpu.h. Backports commit 5fda95041d7237ab35733ceb66e0cb89f6107169 from qemu
This commit is contained in:
parent
cfe94f63f3
commit
dfe548117e
|
@ -660,16 +660,6 @@ static QEMU_UNUSED_FUNC bool arm_cpu_is_big_endian(CPUState *cs)
|
|||
return (env->cp15.sctlr_el[cur_el] & SCTLR_EE) != 0;
|
||||
}
|
||||
|
||||
static inline void set_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features |= 1ULL << feature;
|
||||
}
|
||||
|
||||
static inline void unset_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features &= ~(1ULL << feature);
|
||||
}
|
||||
|
||||
#define ARM_CPUS_PER_CLUSTER 8
|
||||
|
||||
static void cpreg_hashtable_data_destroy(gpointer data)
|
||||
|
|
|
@ -691,6 +691,16 @@ typedef struct CPUARMState {
|
|||
struct uc_struct *uc;
|
||||
} CPUARMState;
|
||||
|
||||
static inline void set_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features |= 1ULL << feature;
|
||||
}
|
||||
|
||||
static inline void unset_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features &= ~(1ULL << feature);
|
||||
}
|
||||
|
||||
/**
|
||||
* ARMELChangeHookFn:
|
||||
* type of a function which can be registered via arm_register_el_change_hook()
|
||||
|
|
|
@ -25,16 +25,6 @@
|
|||
#include "hw/arm/arm.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
static inline void set_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features |= 1ULL << feature;
|
||||
}
|
||||
|
||||
static inline QEMU_UNUSED_FUNC void unset_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features &= ~(1ULL << feature);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
static uint64_t a57_a53_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue