qemu/target
Paolo Bonzini 2872b0f390 target/i386: implement FMA instructions
The only issue with FMA instructions is that there are _a lot_ of them (30
opcodes, each of which comes in up to 4 versions depending on VEX.W and
VEX.L; a total of 96 possibilities).  However, they can be implement with
only 6 helpers, two for scalar operations and four for packed operations.
(Scalar versions do not do any merging; they only affect the bottom 32
or 64 bits of the output operand.  Therefore, there is no separate XMM
and YMM of the scalar helpers).

First, we can reduce the number of helpers to one third by passing four
operands (one output and three inputs); the reordering of which operands
go to the multiply and which go to the add is done in emit.c.

Second, the different instructions also dispatch to the same softfloat
function, so the flags for float32_muladd and float64_muladd are passed
in the helper as int arguments, with a little extra complication to
handle FMADDSUB and FMSUBADD.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-10-22 09:05:54 +02:00
..
alpha hw/core: Add CPUClass.get_pc 2022-10-04 12:13:12 -07:00
arm * scsi-disk: support setting CD-ROM block size via device options 2022-10-13 13:55:03 -04:00
avr accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
cris hw/core: Add CPUClass.get_pc 2022-10-04 12:13:12 -07:00
hexagon Make store handling faster and more robust 2022-10-05 10:17:32 -04:00
hppa accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
i386 target/i386: implement FMA instructions 2022-10-22 09:05:54 +02:00
loongarch target/loongarch: Fix fnm{sub/add}_{s/d} set wrong flags 2022-10-17 10:28:35 +08:00
m68k hw/core: Add CPUClass.get_pc 2022-10-04 12:13:12 -07:00
microblaze accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
mips kvm: allow target-specific accelerator properties 2022-10-10 09:23:16 +02:00
nios2 hw/core: Add CPUClass.get_pc 2022-10-04 12:13:12 -07:00
openrisc accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
ppc target/ppc: Fix xvcmp* clearing FI bit 2022-10-17 16:15:09 -03:00
riscv target/riscv: pmp: Fixup TLB size calculation 2022-10-14 14:36:19 +10:00
rx accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
s390x * scsi-disk: support setting CD-ROM block size via device options 2022-10-13 13:55:03 -04:00
sh4 target/sh4: Fix TB_FLAG_UNALIGN 2022-10-04 12:33:05 -07:00
sparc accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
tricore accel/tcg: Introduce tb_pc and log_pc 2022-10-04 12:13:12 -07:00
xtensa hw/core: Add CPUClass.get_pc 2022-10-04 12:13:12 -07:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00