aboutsummaryrefslogtreecommitdiff
path: root/target/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'target/m68k')
-rw-r--r--target/m68k/cpu.c4
-rw-r--r--target/m68k/cpu.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index f681be3..8d23c72 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -38,12 +38,12 @@ static bool m68k_cpu_has_work(CPUState *cs)
static void m68k_set_feature(CPUM68KState *env, int feature)
{
- env->features |= (1u << feature);
+ env->features |= BIT_ULL(feature);
}
static void m68k_unset_feature(CPUM68KState *env, int feature)
{
- env->features &= (-1u - (1u << feature));
+ env->features &= ~BIT_ULL(feature);
}
static void m68k_cpu_reset(DeviceState *dev)
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 67b6c12..f5c6e95 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -154,7 +154,7 @@ typedef struct CPUArchState {
struct {} end_reset_fields;
/* Fields from here on are preserved across CPU reset. */
- uint32_t features;
+ uint64_t features;
} CPUM68KState;
/*
@@ -539,9 +539,9 @@ enum m68k_features {
M68K_FEATURE_TRAPCC,
};
-static inline int m68k_feature(CPUM68KState *env, int feature)
+static inline bool m68k_feature(CPUM68KState *env, int feature)
{
- return (env->features & (1u << feature)) != 0;
+ return (env->features & BIT_ULL(feature)) != 0;
}
void m68k_cpu_list(void);