aboutsummaryrefslogtreecommitdiff
path: root/target-arm/translate.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-08-09 14:19:01 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-09-03 19:39:06 +0100
commit30796257e8f047f91d2a3a1b3038884c32522358 (patch)
treea4788e0c3b7f1770a85fbc50333b8b8ff84bcc30 /target-arm/translate.h
parent94a753cf2db5e1b03f5bd31ec4dc2672f43b1cae (diff)
target-arm: Add AArch64 translation stub
We should translate AArch64 mode separately from AArch32 mode. In AArch64 mode, registers look vastly different, instruction encoding is completely different, basically the system turns into a different machine. So let's do a simple if() in translate.c to decide whether we can handle the current code in the legacy AArch32 code or in the new AArch64 code. So far, the translation always complains about unallocated instructions. There is no emulator functionality in this patch! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: John Rigby <john.rigby@linaro.org> Message-id: 1368505980-17151-5-git-send-email-john.rigby@linaro.org [PMM: * provide no-op versions of a64 functions ifndef TARGET_AARCH64; this lets us avoid #ifdefs in translate.c * insert the missing call to disas_a64_insn() * stash the insn in the DisasContext rather than reloading it in real_unallocated_encoding() ] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/translate.h')
-rw-r--r--target-arm/translate.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/target-arm/translate.h b/target-arm/translate.h
index 5be2eedc90..67c776053b 100644
--- a/target-arm/translate.h
+++ b/target-arm/translate.h
@@ -4,6 +4,7 @@
/* internal defines */
typedef struct DisasContext {
target_ulong pc;
+ uint32_t insn;
int is_jmp;
/* Nonzero if this instruction has been conditionally skipped. */
int condjmp;
@@ -27,4 +28,22 @@ typedef struct DisasContext {
extern TCGv_ptr cpu_env;
+#ifdef TARGET_AARCH64
+void a64_translate_init(void);
+void disas_a64_insn(CPUARMState *env, DisasContext *s);
+void gen_a64_set_pc_im(uint64_t val);
+#else
+static inline void a64_translate_init(void)
+{
+}
+
+static inline void disas_a64_insn(CPUARMState *env, DisasContext *s)
+{
+}
+
+static inline void gen_a64_set_pc_im(uint64_t val)
+{
+}
+#endif
+
#endif /* TARGET_ARM_TRANSLATE_H */