From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WndcM-0002qW-G3 for qemu-devel@nongnu.org; Thu, 22 May 2014 20:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WndcF-0006GV-BI for qemu-devel@nongnu.org; Thu, 22 May 2014 20:45:50 -0400 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:42872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WndcF-0006GJ-8C for qemu-devel@nongnu.org; Thu, 22 May 2014 20:45:43 -0400 Received: by mail-qc0-f171.google.com with SMTP id x13so7180580qcv.30 for ; Thu, 22 May 2014 17:45:42 -0700 (PDT) From: "Edgar E. Iglesias" Date: Fri, 23 May 2014 10:42:01 +1000 Message-Id: <1400805738-11889-5-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1400805738-11889-1-git-send-email-edgar.iglesias@gmail.com> References: <1400805738-11889-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v4 04/21] target-arm: Move get_mem_index to translate.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, john.williams@xilinx.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net From: "Edgar E. Iglesias" So that it can be shared with the AArch32 code. Signed-off-by: Edgar E. Iglesias --- 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. -- 1.8.3.2