[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t |
Date: |
Sat, 17 Sep 2022 12:25:13 +0100 |
There are already 32 feature bits in use, so change the size of the m68k
CPU features to uint64_t (allong with the associated m68k_feature()
functions) to allow up to 64 feature bits to be used.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
target/m68k/cpu.c | 4 ++--
target/m68k/cpu.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index f681be3a2a..7b4797e2f1 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 |= (1ul << feature);
}
static void m68k_unset_feature(CPUM68KState *env, int feature)
{
- env->features &= (-1u - (1u << feature));
+ env->features &= (-1ul - (1ul << feature));
}
static void m68k_cpu_reset(DeviceState *dev)
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 67b6c12c28..d3384e5d98 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 uint64_t m68k_feature(CPUM68KState *env, int feature)
{
- return (env->features & (1u << feature)) != 0;
+ return (env->features & (1ul << feature)) != 0;
}
void m68k_cpu_list(void);
--
2.30.2
- [PATCH 0/4] target/m68k: MacOS supervisor/user mode switch fixes, Mark Cave-Ayland, 2022/09/17
- [PATCH 1/4] target/m68k: rename M68K_FEATURE_M68000 to M68K_FEATURE_M68K, Mark Cave-Ayland, 2022/09/17
- [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t,
Mark Cave-Ayland <=
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, BALATON Zoltan, 2022/09/17
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, Philippe Mathieu-Daudé, 2022/09/17
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, Mark Cave-Ayland, 2022/09/20
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, Philippe Mathieu-Daudé, 2022/09/20
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, BALATON Zoltan, 2022/09/20
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, Laurent Vivier, 2022/09/21
- Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t, Mark Cave-Ayland, 2022/09/20
[PATCH 3/4] target/m68k: use M68K_FEATURE_MOVEFROMSR_PRIV feature for move_from_sr privilege check, Mark Cave-Ayland, 2022/09/17
[PATCH 4/4] target/m68k: always call gen_exit_tb() after writes to SR, Mark Cave-Ayland, 2022/09/17