From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzDBI-0003wK-6m for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:30:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzDBC-0000pa-9T for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:30:00 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzDBC-0000ol-3K for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:29:54 -0500 Received: by mail-pa0-f54.google.com with SMTP id fb1so5985662pad.41 for ; Thu, 11 Dec 2014 15:29:53 -0800 (PST) From: Greg Bellows Date: Thu, 11 Dec 2014 17:29:22 -0600 Message-Id: <1418340569-30519-9-git-send-email-greg.bellows@linaro.org> In-Reply-To: <1418340569-30519-1-git-send-email-greg.bellows@linaro.org> References: <1418340569-30519-1-git-send-email-greg.bellows@linaro.org> Subject: [Qemu-devel] [PATCH v2 08/15] target-arm: Add feature unset function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch, peter.maydell@linaro.org Cc: Greg Bellows 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 Reviewed-by: Peter Maydell --- target-arm/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index d3db279..01afed2 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); -- 1.8.3.2