qemu/target/ppc
Lucas Mateus Castro (alqotel) bbd8dd5e45 target/ppc: Use gvec to decode XVTSTDC[DS]P
Used gvec to translate XVTSTDCSP and XVTSTDCDP.

xvtstdcsp:
rept    loop    imm     master version  prev version        current version
25      4000    0       0,206200        0,040730 (-80.2%)    0,040740 (-80.2%)
25      4000    1       0,205120        0,053650 (-73.8%)    0,053510 (-73.9%)
25      4000    3       0,206160        0,058630 (-71.6%)    0,058570 (-71.6%)
25      4000    51      0,217110        0,191490 (-11.8%)    0,192320 (-11.4%)
25      4000    127     0,206160        0,191490 (-7.1%)     0,192640 (-6.6%)
8000    12      0       1,234719        0,418833 (-66.1%)    0,386365 (-68.7%)
8000    12      1       1,232417        1,435979 (+16.5%)    1,462792 (+18.7%)
8000    12      3       1,232760        1,766073 (+43.3%)    1,743990 (+41.5%)
8000    12      51      1,239281        1,319562 (+6.5%)     1,423479 (+14.9%)
8000    12      127     1,231708        1,315760 (+6.8%)     1,426667 (+15.8%)

xvtstdcdp:
rept    loop    imm     master version  prev version    current version
25      4000    0       0,159930        0,040830 (-74.5%)    0,040610 (-74.6%)
25      4000    1       0,160640        0,053670 (-66.6%)    0,053480 (-66.7%)
25      4000    3       0,160020        0,063030 (-60.6%)    0,062960 (-60.7%)
25      4000    51      0,160410        0,128620 (-19.8%)    0,127470 (-20.5%)
25      4000    127     0,160330        0,127670 (-20.4%)    0,128690 (-19.7%)
8000    12      0       1,190365        0,422146 (-64.5%)    0,388417 (-67.4%)
8000    12      1       1,191292        1,445312 (+21.3%)    1,428698 (+19.9%)
8000    12      3       1,188687        1,980656 (+66.6%)    1,975354 (+66.2%)
8000    12      51      1,191250        1,264500 (+6.1%)     1,355083 (+13.8%)
8000    12      127     1,197313        1,266729 (+5.8%)     1,349156 (+12.7%)

Overall, these instructions are the hardest ones to measure performance
as the gvec implementation is affected by the immediate. Above there are
5 different scenarios when it comes to immediate and 2 when it comes to
rept/loop combination. The immediates scenarios are: all bits are 0
therefore the target register should just be changed to 0, with 1 bit
set, with 2 bits set in a combination the new implementation can deal
with using gvec, 4 bits set and the new implementation can't deal with
it using gvec and all bits set. The rept/loop scenarios are high loop
and low rept (so it should spend more time executing it than translating
it) and high rept low loop (so it should spend more time translating it
than executing this code).
These comparisons are between the upstream version, a previous similar
implementation and a one with a cleaner code(this one).
For a comparison with o previous different implementation:
<20221010191356.83659-13-lucas.araujo@eldorado.org.br>

Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221019125040.48028-13-lucas.araujo@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2022-10-28 13:15:22 -03:00
..
translate target/ppc: Use gvec to decode XVTSTDC[DS]P 2022-10-28 13:15:22 -03:00
arch_dump.c dump: Replace opaque DumpState pointer with a typed one 2022-10-06 19:30:43 +04:00
compat.c powerpc tcg: Fix Lesser GPL version number 2020-11-15 16:38:50 +01:00
cpu-models.c target/ppc: Fix MPC8555 and MPC8560 core type to e500v1 2022-07-06 10:30:01 -03:00
cpu-models.h target/ppc: Fix MPC8555 and MPC8560 core type to e500v1 2022-07-06 10:30:01 -03:00
cpu-param.h Normalize header guard symbol definition 2022-05-11 16:50:26 +02:00
cpu-qom.h target/ppc: Fix host PVR matching for KVM 2022-08-30 16:20:29 -03:00
cpu.c target/ppc: Bugfix FP when OE/UE are set 2022-08-31 14:08:05 -03:00
cpu.h dump: Replace opaque DumpState pointer with a typed one 2022-10-06 19:30:43 +04:00
cpu_init.c target/ppc: Convert to tcg_ops restore_state_to_opc 2022-10-26 11:11:28 +10:00
dfp_helper.c target/ppc: Set result to QNaN for DENBCD when VXCVI occurs 2022-09-20 10:54:06 -03:00
excp_helper.c target/ppc: restore powerpc_excp_booke doorbell interrupts 2022-10-17 16:15:09 -03:00
fpu_helper.c target/ppc: Moved XSTSTDC[QDS]P to decodetree 2022-10-28 13:15:22 -03:00
gdbstub.c target/ppc: Remove msr_le macro 2022-05-05 15:36:17 -03:00
helper.h target/ppc: Moved XSTSTDC[QDS]P to decodetree 2022-10-28 13:15:22 -03:00
helper_regs.c target/ppc: Fix tlbie 2022-05-26 17:11:32 -03:00
helper_regs.h target/ppc: Remove env->immu_idx and env->dmmu_idx 2021-05-04 11:41:25 +10:00
insn32.decode target/ppc: Moved XSTSTDC[QDS]P to decodetree 2022-10-28 13:15:22 -03:00
insn64.decode target/ppc: Implemented [pm]xvbf16ger2* 2022-05-26 17:11:33 -03:00
int_helper.c target/ppc: Move VABSDU[BHW] to decodetree and use gvec 2022-10-28 13:15:22 -03:00
internal.h target/ppc: Implement new wait variants 2022-07-28 13:30:41 -03:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
kvm-stub.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm.c kvm: allow target-specific accelerator properties 2022-10-10 09:23:16 +02:00
kvm_ppc.h target/ppc: Support for H_RPT_INVALIDATE hcall 2021-07-09 11:01:06 +10:00
machine.c target/ppc: Fix host PVR matching for KVM 2022-08-30 16:20:29 -03:00
mem_helper.c target/ppc: Remove msr_hv macro 2022-05-05 15:36:17 -03:00
meson.build target/ppc: make power8-pmu.c CONFIG_TCG only 2022-03-02 06:51:36 +01:00
misc_helper.c target/ppc: Remove msr_hv macro 2022-05-05 15:36:17 -03:00
mmu-book3s-v3.c ppc: Check partition and process table alignment 2022-07-18 13:59:43 -03:00
mmu-book3s-v3.h target/ppc: Implement ISA 3.00 tlbie[l] 2022-07-18 13:59:43 -03:00
mmu-books.h target/ppc: introduce mmu-books.h 2021-07-09 10:38:19 +10:00
mmu-hash32.c target/ppc: Remove PowerPC 601 CPUs 2022-02-09 09:08:55 +01:00
mmu-hash32.h target/ppc: Remove PowerPC 601 CPUs 2022-02-09 09:08:55 +01:00
mmu-hash64.c target/ppc: Implement slbiag 2022-07-18 13:59:43 -03:00
mmu-hash64.h target/ppc: fix Hash64 MMU update of PTE bit R 2021-11-29 21:00:08 +01:00
mmu-radix64.c target/ppc: Check page dir/table base alignment 2022-07-18 13:59:43 -03:00
mmu-radix64.h target/ppc: Check effective address validity 2022-01-04 07:55:34 +01:00
mmu_common.c target/ppc: Remove msr_dr macro 2022-05-05 15:36:17 -03:00
mmu_helper.c target/ppc: Implement ISA 3.00 tlbie[l] 2022-07-18 13:59:43 -03:00
monitor.c target/ppc: check tb_env != 0 before printing TBU/TBL/DECR 2022-07-18 13:59:43 -03:00
power8-pmu-regs.c.inc target/ppc: fix PMU Group A register read/write exceptions 2022-07-18 13:59:43 -03:00
power8-pmu.c target/ppc: trigger PERFM EBBs from power8-pmu.c 2022-03-02 06:51:36 +01:00
power8-pmu.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
spr_common.h target/ppc: Move common SPR functions out of cpu_init 2022-02-18 08:34:15 +01:00
tcg-stub.c target/ppc: created tcg-stub.c file 2021-06-03 13:22:06 +10:00
timebase_helper.c target/ppc: fix exception error code in helper_{load, store}_dcr 2022-07-18 13:59:43 -03:00
trace-events target/ppc: Improve KVM hypercall trace 2022-04-20 18:00:30 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate.c target/ppc: Moved VMLADDUHM to decodetree and use gvec 2022-10-28 13:15:22 -03:00
user_only_helper.c target/ppc: Implement ppc_cpu_record_sigsegv 2021-11-02 07:00:52 -04:00