[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/12] ARM: Add AArch64 translation stub
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 04/12] ARM: Add AArch64 translation stub |
Date: |
Fri, 8 Mar 2013 10:31:03 +0800 |
On 6 March 2013 10:01, Alexander Graf <address@hidden> wrote:
> 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.
> @@ -9944,6 +9948,9 @@ static inline void
> gen_intermediate_code_internal(CPUARMState *env,
> gen_set_label(dc->condlabel);
> }
> if (dc->condjmp || !dc->is_jmp) {
> + if (is_a64(env)) {
> + gen_a64_set_pc_im(dc->pc);
> + }
> gen_set_pc_im(dc->pc);
> dc->condjmp = 0;
> }
> @@ -9967,6 +9974,9 @@ static inline void
> gen_intermediate_code_internal(CPUARMState *env,
> gen_set_condexec(dc);
> switch(dc->is_jmp) {
> case DISAS_NEXT:
> + if (is_a64(env)) {
> + gen_a64_set_pc_im(dc->pc);
> + }
As I said in a comment on another patch, I think these "if (is_a64())" checks
should be pulled out to a higher level than you have them. We should say
"if this TB is for a64 mode then call a function in translate-a64.c which
handles the entire TB translation". I think that will be easier to understand
(for instance all the stuff in the current arm/thumb top level loop for
handling conditional execution is entirely irrelevant for a64 and
just confusing).
thanks
-- PMM
- [Qemu-devel] [PATCH 05/12] AArch64: Add gdb stub, (continued)
- [Qemu-devel] [PATCH 05/12] AArch64: Add gdb stub, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 07/12] linux-user: AArch64 requires at least 3.8.0, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 11/12] linux-user: Add AArch64 support, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 01/12] ARM: Extract the disas struct to a header file, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 06/12] linux-user: Don't treat aarch64 cpu names specially, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 08/12] linux-user: Add syscall handling for AArch64, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 10/12] linux-user: Add signal handling for AArch64, Alexander Graf, 2013/03/05
- [Qemu-devel] [PATCH 04/12] ARM: Add AArch64 translation stub, Alexander Graf, 2013/03/05