Matheus Ferst
f622ebe7a5
target/ppc: implement vgnb
...
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-19-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
95f1ee288b
target/ppc: implement vcntmb[bhwd]
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-18-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
fb1b56752f
target/ppc: implement vclrrb
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-17-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
08d512e1b9
target/ppc: implement vclrlb
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-16-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
fb5303cc05
target/ppc: implement vstri[bh][lr]
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-15-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
b58f393198
target/ppc: Implement Vector Compare Quadword
...
Implement the following PowerISA v3.1 instructions:
vcmpsq: Vector Compare Signed Quadword
vcmpuq: Vector Compare Unsigned Quadword
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-14-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
50449ae482
target/ppc: Implement Vector Compare Greater Than Quadword
...
Implement the following PowerISA v3.1 instructions:
vcmpgtsq: Vector Compare Greater Than Signed Quadword
vcmpgtuq: Vector Compare Greater Than Unsigned Quadword
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-13-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
7b3da08e3c
target/ppc: Implement Vector Compare Equal Quadword
...
Implement the following PowerISA v3.1 instructions:
vcmpequq: Vector Compare Equal Quadword
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-12-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
eb936dc074
target/ppc: Move Vector Compare Not Equal or Zero to decodetree
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-11-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Matheus Ferst
6a394290df
target/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-10-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Lucas Coutinho
acf43b34fb
target/ppc: Implement vextsd2q
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-9-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Lucas Coutinho
9bfe92135b
target/ppc: Move vexts[bhw]2[wd] to decodetree
...
Move the following instructions to decodetree:
vextsb2w: Vector Extend Sign Byte To Word
vextsh2w: Vector Extend Sign Halfword To Word
vextsb2d: Vector Extend Sign Byte To Doubleword
vextsh2d: Vector Extend Sign Halfword To Doubleword
vextsw2d: Vector Extend Sign Word To Doubleword
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-8-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Víctor Colombo
536f9876e2
target/ppc: Implement vmsumudm instruction
...
Based on [1] by Lijun Pan <ljp@linux.ibm.com >, which was never merged
into master.
[1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-7-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Víctor Colombo
5476ef1d40
target/ppc: Implement vmsumcud instruction
...
Based on [1] by Lijun Pan <ljp@linux.ibm.com >, which was never merged
into master.
[1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-6-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:37 +01:00
Lucas Mateus Castro (alqotel)
29e9dfcf75
target/ppc: vmulh* instructions without helpers
...
Changed vmulhuw, vmulhud, vmulhsw, vmulhsd to not
use helpers.
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220225210936.1749575-5-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:36 +01:00
Lucas Mateus Castro (alqotel)
d45da01428
target/ppc: Moved vector multiply high and low to decodetree
...
Moved instructions vmulld, vmulhuw, vmulhsw, vmulhud and vmulhsd to
decodetree
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-4-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:36 +01:00
Lucas Mateus Castro (alqotel)
80eca687c8
target/ppc: moved vector even and odd multiplication to decodetree
...
Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub,
vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw,
muleuw and vmulouw from legacy to decodetree. Implemented
the instructions vmulesd, vmulosd, vmuleud, vmuloud.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20220225210936.1749575-3-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2022-03-02 06:51:36 +01:00
Matheus Ferst
9193eaa901
target/ppc: Implement Vector Mask Move insns
...
Implement the following PowerISA v3.1 instructions:
mtvsrbm: Move to VSR Byte Mask
mtvsrhm: Move to VSR Halfword Mask
mtvsrwm: Move to VSR Word Mask
mtvsrdm: Move to VSR Doubleword Mask
mtvsrqm: Move to VSR Quadword Mask
mtvsrbmi: Move to VSR Byte Mask Immediate
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211203194229.746275-4-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2021-12-17 17:57:13 +01:00
Matheus Ferst
17868d81e0
target/ppc: Implement Vector Extract Mask
...
Implement the following PowerISA v3.1 instructions:
vextractbm: Vector Extract Byte Mask
vextracthm: Vector Extract Halfword Mask
vextractwm: Vector Extract Word Mask
vextractdm: Vector Extract Doubleword Mask
vextractqm: Vector Extract Quadword Mask
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20211203194229.746275-3-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2021-12-17 17:57:13 +01:00
Matheus Ferst
5f1470b091
target/ppc: Implement Vector Expand Mask
...
Implement the following PowerISA v3.1 instructions:
vexpandbm: Vector Expand Byte Mask
vexpandhm: Vector Expand Halfword Mask
vexpandwm: Vector Expand Word Mask
vexpanddm: Vector Expand Doubleword Mask
vexpandqm: Vector Expand Quadword Mask
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211203194229.746275-2-matheus.ferst@eldorado.org.br >
Signed-off-by: Cédric Le Goater <clg@kaod.org >
2021-12-17 17:57:13 +01:00
Matheus Ferst
28110b72a8
target/ppc: Implement Vector Extract Double to VSR using GPR index insns
...
Implement the following PowerISA v3.1 instructions:
vextdubvlx: Vector Extract Double Unsigned Byte to VSR using
GPR-specified Left-Index
vextduhvlx: Vector Extract Double Unsigned Halfword to VSR using
GPR-specified Left-Index
vextduwvlx: Vector Extract Double Unsigned Word to VSR using
GPR-specified Left-Index
vextddvlx: Vector Extract Double Doubleword to VSR using
GPR-specified Left-Index
vextdubvrx: Vector Extract Double Unsigned Byte to VSR using
GPR-specified Right-Index
vextduhvrx: Vector Extract Double Unsigned Halfword to VSR using
GPR-specified Right-Index
vextduwvrx: Vector Extract Double Unsigned Word to VSR using
GPR-specified Right-Index
vextddvrx: Vector Extract Double Doubleword to VSR using
GPR-specified Right-Index
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-10-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
b422c2cb52
target/ppc: Move vinsertb/vinserth/vinsertw/vinsertd to decodetree
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-9-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
2c9f795841
target/ppc: Implement Vector Insert from VSR using GPR index insns
...
Implements the following PowerISA v3.1 instructions:
vinsbvlx: Vector Insert Byte from VSR using GPR-specified Left-Index
vinshvlx: Vector Insert Halfword from VSR using GPR-specified
Left-Index
vinswvlx: Vector Insert Word from VSR using GPR-specified Left-Index
vinsbvrx: Vector Insert Byte from VSR using GPR-specified Right-Index
vinshvrx: Vector Insert Halfword from VSR using GPR-specified
Right-Index
vinswvrx: Vector Insert Word from VSR using GPR-specified Right-Index
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-8-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
23832ae6d5
target/ppc: Implement Vector Insert Word from GPR using Immediate insns
...
Implements the following PowerISA v3.1 instructions:
vinsw: Vector Insert Word from GPR using immediate-specified index
vinsd: Vector Insert Doubleword from GPR using immediate-specified
index
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-7-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
2cc12af399
target/ppc: Implement Vector Insert from GPR using GPR index insns
...
Implements the following PowerISA v3.1 instructions:
vinsblx: Vector Insert Byte from GPR using GPR-specified Left-Index
vinshlx: Vector Insert Halfword from GPR using GPR-specified Left-Index
vinswlx: Vector Insert Word from GPR using GPR-specified Left-Index
vinsdlx: Vector Insert Doubleword from GPR using GPR-specified
Left-Index
vinsbrx: Vector Insert Byte from GPR using GPR-specified Right-Index
vinshrx: Vector Insert Halfword from GPR using GPR-specified
Right-Index
vinswrx: Vector Insert Word from GPR using GPR-specified Right-Index
vinsdrx: Vector Insert Doubleword from GPR using GPR-specified
Right-Index
The helpers and do_vinsx receive i64 to allow code sharing with the
future implementation of Vector Insert from VSR using GPR Index.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-6-matheus.ferst@eldorado.org.br >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
2c716b4da5
target/ppc: Implement vsldbi/vsrdbi instructions
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-5-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
00a16569eb
target/ppc: Implement vpdepd/vpextd instruction
...
pdepd and pextd helpers are moved out of #ifdef (TARGET_PPC64) to allow
them to be reused as GVecGen3.fni8.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-4-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
a2c975e119
target/ppc: Implement vclzdm/vctzdm instructions
...
The signature of do_cntzdm is changed to allow reuse as GVecGen3i.fni8.
The method is also moved out of #ifdef TARGET_PPC64, as PowerISA doesn't
say vclzdm and vctzdm are 64-bit only.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-3-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Matheus Ferst
6e0bbc4048
target/ppc: Move vcfuged to vmx-impl.c.inc
...
There's no reason to keep vector-impl.c.inc separate from
vmx-impl.c.inc. Additionally, let GVec handle the multiple calls to
helper_cfuged for us.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br >
Message-Id: <20211104123719.323713-2-matheus.ferst@eldorado.org.br >
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
2021-11-09 10:32:52 +11:00
Peter Maydell
dd8014e4e9
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.2-20200818' into staging
...
ppc patch queue 2020-08-18
Here's my first pull request for qemu-5.2, which has quite a few
accumulated things. Highlights are:
* Preliminary support for POWER10 (Power ISA 3.1) instruction emulation
* Add documentation on the (very confusing) pseries NUMA configuration
* Fix some bugs handling edge cases with XICS, XIVE and kernel_irqchip
* Fix icount for a number of POWER registers
* Many cleanups to error handling in XIVE code
* Validate size of -prom-env data
# gpg: Signature made Tue 18 Aug 2020 05:18:36 BST
# gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au >" [full]
# gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com >" [full]
# gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org >" [full]
# gpg: aka "David Gibson (kernel.org) <dwg@kernel.org >" [unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392
* remotes/dgibson/tags/ppc-for-5.2-20200818: (40 commits)
spapr/xive: Use xive_source_esb_len()
nvram: Exit QEMU if NVRAM cannot contain all -prom-env data
spapr/xive: Simplify error handling of kvmppc_xive_cpu_synchronize_state()
ppc/xive: Simplify error handling in xive_tctx_realize()
spapr/xive: Simplify error handling in kvmppc_xive_connect()
ppc/xive: Fix error handling in vmstate_xive_tctx_*() callbacks
spapr/xive: Fix error handling in kvmppc_xive_post_load()
spapr/kvm: Fix error handling in kvmppc_xive_pre_save()
spapr/xive: Rework error handling of kvmppc_xive_set_source_config()
spapr/xive: Rework error handling in kvmppc_xive_get_queues()
spapr/xive: Rework error handling of kvmppc_xive_[gs]et_queue_config()
spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state()
spapr/xive: Rework error handling of kvmppc_xive_mmap()
spapr/xive: Rework error handling of kvmppc_xive_source_reset()
spapr/xive: Rework error handling of kvmppc_xive_cpu_connect()
spapr: Simplify error handling in spapr_phb_realize()
spapr/xive: Convert KVM device fd checks to assert()
ppc/xive: Introduce dedicated kvm_irqchip_in_kernel() wrappers
ppc/xive: Rework setup of XiveSource::esb_mmio
target/ppc: Integrate icount to purr, vtb, and tbu40
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-24 09:35:21 +01:00
Paolo Bonzini
139c1837db
meson: rename included C source files to .c.inc
...
With Makefiles that have automatically generated dependencies, you
generated includes are set as dependencies of the Makefile, so that they
are built before everything else and they are available when first
building the .c files.
Alternatively you can use a fine-grained dependency, e.g.
target/arm/translate.o: target/arm/decode-neon-shared.inc.c
With Meson you have only one choice and it is a third option, namely
"build at the beginning of the corresponding target"; the way you
express it is to list the includes in the sources of that target.
The problem is that Meson decides if something is a source vs. a
generated include by looking at the extension: '.c', '.cc', '.m', '.C'
are sources, while everything else is considered an include---including
'.inc.c'.
Use '.c.inc' to avoid this, as it is consistent with our other convention
of using '.rst.inc' for included reStructuredText files. The editorconfig
file is adjusted.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:18:30 -04:00