aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Bellows <greg.bellows@linaro.org>2014-12-02 15:54:48 -0600
committerGreg Bellows <greg.bellows@linaro.org>2014-12-03 10:34:10 -0600
commitf3c4dea2bd35a2455d08e34c764c665fd5dda188 (patch)
treeb6c5c791ac3e98dd754cc56882df6b66ff0627b1
parent2326819e6104fb3222ec185b91a82886cc77e297 (diff)
target-arm: Add feature unset function
Add an unset_feature() function to compliment the set_feature() function. This will be used to disable functions after they have been enabled during initialization. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
-rw-r--r--target-arm/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 70f12b22c..a15c57c8e 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -327,6 +327,11 @@ 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 void arm_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);