summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target/xtensa: Use tcg_gen_abs_i32Richard Henderson2019-05-141-8/+1Star
| | | | | Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/tricore: Use tcg_gen_abs_tlPhilippe Mathieu-Daudé2019-05-141-22/+5Star
| | | | | | | Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190423102145.14812-3-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/s390x: Use tcg_gen_abs_i64Richard Henderson2019-05-141-7/+1Star
| | | | | Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/ppc: Use tcg_gen_abs_tlRichard Henderson2019-05-141-44/+24Star
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/ppc: Use tcg_gen_abs_i32Philippe Mathieu-Daudé2019-05-141-13/+1Star
| | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190423102145.14812-2-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/cris: Use tcg_gen_abs_tlRichard Henderson2019-05-141-8/+1Star
| | | | | Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/arm: Use tcg_gen_abs_i64 and tcg_gen_gvec_absRichard Henderson2019-05-144-51/+8Star
| | | | | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/aarch64: Support vector absolute valueRichard Henderson2019-05-142-1/+7
| | | | | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/i386: Support vector absolute valueRichard Henderson2019-05-142-1/+16
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add support for vector absolute valueRichard Henderson2019-05-1411-0/+167
| | | | | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add support for integer absolute valueRichard Henderson2019-05-143-10/+25
| | | | | | | | | | Remove a function of the same name from target/arm/. Use a branchless implementation of abs gleaned from gcc. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/i386: Support vector scalar shift opcodesRichard Henderson2019-05-142-1/+36
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add gvec expanders for vector shift by scalarRichard Henderson2019-05-144-0/+279
| | | | | | | | | Allow expansion either via shift by scalar or by replicating the scalar for shift by vector. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v3: Use a private structure for do_gvec_shifts.
* tcg/aarch64: Support vector variable shift opcodesRichard Henderson2019-05-143-1/+45
| | | | | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/i386: Support vector variable shift opcodesRichard Henderson2019-05-142-1/+36
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add gvec expanders for variable shiftRichard Henderson2019-05-146-0/+384
| | | | | | | | | The gvec expanders perform a modulo on the shift count. If the target requires alternate behaviour, then it cannot use the generic gvec expanders anyway, and will have to have its own custom code. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add INDEX_op_dupm_vecRichard Henderson2019-05-147-41/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the backend to expand dup from memory directly, instead of forcing the value into a temp first. This is especially important if integer/vector register moves do not exist. Note that officially tcg_out_dupm_vec is allowed to fail. If it did, we could fix this up relatively easily: VECE == 32/64: Load the value into a vector register, then dup. Both of these must work. VECE == 8/16: If the value happens to be at an offset such that an aligned load would place the desired value in the least significant end of the register, go ahead and load w/garbage in high bits. Load the value w/INDEX_op_ld{8,16}_i32. Attempt a move directly to vector reg, which may fail. Store the value into the backing store for OTS. Load the value into the vector reg w/TCG_TYPE_I32, which must work. Duplicate from the vector reg into itself, which must work. All of which is well and good, except that all supported hosts can support dupm for all vece, so all of the failure paths would be dead code and untestable. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/aarch64: Implement tcg_out_dupm_vecRichard Henderson2019-05-141-2/+35
| | | | | | | The LD1R instruction does all the work. Note that the only useful addressing mode is a base register with no offset. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/i386: Implement tcg_out_dupm_vecRichard Henderson2019-05-131-14/+43
| | | | | | | At the same time, improve tcg_out_dupi_vec wrt broadcast from the constant pool. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Add tcg_out_dupm_vec to the backend interfaceRichard Henderson2019-05-133-1/+31
| | | | | | Currently stubbed out in all backends that support vectors. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Manually expand INDEX_op_dup_vecRichard Henderson2019-05-133-10/+118
| | | | | | | | | This case is similar to INDEX_op_mov_* in that we need to do different things depending on the current location of the source. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v3: Added some commentary to the tcg_reg_alloc_* functions.
* tcg: Promote tcg_out_{dup,dupi}_vec to backend interfaceRichard Henderson2019-05-133-3/+26
| | | | | | | | | | | The i386 backend already has these functions, and the aarch64 backend could easily split out one. Nothing is done with these functions yet, but this will aid register allocation of INDEX_op_dup_vec in a later patch. Adjust the aarch64 tcg_out_dupi_vec signature to match the new interface. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Support cross-class moves without instruction supportRichard Henderson2019-05-131-3/+28
| | | | | | | | | PowerPC Altivec does not support direct moves between vector registers and general registers. So when tcg_out_mov fails, we can use the backing memory for the temporary to perform the move. Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Return bool success from tcg_out_movRichard Henderson2019-05-1310-16/+31
| | | | | | | | | | | This patch merely changes the interface, aborting on all failures, of which there are currently none. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg/arm: Use tcg_out_mov_reg in tcg_out_movRichard Henderson2019-05-131-1/+1
| | | | | | | | We have a function that takes an additional condition parameter over the standard backend interface. It already takes care of eliding no-op moves. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Assert fixed_reg is read-onlyRichard Henderson2019-05-131-47/+40Star
| | | | | | | | | | The only fixed_reg is cpu_env, and it should not be modified during any TB. Therefore code that tries to special-case moves into a fixed_reg is dead. Remove it. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Specify optional vector requirements with a listRichard Henderson2019-05-137-162/+372
| | | | | | | | | | | | | | | | | Replace the single opcode in .opc with a null-terminated array in .opt_opc. We still require that all opcodes be used with the same .vece. Validate the contents of this list with CONFIG_DEBUG_TCG. All tcg_gen_*_vec functions will check any list active during .fniv expansion. Swap the active list in and out as we expand other opcodes, or take control away from the front-end function. Convert all existing vector aware front ends. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Allow add_vec, sub_vec, neg_vec, not_vec to be expandedRichard Henderson2019-05-131-16/+33
| | | | | | | | | | PowerPC Altivec does not support add and subtract of 64-bit elements. Prepare for that configuration by not assuming the operation is universally supported. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Do not recreate INDEX_op_neg_vec unless supportedRichard Henderson2019-05-131-2/+6
| | | | | | | | Use tcg_can_emit_vec_op instead of just TCG_TARGET_HAS_neg_vec, so that we check the type and vece for the actual operation. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tcg: Implement tcg_gen_gvec_3i()David Hildenbrand2019-05-132-0/+163
| | | | | | | | | | | Let's add tcg_gen_gvec_3i(), similar to tcg_gen_gvec_2i(), however without introducing "gen_helper_gvec_3i *fnoi", as it isn't needed for now. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20190416185301.25344-2-david@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Merge remote-tracking branch ↵Peter Maydell2019-05-1314-173/+387
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/huth-gitlab/tags/pull-request-2019-05-13' into staging Kconfig settings for the Arm machines # gpg: Signature made Mon 13 May 2019 09:19:43 BST # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2019-05-13: (29 commits) hw/arm: Remove hard-enablement of the remaining PCI devices hw/arm: Express dependencies of the musca machines with Kconfig hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig hw/arm: Express dependencies of the remaining IMX boards with Kconfig hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig hw/arm: Express dependencies of sabrelite with Kconfig hw/arm: Express dependencies of canon-a1100 with Kconfig hw/arm: Express dependencies of the raspi machines with Kconfig hw/arm: Express dependencies of the MPS2 boards with Kconfig hw/arm: Express dependencies of allwinner / cubieboard with Kconfig hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig hw/arm: Express dependencies of the virt machine with Kconfig hw/arm: Express dependencies of the aspeed boards with Kconfig hw/arm: Express dependencies of collie with Kconfig hw/arm: Express dependencies of xilinx-zynq with Kconfig hw/arm: Express dependencies of the PXA2xx machines with Kconfig hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig hw/arm: Express dependencies of stellaris with Kconfig ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hw/arm: Remove hard-enablement of the remaining PCI devicesThomas Huth2019-05-131-8/+0Star
| | | | | | | | | | | | | | | | | | The PCI devices should be pulled in by default if PCI_DEVICES is set, so there is no need anymore to enforce them in the configs file. Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the musca machines with KconfigThomas Huth2019-05-131-3/+6
| | | | | | | | | | | | | | | | | | Dependencies have been determined with trial-and-error and by looking at the musca.c source file. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the xlnx-versal-virt machine with KconfigThomas Huth2019-05-131-0/+4
| | | | | | | | | | | | | | | | | | Dependencies have been determined with trial-and-error and by looking at the xlnx-versal.c source file. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the ZynqMP zcu102 machine with KconfigThomas Huth2019-05-133-4/+12
| | | | | | | | | | | | | | | | | | This cleans up most settings in default-configs/aarch64-softmmu.mak. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the microbit / nrf51 machine with KconfigThomas Huth2019-05-133-3/+9
| | | | | | | | | | | | | | | | | | Add Kconfig dependencies for the NRF51 / microbit machine. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the remaining IMX boards with KconfigThomas Huth2019-05-132-2/+19
| | | | | | | | | | | | | | | | IMX25, IMX7 and IMX6UL were still missing the Kconfig dependencies. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with KconfigThomas Huth2019-05-133-3/+11
| | | | | | | | | | | | | | | | | | | | Add Kconfig dependencies for the emcraft-sf2 machine - we also distinguish between the machine (CONFIG_EMCRAFT_SF2) and the SoC (CONFIG_MSF2) now. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of sabrelite with KconfigThomas Huth2019-05-133-4/+12
| | | | | | | | | | | | | | | | Add Kconfig dependencies for the Sabrelite / iMX6 machine. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of canon-a1100 with KconfigThomas Huth2019-05-132-1/+2
| | | | | | | | | | | | | | | | Add Kconfig dependencies for the DIGIC / canon-a1100 machine. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the raspi machines with KconfigThomas Huth2019-05-132-3/+4
| | | | | | | | | | | | | | | | | | | | Most of the code is directly controlled by the CONFIG_RASPI switch, so not much to add here additionally. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the MPS2 boards with KconfigThomas Huth2019-05-132-19/+20
| | | | | | | | | | | | | | | | Add Kconfig dependencies for the mps2-an* machines. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of allwinner / cubieboard with KconfigThomas Huth2019-05-132-5/+10
| | | | | | | | | | | | | | | | Add dependencies for the Cubitech Cubieboard. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of netduino / stm32f2xx with KconfigThomas Huth2019-05-132-8/+8
| | | | | | | | | | | | | | | | | | | | Netduino only depends on the stm32f205 SoC which in turn depends on its components. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the virt machine with KconfigThomas Huth2019-05-134-12/+22
| | | | | | | | | | | | | | | | Dependencies have been determined by looking at hw/arm/virt.c Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the aspeed boards with KconfigThomas Huth2019-05-132-6/+11
| | | | | | | | | | | | | | | | | | Dependencies have been determined by looking at hw/arm/aspeed.c Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of collie with KconfigThomas Huth2019-05-133-3/+9
| | | | | | | | | | | | | | | | | | | | Add Kconfig dependencies for the Strongarm collie machine. This patch is based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of xilinx-zynq with KconfigThomas Huth2019-05-132-6/+13
| | | | | | | | | | | | | | | | | | | | | | Add Kconfig dependencies for the xilinx-zynq-a9 board. This patch is based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of the PXA2xx machines with KconfigThomas Huth2019-05-133-11/+51
| | | | | | | | | | | | | | | | | | | | | | Add Kconfig dependencies for the PXA2xx machines (akita, borzoi, connex and verdex gumstix, tosa, mainstone, spitz, terrier and z2). This patch is based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * hw/arm: Express dependencies of realview, versatile and vexpress with KconfigThomas Huth2019-05-135-21/+57
| | | | | | | | | | | | | | | | | | This patch is slightly based on earlier work by Ákos Kovács (i.e. his "hw/arm/Kconfig: Add ARM Kconfig" patch). Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>