From patchwork Mon May 18 19:15:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 473570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8A57414029C for ; Tue, 19 May 2015 05:20:12 +1000 (AEST) Received: from localhost ([::1]:42672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuQaA-0001Rm-Fm for incoming@patchwork.ozlabs.org; Mon, 18 May 2015 15:20:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuQVg-0001Y0-0Q for qemu-devel@nongnu.org; Mon, 18 May 2015 15:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuQVf-000054-5u for qemu-devel@nongnu.org; Mon, 18 May 2015 15:15:31 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuQVe-0008QT-7m for qemu-devel@nongnu.org; Mon, 18 May 2015 15:15:30 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YuQVW-0007vS-4q for qemu-devel@nongnu.org; Mon, 18 May 2015 20:15:22 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 18 May 2015 20:15:18 +0100 Message-Id: <1431976521-30352-19-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1431976521-30352-1-git-send-email-peter.maydell@linaro.org> References: <1431976521-30352-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 18/21] target-arm: Add WFx syndrome function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Greg Bellows Adds a utility function for creating a WFx exception syndrome Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell Acked-by: Edgar E. Iglesias Message-id: 1429722561-12651-9-git-send-email-greg.bellows@linaro.org Signed-off-by: Peter Maydell --- target-arm/internals.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-arm/internals.h b/target-arm/internals.h index 2cc3017..de0a9c1 100644 --- a/target-arm/internals.h +++ b/target-arm/internals.h @@ -347,6 +347,12 @@ static inline uint32_t syn_breakpoint(int same_el) | ARM_EL_IL | 0x22; } +static inline uint32_t syn_wfx(int cv, int cond, int ti) +{ + return (EC_WFX_TRAP << ARM_EL_EC_SHIFT) | + (cv << 24) | (cond << 20) | ti; +} + /* Update a QEMU watchpoint based on the information the guest has set in the * DBGWCR_EL1 and DBGWVR_EL1 registers. */