qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]