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/hppa
Gabriel Brookman cea82f8cdd target/hppa: correct size bit parity for fmpyadd
For the fmpyadd instruction on the hppa architecture, there is a bit
used to specify whether the instruction is operating on a 32 bit or
64 bit floating point register. For most instructions, such a bit is 0
when operating on the smaller register and 1 when operating on the
larger register. However, according to page 6-57 of the PA-RISC 1.1
Architecture and Instruction Set Reference Manual, this convention is
reversed for the fmpyadd instruction specifically, meaning the bit is
1 for operations on 32 bit registers and 0 for 64 bit registers. See
also page 6-18 (fig. 6-8) and 6-19 (table 6-16), where the f field
for FMPYADD and FMPYSUB is documented. Previously, QEMU decoded this
operation as operating on the other size of register, leading to bugs
when translating the fmpyadd instruction. This patch fixes that issue.

Reported-by: Andreas Hüttel <andreas.huettel@ur.de>
Signed-off-by: Gabriel Brookman <brookmangabriel@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3096
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-ID: <20251009-hppa-correct-fmpyadd-size-bit-decoding-v1-1-f63bb6c3290c@gmail.com>
[PMD: Add documentation refs mentioned by Andreas K. Huettel]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 days ago
..
Kconfig meson: Introduce target-specific Kconfig 4 years ago
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 6 months ago
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2 years ago
cpu.c add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide 2 months ago
cpu.h target/hppa: Have hppa_form_gva*() return vaddr type 4 days ago
fpu_helper.c HPPA floating point exception handling fixes 5 months ago
gdbstub.c linux-user/hppa: Force all code addresses to PRIV_USER 1 year ago
helper.c target/hppa: Have hppa_form_gva*() return vaddr type 4 days ago
helper.h target/hppa: Implement space register hashing for 64-bit HP-UX 9 months ago
insns.decode target/hppa: correct size bit parity for fmpyadd 4 days ago
int_helper.c target/hppa: Copy instruction code into fr1 on FPU assist fault 5 months ago
machine.c target/migration: Inline VMSTATE_CPU() 6 months ago
mem_helper.c target/hppa: Have hppa_form_gva*() return vaddr type 4 days ago
meson.build meson: Rename target_softmmu_arch -> target_system_arch 2 years ago
op_helper.c include: Remove 'exec/exec-all.h' 6 months ago
sys_helper.c include: Remove 'exec/exec-all.h' 6 months ago
trace-events target/hppa: Use hwaddr type for HPPATLBEntry::pa 4 days ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
translate.c target/hppa: Replace MO_TE -> MO_BE 4 days ago