[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] target-arm : make parameter of feature/status c
From: |
Chih-Min Chao |
Subject: |
[Qemu-devel] [PATCH 1/2] target-arm : make parameter of feature/status checking function const |
Date: |
Fri, 5 Sep 2014 02:01:16 +0800 |
CPUARMState is one of parameter used by
is_a64
arm_feature
arm_el_is_aa64
They only read it without any side effect and shold be changed to
const parameter
Signed-off-by: Chih-Min Chao <address@hidden>
---
target-arm/cpu.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 51bedc8..d7f1776 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -340,7 +340,7 @@ ARMCPU *cpu_arm_init(const char *cpu_model);
int cpu_arm_exec(CPUARMState *s);
uint32_t do_arm_semihosting(CPUARMState *env);
-static inline bool is_a64(CPUARMState *env)
+static inline bool is_a64(const CPUARMState *env)
{
return env->aarch64;
}
@@ -677,13 +677,13 @@ enum arm_features {
ARM_FEATURE_V8_PMULL, /* implements PMULL part of v8 Crypto Extensions */
};
-static inline int arm_feature(CPUARMState *env, int feature)
+static inline int arm_feature(const CPUARMState *env, int feature)
{
return (env->features & (1ULL << feature)) != 0;
}
/* Return true if the specified exception level is running in AArch64 state. */
-static inline bool arm_el_is_aa64(CPUARMState *env, int el)
+static inline bool arm_el_is_aa64(const CPUARMState *env, int el)
{
/* We don't currently support EL2 or EL3, and this isn't valid for EL0
* (if we're in EL0, is_a64() is what you want, and if we're not in EL0
--
2.0.4