On 4/14/21 1:07 PM, Bruno Piazera Larsen wrote:
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.

Yeah, now that I look at the SPR code, I'm starting to think it's easier
I think it's what fabiano had in mind too, but we'll probably have 3 files,
spr_common.c, spr_tcg.c and spr_kvm.c. It's a bit of surgery, but it's
probably worth it, to avoid a mess of ifdefs.

Sounds good.

While waiting for a reply I tried this. It's really not, it creates about 6k errors.
I ended up moving everything that used it from cpu_init.c into translate.c.
create_ppc_opcodes and destroy_ppc_opcodes ended up going there, and
I added prototypes to internal.h to call them in the realize and unrealize
functions.

Moving into translate.c sounds like a good option.


r~

Reply via email to