nnecessary
* kept more functions as static
* ensured that the project builds after every commit
Bruno Larsen (billionai) (4):
target/ppc: renamed SPR registration functions
target/ppc: move SPR R/W callbacks to translate.c
target/ppc: turned SPR R/W callbacks not static
target/ppc: isolated cpu
Moved all read and write callbacks for SPRs away from
translate_init.c.inc and into translate.c; these functions are
TCG only, so this motion is required to enable building with
the flag disable-tcg
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate.c | 1037
Renamed all gen_spr_* and gen_* functions specifically related to
registering SPRs to register_*_sprs and register_*, to avoid future
confusion with other TCG related code.
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/translate_init.c.inc | 860
To be able to compile translate_init.c.inc as a standalone file,
we have to make the callbacks accessible outside of translate.c;
This patch does exactly that
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.h | 134 ++
target/ppc/translate.c | 210
finished isolation of CPU initialization logic from
translation logic. CPU initialization now only has common code
and may or may not call accelerator-specific code, as the
build options require.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/{translate_init.c.inc => cpu_init.c}
Moved all read and write callbacks for SPRs away from
translate_init.c.inc and into translate.c; these functions are
TCG only, so this motion is required to enable building with
the flag disable-tcg
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc
To be able to compile translate_init.c.inc as a standalone file,
we have to make the callbacks accessible outside of translate.c;
This patch does exactly that
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.h | 134 ++
target/ppc/translate.c | 210
finished isolation of CPU initialization logic from
translation logic. CPU initialization now only has common code
and may or may not call accelerator-specific code, as the
build options require.
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: David Gibson
---
target/ppc
r the
end are a bit of a shot in the dark, so we figured RFC would be a better
way to tag this patch series.
Bruno Larsen (billionai) (10):
target/ppc: created ppc_{store,get}_vscr for generic vscr usage
target/ppc: moved ppc_store_sdr1 to cpu.c
target/ppc: moved ppc_cpu_dump_state to cpu_i
This function is used in !TCG cases, so it has been moved into a file
that is compiled when --disable-tcg is selected.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c | 11 +++
target/ppc/misc_helper.c | 10 --
2 files changed, 11 insertions(+), 10 deletions
Some functions unrelated to TCG use helper_m{t,f}vscr, so generic versions
of those functions were added to cpu.c, in preparation for compilation
without TCG
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/arch_dump.c | 3 +--
target/ppc/cpu.c| 16
target/ppc
This function is used by !TCG cases, so it was moved to a common code
file. We chose gdbstub.c since it was the one giving us grief over it.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/gdbstub.c | 7 +++
target/ppc/misc_helper.c | 6 --
2 files changed, 7 insertions(+), 6
This function was forgotten in the cpu_init code motion series, but it
seems to be used regardless of TCG, and so needs to be moved to support
disabling TCG.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu_init.c | 182 +++
target/ppc/translate.c
Moved this function that is required in !TCG cases into a
common code file
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c| 29 +
target/ppc/mmu_helper.c | 26 --
2 files changed, 29 insertions(+), 26 deletions(-)
diff
updated build file to not compile some sources that are unnecessary if
TCG is disabled on the system.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/target/ppc/meson.build b/target/ppc
ile in the !TCG case would create an
ifdef hell, but extracting the functions meant moving many others as
well, and there weren't any good places to put them.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/tcg-stub.c | 33 +
1 file changed, 33 insert
some common code needs to store information in fpscr, but this function
relies on TCG cde to work. This patch adds a kvm way to do it, and a
transparent way to call it when TCG is not compiled
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/gdbstub.c | 1 +
target/ppc/kvm.c | 14
Updated the code in machine.c to use the generic ppc_{store,get}_vscr
instead of helper style functions, so it can build without TCG
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/machine.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/ppc/machine.c b
should reorder some code to minimize ifdef count
Signed-off-by: Bruno Larsen (billionai)
---
include/exec/helper-proto.h | 2 ++
target/ppc/cpu_init.c | 8
target/ppc/excp_helper.c| 6 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/exec/helper
From: "Lucas Mateus Castro (alqotel)"
Added tlb_set_page and tlb_set_page_with_attrs to the
stubbed functions in exec-all.h as it is needed
in some functions when compiling without TCG
Signed-off-by: Lucas Mateus Castro (alqotel)
---
include/exec/exec-all.h | 10 ++
1 file changed, 10
call functions from gdbstub or translate_init
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c| 859 +++
target/ppc/cpu.h| 15 +
target/ppc/gdbstub.c| 253 +++
target/ppc/translate_init.c.inc | 1148
updated the meson file to respect the disable-tcg option and only add
relevant files to the build process
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/target/ppc/meson.build b
in kvm_ppc.h, transparently changes the helper
into the KVM call, if TCG is not enabled. I believe the first solution
is better, but it is less readable, so I wanted to have some feedback
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/arch_dump.c | 17 +
target/ppc/kvm.c
by a KVM implementation in the final product,
but I'm not sure which ones have to be replace, which can remain
stubs, and which should not be called at all. Input in general is
very much welcome.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/tcg-st
21-04/msg0717.
The second patch shows the 2 strategies we've considered, and hope to
get feedback on. The third patch contains the stubs we haven't decided
on how to deal with yet, but needed to exist to compile the project.
The final patch just changes the meson.build rules
Bruno Larsen
As suggested by Fabiano Rosas, all the code related to gdb has been moved
from translate_init.c.inc file to the gdbstub.c file, where it makes more
sense
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.h| 11 ++
target/ppc/gdbstub.c| 261
All the code related to gdb has been moved from translate_init.c.inc
file to the gdbstub.c file, where it makes more sense.
Updated version, solving some missing parts of the patch and style choices.
Signed-off-by: Bruno Larsen (billionai)
Suggested-by: Fabiano Rosas
---
target/ppc/cpu.h
All the code related to gdb has been moved from translate_init.c.inc
file to the gdbstub.c file, where it makes more sense.
This new version puts the prototypes in internal.h, to not expose
them unnecessarily.
Signed-off-by: Bruno Larsen (billionai)
Suggested-by: Fabiano Rosas
---
target/ppc
were already accepted
* applied rth's cleanup to ppc_store_sdr1
* changed destination of ppc_store_msr
* undone change to helper-proto, now fewer files include it
Bruno Larsen (billionai) (9):
target/ppc: cleaned error_report from ppc_store_sdr1
target/ppc: moved ppc_store_lpcr and ppc_s
These functions are used in hw/ppc logic, during machine startup, which
means it must be compiled when --disable-tcg is selected, and so it has
been moved into a common code file
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
Reviewed-by: David Gibson
---
target/ppc
Moved the ppc_cpu_do_interrupt function to cpu.c file, where it makes
more sense, and turned powerpc_excp not static, as it now needs to be
accessed from outside of excp_helper.c
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c | 20
target/ppc/cpu.h
fpscr_set_rounding_mode into cpu.c as it could now be moved
there, and it is needed when a value for the fpscr is being stored
directly.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/cpu.c| 43
target/ppc
Changed how the function ppc_store_sdr1, from error_report(...) to
qemu_log_mask(LOG_GUEST_ERROR, ...).
Signed-off-by: Bruno Larsen (billionai)
Suggested-by: Richard Henderson
---
target/ppc/cpu.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/ppc/cpu.c b
It is preferable to store the current rounding mode and retore from that
than recalculating from fpscr, so we changed the behavior of do_fri and
VSX_ROUND to do it like that.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc
updated build file to not compile some sources that are unnecessary if
TCG is disabled on the system.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
also create stubs for ppc_*_opcodes, to make the
ifdef hell a little smaller, and have hid part of the spr_registration
logic into the macro that can make the TCG part disappear.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu_init.c| 11 +++---
target/ppc/excp_helper.c | 85
These files included helper-proto.h, but didn't use or declare any
helpers, so the #include has been removed
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/cpu_init.c| 1 -
target/ppc/gdbstub.c | 1 -
target/ppc/mmu-hash32.c | 1 -
target/pp
be
reached.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 4
target/ppc/tcg-stub.c | 25 +
2 files changed, 29 insertions(+)
create mode 100644 target/ppc/tcg-stub.c
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
index d1aa7d5d39..
o ppc_store_sdr1
* changed destination of ppc_store_msr
* undone change to helper-proto, now fewer files include it
Bruno Larsen (billionai) (5):
target/ppc: moved ppc_cpu_do_interrupt to cpu.c
target/ppc: used ternary operator when registering MAS
target/ppc: added ifdefs around TCG-only c
Moved the ppc_cpu_do_interrupt function to cpu.c file, where it makes
more sense, and turned powerpc_excp not static, as it now needs to be
accessed from outside of excp_helper.c
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c | 20
target/ppc/cpu.h
ed as part of a future cleanup (all the dump_statistics part is
almost never used and will become obsolete as we transition to using
decodetree).
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu_init.c| 2 ++
target/ppc/excp_helper.c | 21 ++---
target/ppc/mmu-hash64.c
The write calback decision when registering the MAS SPR has been turned
into a ternary operation, rather than an if-then-else block.
Signed-off-by: Bruno Larsen (billionai)
Suggested-by: Richard Henderson
---
target/ppc/cpu_init.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions
be
reached.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 4
target/ppc/tcg-stub.c | 45 ++
2 files changed, 49 insertions(+)
create mode 100644 target/ppc/tcg-stub.c
diff --git a/target/ppc/meson.build b/target/ppc/meson.b
updated build file to not compile some sources that are unnecessary if
TCG is disabled on the system.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
er compiles with linux-user
* removed patches ther were already accepted
* applied rth's cleanup to ppc_store_sdr1
* changed destination of ppc_store_msr
* undone change to helper-proto, now fewer files include it
Bruno Larsen (billionai) (4):
target/ppc: used ternary operator when
ed as part of a future cleanup (all the dump_statistics part is
almost never used and will become obsolete as we transition to using
decodetree).
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu_init.c| 2 ++
target/ppc/excp_helper.c | 21 ++---
target/ppc/mmu-hash64.c
y the decision and assignment to the local pointer,
creating compiler errors. This cleanup looked better than using ifdefs,
so we decided to with it.
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/cpu_init.c | 9 +++--
1 file changed, 3 insertions(+), 6 dele
updated build file to not compile some sources that are unnecessary if
TCG is disabled on the system.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
be
reached.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/meson.build | 4
target/ppc/tcg-stub.c | 45 ++
2 files changed, 49 insertions(+)
create mode 100644 target/ppc/tcg-stub.c
diff --git a/target/ppc/meson.build b/target/ppc/meson.b
ppc_store_ptcr, defined in mmu_helper.c, was only used by
helper_store_ptcr, in misc_helper.c. To avoid possible confusion,
the function was folded into the helper.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.h | 1 -
target/ppc/misc_helper.c | 24
with ppc_cpu_dump_statistics.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.h | 1 -
target/ppc/cpu_init.c | 3 ---
target/ppc/translate.c | 51 --
3 files changed, 55 deletions(-)
diff --git a/targe
tially), those statistics won't be used anymore. Therefore,
this patch removes that functinality completely.
This series was suggested by Richard Henderson
Bruno Larsen (billionai) (5):
target/ppc: fixed GEN_OPCODE behavior when PPC_DUMP_CPU is set
target/ppc: remove ppc_cpu_dump_statistics
igned-off-by: Bruno Larsen (billionai)
---
target/ppc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index ea200f9637..6c0f424d81 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -1345,7 +1345,7 @@ ty
Removed the commented out definition and all ifdefs relating to
PPC_DUMP_STATISTICS, as it's hardly ever used.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff
No more architectures set the pointer to dump_statistics, so there's no
point in keeping it, or the related cpu_dump_statistics function.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
hw/core/cpu.c | 9 -
include/hw/core/cpu.h | 12 --
Since ppc was the last architecture to collect these statistics and
it is currently phasing this collection out, the command that would query
this information is being removed.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
hmp-commands-info.hx | 13
fpscr_set_rounding_mode into cpu.c as it could now be moved
there, and it is needed when a value for the fpscr is being stored
directly.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/cpu.c| 43
target/ppc
Documented the removal of the HMP command cpustats
Signed-off-by: Bruno Larsen (billionai)
---
docs/system/removed-features.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 5a462ac568..a88ff7aff4 100644
--- a
Documented the removal of the HMP command info cpustats
Signed-off-by: Bruno Larsen (billionai)
---
docs/system/removed-features.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 5a462ac568..2feae41089 100644
n's ppc-for-6.1 tree
Changelog for v2:
* removed patches that were already applied
* also removed PPC_DUMP_CPU functinality
Bruno Larsen (billionai) (2):
target/ppc: removed GEN_OPCODE decision tree
target/ppc: removed all mentions to PPC_DUMP_CPU
target/p
since both, PPC_DO_STATISTICS and PPC_DUMP_CPU, are obsoleted as
target/ppc moves to decodetree, we can remove this ifdef based decision
tree, and only have what is now the standard option for the macro.
Suggested-by: Luis Pires
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc
This feature will no longer be useful as ppc moves to using decotree for
TCG. And building with it enabled is no longer possible, due to changes
in opc_handler_t. Since the last commit that mentions it happened in
2014, I think it is safe to remove it.
Signed-off-by: Bruno Larsen (billionai
n's ppc-for-6.1 tree
Changelog for v3:
* Re-added patch that removed cpu_dump_statistics from hw/core/cpu
* added HMP documentation patch to this series
Changelog for v2:
* removed patches that were already applied
* also removed PPC_DUMP_CPU functinality
Bruno Larsen (billionai) (4):
No more architectures set the pointer to dump_statistics, so there's no
point in keeping it, or the related cpu_dump_statistics function.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
Message-Id: <20210526202104.127910-6-bruno.lar...@eldorado.org.br>
Documented the removal of the HMP command info cpustats
Signed-off-by: Bruno Larsen (billionai)
---
docs/system/removed-features.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 5a462ac568..2feae41089 100644
since both, PPC_DO_STATISTICS and PPC_DUMP_CPU, are obsoleted as
target/ppc moves to decodetree, we can remove this ifdef based decision
tree, and only have what is now the standard option for the macro.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate.c | 79
This feature will no longer be useful as ppc moves to using decotree for
TCG. And building with it enabled is no longer possible, due to changes
in opc_handler_t. Since the last commit that mentions it happened in
2014, I think it is safe to remove it.
Signed-off-by: Bruno Larsen (billionai
information, but
since ppc_store_sdr1 would also store that information, there should be
no need to do any extra processing here.
Signed-off-by: Bruno Larsen (billionai)
---
This change means we won't have to compile ppc_store_sdr1 when we get
disable-tcg working, but I'm not worki
ere is more complex than necessary on
purpose, to make it more readable (and make sure I understand what is
going on). If that would really fix the problem, I'll move to
implementing an actual solution, and to all affected functions.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/mmu-ha
fpscr_set_rounding_mode into cpu.c as it could now be moved
there, and it is needed when a value for the fpscr is being stored
directly.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c| 43
target/ppc/cpu.h| 12 +-
target/ppc
Wrapped some function calls in cpu_init.c, gdbstub.c, mmu-hash64.c and
excp_helper.c that were TCG only with ifdef CONFIG_TCG, to support
building without TCG.
for excp_helper we also moved the function do_rfi higher in the file to
reduce the ifdef count.
Signed-off-by: Bruno Larsen (billionai
compiles with linux-user
* removed patches ther were already accepted
* applied rth's cleanup to ppc_store_sdr1
* changed destination of ppc_store_msr
* undone change to helper-proto, now fewer files include it
Bruno Larsen (billionai) (7):
target/ppc: fix ppc_store_sdr1 for user-only
It is preferable to store the current rounding mode and restore from that
than recalculating from fpscr, so we changed the behavior of do_fri and
VSX_ROUND to do it like that.
Suggested-by: Richard Henderson
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/fpu_helper.c | 8 +---
1
These functions are used in hw/ppc logic, during machine startup, which
means it must be compiled when --disable-tcg is selected, and so it has
been moved into a common code file
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
Reviewed-by: David Gibson
---
target/ppc
Moved the ppc_cpu_do_interrupt function to cpu.c file, where it makes
more sense, and turned powerpc_excp not static, as it now needs to be
accessed from outside of excp_helper.c
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c | 20
target/ppc/cpu.h
ction.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c
index 0ab7ac1af1..82e276349a 100644
--- a/target/ppc/cpu.c
+++ b/target/ppc/cpu.c
@@ -65,6 +65,7 @@ uint32_t ppc_get
These files included helper-proto.h, but didn't use or declare any
helpers, so the #include has been removed
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/cpu_init.c| 1 -
target/ppc/gdbstub.c | 1 -
target/ppc/mmu-hash32.c | 1 -
target/ppc/mmu-radix64.c | 1 -
4
The current patch series aims to isolate common code from translation-related
code. This isolation is required to disable TCG at build time, and the
final system still work.
This patch series is still WIP, so comments are welcome
Bruno Larsen (billionai) (4):
target/ppc: move opcode table
in progress, any better solutions are very much appreciated.
Also, making the R/W functions not static is required for the next
commit.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.c.inc| 1002 +++
target/ppc/spr_tcg.h| 132
code motion to remove opcode callback table from
translate_init.c.inc to translate.c in preparation
to remove #include from
translate.c
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/internal.h | 6 +
target/ppc/translate.c | 394
finished isolation of CPU initialization logic from
translation logic. CPU initialization now only has common code
and may or may not call accelerator-specific code, as the
build options require.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/{translate_init.c.inc => cpu_init.c} |
All the code related to gdb has been moved from translate_init.c.inc
file to the gdbstub.c file, where it makes more sense.
Version 4 fixes the omission of internal.h in gdbstub, mentioned in
<87sg3d2gf5@linux.ibm.com>, and the extra blank line.
Signed-off-by: Bruno Larsen (bil
unnecessary
* kept more functions as static
* ensured that the project builds after every commit
Bruno Larsen (billionai) (7):
target/ppc: move opcode table logic to translate.c
target/ppc: Created !TCG SPR registration macro
target/ppc: Isolated SPR read/write callbacks
target/ppc: tur
spr_tcg.c.inc has to be included after
SPR_NOACCESS has been used.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/internal.h |3 +
target/ppc/spr_tcg.c.inc| 1033 +++
target/ppc/translate.c | 49 +-
target/ppc/translate_init.c.inc | 981
To be able to compile translate_init.c.inc as a standalone file,
we have to make the callbacks accessible outside of translate.c;
This patch does that, making the callbacks not static and creating
a new .h file
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.c.inc | 203
code motion to remove opcode callback table from
translate_init.c.inc to translate.c in preparation to remove
the #include from translate.c. Also created
destroy_ppc_opcodes and removed that logic from ppc_cpu_unrealize
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/internal.h
finished isolation of CPU initialization logic from
translation logic. CPU initialization now only has common code
which may or may not call accelerator-specific code, as the
build options require, and is compiled separately.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc
Added macros for spr_register and spr_register_kvm that can
ignore SPR RW callbacks, in preparation to support building
without TCG.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate_init.c.inc | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff
-off-by: Bruno Larsen (billionai)
---
target/ppc/translate_init.c.inc | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc
index f809941c5e..f470a8533e 100644
--- a/target/ppc/translate_init.c.inc
Renamed all gen_spr_* and gen_* functions specifically related to
registering SPRs to register_*_sprs and register_*, to avoid future
confusion with other TCG related code.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate_init.c.inc | 860
1 file
moved RW callback parameters of _spr_register into an ifdef, to support
building without TCG in the future, and added definitions for
spr_register and spr_register_kvm, to keep the same call regardless of
build options
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/translate_init.c.inc
the project doesn't build
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/internal.h |3 +
target/ppc/spr_tcg.c.inc| 1052 +++
target/ppc/translate.c | 47 +-
target/ppc/translate_init.c.inc |
ved a changed that would add a regression
Changes for v2:
* split and reordered patches, to make it easier to review
* improved commit messages
* Undid creation of spr_common, as it was unnecessary
* kept more functions as static
* ensured that the project builds after every commit
Bruno L
Removed functions gen_read_xer and gen_write_xer, moving their logic
directly into spr_read_xer and spr_write_xer, respectively.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.c.inc | 70 ++--
1 file changed, 31 insertions(+), 39 deletions
To be able to compile translate_init.c.inc as a standalone file,
we have to make the callbacks accessible outside of translate.c;
This patch does exactly that
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/spr_tcg.c.inc| 209
target/ppc/spr_tcg.h
Renamed all gen_spr_* and gen_* functions specifically related to
registering SPRs to register_*_sprs and register_*, to avoid future
confusion with other TCG related code.
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/translate_init.c.inc | 860
-off-by: Bruno Larsen (billionai)
---
target/ppc/translate_init.c.inc | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc
index 67529e8648..b922b04f25 100644
--- a/target/ppc/translate_init.c.inc
finished isolation of CPU initialization logic from
translation logic. CPU initialization now only has common code
and may or may not call accelerator-specific code, as the
build options require.
Signed-off-by: Bruno Larsen (billionai)
---
target/ppc/{translate_init.c.inc => cpu_init.c}
folded gen_{read,write}_xer into their only callers, spr_{read,write}_xer
Signed-off-by: Bruno Larsen (billionai)
Reviewed-by: Richard Henderson
---
target/ppc/translate.c | 37 -
target/ppc/translate_init.c.inc | 33 +++--
2
ved a changed that would add a regression
Changes for v2:
* split and reordered patches, to make it easier to review
* improved commit messages
* Undid creation of spr_common, as it was unnecessary
* kept more functions as static
* ensured that the project builds after every commit
Bruno L
1 - 100 of 129 matches
Mail list logo