From patchwork Tue Sep 3 19:12:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 19727 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C8A8B24869 for ; Tue, 3 Sep 2013 19:12:44 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf7069431vea.1 for ; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=rY6QuPk4bfnC1C8GT1FHOGF0b4aBLm7kkM2HDQbRUJY=; b=QGmW36UnWvNW1Y2FBI9Ze1iM6uuenQ7Zd64VGuf1gvjpnqcQhpzIwz54aRDnjXNmFF jaHQZu9tp6EzIUYMIM0DIFe+5t9aulviZycQoghdKiJQITFL4oZTtuT5FkgE3epNrYrr CFac5E51MgRQW0QYgQByVePk+Tm5H/jmcQH0BgVCjba8EsBeyYV7YwXCZlHy+NmK30qQ 1IGDQoEaWlsFRB+5Jm9zTzyh/QAA2E5RstLC7EG1RvEuBmu+zUAuugR+ovWq8jHPRzHo 9Jf9kZsWz0jdBAlJ0bygRLNAKp98pP5EXHfiSj6rM5b+0WXaHs3cdL2/5vBrGRGMKrO/ QfyQ== X-Received: by 10.236.68.2 with SMTP id k2mr10809451yhd.16.1378235564633; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.14.106 with SMTP id o10ls2655865qec.36.gmail; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) X-Received: by 10.220.42.140 with SMTP id s12mr1425508vce.33.1378235564531; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id tt2si4833990vcb.77.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Sep 2013 12:12:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hf12so4402992vcb.27 for ; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) X-Gm-Message-State: ALoCoQkYHWGJrtwoG7/jxtTFmE22/Fo3hBUnJVNBJnrfy8wbQxonWZ575vRl7PGa+HCT5HaHee7d X-Received: by 10.220.11.7 with SMTP id r7mr29510097vcr.12.1378235564434; Tue, 03 Sep 2013 12:12:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp190476vcz; Tue, 3 Sep 2013 12:12:43 -0700 (PDT) X-Received: by 10.180.188.132 with SMTP id ga4mr18428886wic.10.1378235545777; Tue, 03 Sep 2013 12:12:25 -0700 (PDT) Received: from chiark.greenend.org.uk (v6.chiark.greenend.org.uk. [2001:ba8:1e3::]) by mx.google.com with ESMTPS id wo9si7621924wjc.167.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Sep 2013 12:12:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pmaydell@chiark.greenend.org.uk designates 2001:ba8:1e3:: as permitted sender) client-ip=2001:ba8:1e3::; Received: by chiark.greenend.org.uk (Debian Exim 4.72 #1) with local (return-path pmaydell@chiark.greenend.org.uk) id 1VGw1Y-0005o1-6c; Tue, 03 Sep 2013 20:12:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Andreas Schwab , Alexander Graf , "Mian M. Hamayun" , kvmarm@lists.cs.columbia.edu, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH v6 03/24] target-arm: Extract the disas struct to a header file Date: Tue, 3 Sep 2013 20:12:03 +0100 Message-Id: <1378235544-22290-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1378235544-22290-1-git-send-email-peter.maydell@linaro.org> References: <1378235544-22290-1-git-send-email-peter.maydell@linaro.org> Sender: Peter Maydell X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Alexander Graf We will need to share the disassembly status struct between AArch32 and AArch64 modes. So put it into a header file that both sides can use. Signed-off-by: Alexander Graf Signed-off-by: John Rigby Message-id: 1368505980-17151-2-git-send-email-john.rigby@linaro.org Signed-off-by: Peter Maydell --- target-arm/translate.c | 24 +----------------------- target-arm/translate.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 target-arm/translate.h diff --git a/target-arm/translate.c b/target-arm/translate.c index 8e58eb1..1bb6f46 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -46,29 +46,7 @@ #define ARCH(x) do { if (!ENABLE_ARCH_##x) goto illegal_op; } while(0) -/* internal defines */ -typedef struct DisasContext { - target_ulong pc; - int is_jmp; - /* Nonzero if this instruction has been conditionally skipped. */ - int condjmp; - /* The label that will be jumped to when the instruction is skipped. */ - int condlabel; - /* Thumb-2 conditional execution bits. */ - int condexec_mask; - int condexec_cond; - struct TranslationBlock *tb; - int singlestep_enabled; - int thumb; - int bswap_code; -#if !defined(CONFIG_USER_ONLY) - int user; -#endif - int vfp_enabled; - int vec_len; - int vec_stride; -} DisasContext; - +#include "translate.h" static uint32_t gen_opc_condexec_bits[OPC_BUF_SIZE]; #if defined(CONFIG_USER_ONLY) diff --git a/target-arm/translate.h b/target-arm/translate.h new file mode 100644 index 0000000..e727bc6 --- /dev/null +++ b/target-arm/translate.h @@ -0,0 +1,27 @@ +#ifndef TARGET_ARM_TRANSLATE_H +#define TARGET_ARM_TRANSLATE_H + +/* internal defines */ +typedef struct DisasContext { + target_ulong pc; + int is_jmp; + /* Nonzero if this instruction has been conditionally skipped. */ + int condjmp; + /* The label that will be jumped to when the instruction is skipped. */ + int condlabel; + /* Thumb-2 conditional execution bits. */ + int condexec_mask; + int condexec_cond; + struct TranslationBlock *tb; + int singlestep_enabled; + int thumb; + int bswap_code; +#if !defined(CONFIG_USER_ONLY) + int user; +#endif + int vfp_enabled; + int vec_len; + int vec_stride; +} DisasContext; + +#endif /* TARGET_ARM_TRANSLATE_H */