diff options
| author | Mark Cave-Ayland | 2022-09-25 15:48:03 +0200 |
|---|---|---|
| committer | Laurent Vivier | 2022-09-26 23:37:04 +0200 |
| commit | 2dc7bf63cf77d23b287c8d78628d62046fba1bf4 (patch) | |
| tree | 388bfd3e601692ddaba612a3ed9ec5dbf74748a1 /target/m68k/cpu.c | |
| parent | Merge tag 'pull-target-arm-20220922' of https://git.linaro.org/people/pmaydel... (diff) | |
| download | qemu-2dc7bf63cf77d23b287c8d78628d62046fba1bf4.tar.gz qemu-2dc7bf63cf77d23b287c8d78628d62046fba1bf4.tar.xz qemu-2dc7bf63cf77d23b287c8d78628d62046fba1bf4.zip | |
target/m68k: increase size of m68k CPU features from uint32_t to uint64_t
There are already 32 feature bits in use, so change the size of the m68k
CPU features to uint64_t (along with the associated m68k_feature()
functions) to allow up to 64 feature bits to be used.
At the same time make use of the BIT_ULL() macro when reading/writing
the CPU feature bits to improve readability, and also update m68k_feature()
to return a bool rather than an int.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220925134804.139706-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target/m68k/cpu.c')
| -rw-r--r-- | target/m68k/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index f681be3a2a..8d23c72056 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) |
