From patchwork Sun May 25 01:08:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 352191 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 BD5E8140085 for ; Sun, 25 May 2014 11:11:01 +1000 (EST) Received: from localhost ([::1]:49815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoMxn-0004lB-AT for incoming@patchwork.ozlabs.org; Sat, 24 May 2014 21:10:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoMxD-0003zp-ET for qemu-devel@nongnu.org; Sat, 24 May 2014 21:10:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoMx7-0004PJ-Fw for qemu-devel@nongnu.org; Sat, 24 May 2014 21:10:23 -0400 Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]:59826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoMx7-0004PA-5c for qemu-devel@nongnu.org; Sat, 24 May 2014 21:10:17 -0400 Received: by mail-pb0-f53.google.com with SMTP id md12so5897026pbc.12 for ; Sat, 24 May 2014 18:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hZiWNZqvBoTPkEjwOy1Y3GLEU+iGK1z1nVuJNzNNPKk=; b=DAeuV6mzasHr9myhpvMA/s+Jb2rv5ChyTG0wntFJtdGs94CQl9xk9bGeJI6R31n7c0 nf/K8zVZuMN8DZdn0cweCJHcSL5FmZdcxqWOga0NiCcesulxIh742qxJYykJGVB/+l+n PatgoYzYHcb4AmWXOrjHEe9eiJSMWD2OwdorRxFTQxuZaRWgK5Wao7roeLTNI/dzo9Rx CJlqNQI02kQuGBl2INMO4dSaYLAMgYIMubvHWwVu/rA7AvQCVcQ5mzzLIenefpghV9wo Rp5E0xcDLiYo5ybJbDGCEB62FORIG3VDBcBErxUyvhaByhsPqULgDLpg5H5Q1MbDQmPj Aisg== X-Received: by 10.67.13.134 with SMTP id ey6mr17391013pad.44.1400980215121; Sat, 24 May 2014 18:10:15 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id xw5sm35930261pab.30.2014.05.24.18.10.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 24 May 2014 18:10:13 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 25 May 2014 11:08:30 +1000 Message-Id: <1400980132-25949-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400980132-25949-1-git-send-email-edgar.iglesias@gmail.com> References: <1400980132-25949-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::235 Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, john.williams@xilinx.com, greg.bellows@linaro.org, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v5 01/23] target-arm: Move get_mem_index to translate.h 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: "Edgar E. Iglesias" So that it can be shared with the AArch32 code. Signed-off-by: Edgar E. Iglesias Message-id: 1400805738-11889-5-git-send-email-edgar.iglesias@gmail.com --- target-arm/translate-a64.c | 9 --------- target-arm/translate.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index b62db4d..bfd139a 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -162,15 +162,6 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f, } } -static int get_mem_index(DisasContext *s) -{ -#ifdef CONFIG_USER_ONLY - return 1; -#else - return s->user; -#endif -} - void gen_a64_set_pc_im(uint64_t val) { tcg_gen_movi_i64(cpu_pc, val); diff --git a/target-arm/translate.h b/target-arm/translate.h index 34328f4..8737af0 100644 --- a/target-arm/translate.h +++ b/target-arm/translate.h @@ -52,6 +52,15 @@ static inline int arm_dc_feature(DisasContext *dc, int feature) return (dc->features & (1ULL << feature)) != 0; } +static inline int get_mem_index(DisasContext *s) +{ +#ifdef CONFIG_USER_ONLY + return 1; +#else + return s->user; +#endif +} + /* target-specific extra values for is_jmp */ /* These instructions trap after executing, so the A32/T32 decoder must * defer them until after the conditional execution state has been updated.