qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg


From: Richard Henderson
Subject: Re: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg
Date: Wed, 14 Apr 2021 12:37:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/13/21 10:43 AM, Bruno Piazera Larsen wrote:
The trivial path is to:
* rename translate_init.c.inc to cpu_init.c (since it has to do with
initial definitions for CPUs, and it's not related to translating
anymore);

Anymore? You mean after you've moved out everything related to create_ppc_opcodes? Sure.

* move gen_write_xer and gen_read_xer into cpu_init.c, as they're
used for some sprs, and whatever needs to be moved with it

Well, gen_* things are specifically translation related, since they emit tcg opcodes. But I see it's used as part of a callback from the SPRs.

I think it would be worth moving all of the SPR code out to a separate file, apart from cpu_init.c. There's a lot of it. And, yes, I would move everything that you can that is related out of translate.c.

* move is_indirect_opcode and ind_table to translate.c, since they
are used to translate ppc instructions, and the things defined for
these functions

Yes.

* move opcodes and invalid_handler into cpu_init.c, because they
are only used by stuff in this file.

You could move the opcodes to a new file of its own, including invalid_handler. Moving them to cpu_init.c does not seem helpful.

However, I think the surgery required to disentangle the legacy decoder and all its macros is probably not worth the effort. What will be worth the effort is completing the decodetree conversion so that the legacy decoder goes away entirely.


r~



reply via email to

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