You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/target/ppc
Peter Maydell 28f13bccbe fpu: allow flushing of output denormals to be after rounding
Currently we handle flushing of output denormals in uncanon_normal
always before we deal with rounding.  This works for architectures
that detect tininess before rounding, but is usually not the right
place when the architecture detects tininess after rounding.  For
example, for x86 the SDM states that the MXCSR FTZ control bit causes
outputs to be flushed to zero "when it detects a floating-point
underflow condition".  This means that we mustn't flush to zero if
the input is such that after rounding it is no longer tiny.

At least one of our guest architectures does underflow detection
after rounding but flushing of denormals before rounding (MIPS MSA);
this means we need to have a config knob for this that is separate
from our existing tininess_before_rounding setting.

Add an ftz_detection flag.  For consistency with
tininess_before_rounding, we make it default to "detect ftz after
rounding"; this means that we need to explicitly set the flag to
"detect ftz before rounding" on every existing architecture that sets
flush_to_zero, so that this commit has no behaviour change.
(This means more code change here but for the long term a less
confusing API.)

For several architectures the current behaviour is either
definitely or possibly wrong; annotate those with TODO comments.
These architectures are definitely wrong (and should detect
ftz after rounding):
 * x86
 * Alpha

For these architectures the spec is unclear:
 * MIPS (for non-MSA)
 * RX
 * SH4

PA-RISC makes ftz detection IMPDEF, but we aren't setting the
"tininess before rounding" setting that we ought to.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2 weeks ago
..
translate target/ppc: Fix lxvx/stxvx facility check 5 months ago
Kconfig ppc: switch boards to "default y" 10 months ago
arch_dump.c include: Rename sysemu/ -> system/ 2 months ago
compat.c include: Rename sysemu/ -> system/ 2 months ago
cpu-models.c target/ppc: Add Power11 DD2.0 processor 4 months ago
cpu-models.h target/ppc: Add Power11 DD2.0 processor 4 months ago
cpu-param.h target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
cpu-qom.h target/ppc: Use GDBFeature for dynamic XML 1 year ago
cpu.c include: Rename sysemu/ -> system/ 2 months ago
cpu.h accel/tcg: Move gen_intermediate_code to TCGCPUOps.translate_core 2 months ago
cpu_init.c fpu: allow flushing of output denormals to be after rounding 2 weeks ago
cpu_init.h target/ppc: Add Power11 DD2.0 processor 4 months ago
dfp_helper.c target/ppc: replace assert(0) with g_assert_not_reached() 5 months ago
excp_helper.c include: Rename sysemu/ -> system/ 2 months ago
fpu_helper.c target/ppc: Use env->fp_status in helper_compute_fprf functions 2 months ago
gdbstub.c target/ppc: Fix GDB register indexing on secondary CPUs 11 months ago
helper.h target/ppc: Move VSX fp compare insns to decodetree. 7 months ago
helper_regs.c include: Rename sysemu/ -> system/ 2 months ago
helper_regs.h target/ppc: Fix PMU hflags calculation 2 years ago
insn32.decode target/ppc: Move VSX fp compare insns to decodetree. 7 months ago
insn64.decode target/ppc: Implemented [pm]xvbf16ger2* 3 years ago
int_helper.c target/ppc: Move VMX integer add/sub saturate insns to decodetree. 7 months ago
internal.h target/ppc: Add a function to check for page protection bit 9 months ago
kvm.c include: Rename sysemu/ -> system/ 2 months ago
kvm_ppc.h include: Rename sysemu/ -> system/ 2 months ago
machine.c include: Rename sysemu/ -> system/ 2 months ago
mem_helper.c target/ppc: Move VSX vector with length storage access insns to decodetree. 7 months ago
meson.build target/ppc: Move out BookE and related MMU functions from mmu_common.c 9 months ago
misc_helper.c target/ppc: Fix mtDPDES targeting SMT siblings 4 months ago
mmu-book3s-v3.c target/ppc/mmu-radix64: Remove externally unused parts from header 7 months ago
mmu-book3s-v3.h target/ppc: Remove includes from mmu-book3s-v3.h 7 months ago
mmu-booke.c target/ppc: Move out BookE and related MMU functions from mmu_common.c 9 months ago
mmu-booke.h target/ppc: Move out BookE and related MMU functions from mmu_common.c 9 months ago
mmu-books.h target/ppc: introduce mmu-books.h 4 years ago
mmu-hash32.c include: Rename sysemu/ -> system/ 2 months ago
mmu-hash32.h target/ppc/mmu-hash32.c: Move get_pteg_offset32() to the header 7 months ago
mmu-hash64.c include: Rename sysemu/ -> system/ 2 months ago
mmu-hash64.h target/ppc: Unexport some functions from mmu-book3s-v3.h 7 months ago
mmu-radix64.c include: Rename sysemu/ -> system/ 2 months ago
mmu-radix64.h target/ppc/mmu-radix64: Remove externally unused parts from header 7 months ago
mmu_common.c include: Rename sysemu/ -> system/ 2 months ago
mmu_helper.c include: Rename sysemu/ -> system/ 2 months ago
power8-pmu-regs.c.inc target/ppc: Add new hflags to support BHRB 9 months ago
power8-pmu.c target/ppc: Add recording of taken branches to BHRB 9 months ago
power8-pmu.h target/ppc: Add recording of taken branches to BHRB 9 months ago
ppc-qmp-cmds.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 12 months ago
spr_common.h target/ppc: Implement SPRC/SPRD SPRs 9 months ago
tcg-stub.c hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep 1 year ago
timebase_helper.c ppc/pnv: Add POWER10 ChipTOD quirk for big-core 7 months ago
trace-events target/ppc: Improve KVM hypercall trace 3 years ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
translate.c accel/tcg: Move gen_intermediate_code to TCGCPUOps.translate_core 2 months ago
user_only_helper.c target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro 12 months ago