[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/34] target/arm: Make set_feature() available for other files
From: |
Peter Maydell |
Subject: |
[PULL 28/34] target/arm: Make set_feature() available for other files |
Date: |
Mon, 11 May 2020 14:33:59 +0100 |
From: Thomas Huth <address@hidden>
Move the common set_feature() and unset_feature() functions
from cpu.c and cpu64.c to cpu.h.
Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Message-ID: <address@hidden>
[PMD: Split Thomas's patch in two: set_feature, cpu_register]
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
target/arm/cpu.h | 10 ++++++++++
target/arm/cpu.c | 10 ----------
target/arm/cpu64.c | 10 ----------
3 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 8608da6b6fc..676f216b67c 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -696,6 +696,16 @@ typedef struct CPUARMState {
void *gicv3state;
} 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()
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 5d64adfe76e..13959cb6435 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -725,16 +725,6 @@ static bool arm_cpu_virtio_is_big_endian(CPUState *cs)
#endif
-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);
-}
-
static int
print_insn_thumb1(bfd_vma pc, disassemble_info *info)
{
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 9bdf75b1abb..cbaa5ed2287 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -29,16 +29,6 @@
#include "kvm_arm.h"
#include "qapi/visitor.h"
-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);
-}
-
#ifndef CONFIG_USER_ONLY
static uint64_t a57_a53_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
{
--
2.20.1
- [PULL 12/34] accel/tcg: Add probe_access_flags, (continued)
- [PULL 12/34] accel/tcg: Add probe_access_flags, Peter Maydell, 2020/05/11
- [PULL 17/34] target/arm: Adjust interface of sve_ld1_host_fn, Peter Maydell, 2020/05/11
- [PULL 19/34] target/arm: Handle watchpoints in sve_ld1_r, Peter Maydell, 2020/05/11
- [PULL 20/34] target/arm: Use SVEContLdSt for multi-register contiguous loads, Peter Maydell, 2020/05/11
- [PULL 24/34] target/arm: Reuse sve_probe_page for scatter stores, Peter Maydell, 2020/05/11
- [PULL 23/34] target/arm: Reuse sve_probe_page for gather first-fault loads, Peter Maydell, 2020/05/11
- [PULL 22/34] target/arm: Use SVEContLdSt for contiguous stores, Peter Maydell, 2020/05/11
- [PULL 26/34] target/arm: Remove sve_memopidx, Peter Maydell, 2020/05/11
- [PULL 21/34] target/arm: Update contiguous first-fault and no-fault loads, Peter Maydell, 2020/05/11
- [PULL 27/34] target/arm/kvm: Inline set_feature() calls, Peter Maydell, 2020/05/11
- [PULL 28/34] target/arm: Make set_feature() available for other files,
Peter Maydell <=
- [PULL 29/34] target/arm/cpu: Use ARRAY_SIZE() to iterate over ARMCPUInfo[], Peter Maydell, 2020/05/11
- [PULL 30/34] target/arm/cpu: Restrict v8M IDAU interface to Aarch32 CPUs, Peter Maydell, 2020/05/11
- [PULL 25/34] target/arm: Reuse sve_probe_page for gather loads, Peter Maydell, 2020/05/11
- [PULL 32/34] hw/arm/musicpal: Map the UART devices unconditionally, Peter Maydell, 2020/05/11
- [PULL 33/34] target/arm: Use tcg_gen_gvec_5_ptr for sve FMLA/FCMLA, Peter Maydell, 2020/05/11
- [PULL 34/34] target/arm: Fix tcg_gen_gvec_dup_imm vs DUP (indexed), Peter Maydell, 2020/05/11
- [PULL 31/34] target/arm: Restrict TCG cpus to TCG accel, Peter Maydell, 2020/05/11
- Re: [PULL 00/34] target-arm queue, Peter Maydell, 2020/05/11
- Re: [PULL 00/34] target-arm queue, no-reply, 2020/05/11