From 9d4c4e872e7598ecbe25437dc4f663b248b2c8a5 Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Tue, 27 May 2014 17:09:50 +0100 Subject: target-arm: Move get_mem_index to translate.h So that it can be shared with the AArch32 code. Signed-off-by: Edgar E. Iglesias Message-id: 1400980132-25949-2-git-send-email-edgar.iglesias@gmail.com Message-id: 1400805738-11889-5-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- target-arm/translate.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'target-arm/translate.h') 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. -- cgit v1.1