qemu-patch-raspberry4/target
Richard Henderson 6c2be133a7 tcg: Fix helper function vs host abi for float16
Depending on the host abi, float16, aka uint16_t, values are
passed and returned either zero-extended in the host register
or with garbage at the top of the host register.

The tcg code generator has so far been assuming garbage, as that
matches the x86 abi, but this is incorrect for other host abis.
Further, target/arm has so far been assuming zero-extended results,
so that it may store the 16-bit value into a 32-bit slot with the
high 16-bits already clear.

Rectify both problems by mapping "f16" in the helper definition
to uint32_t instead of (a typedef for) uint16_t.  This forces
the host compiler to assume garbage in the upper 16 bits on input
and to zero-extend the result on output.

Cc: qemu-stable@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 20180522175629.24932-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-05-31 14:50:51 +01:00
..
alpha target/alpha: Honor CPU_DUMP_FPU 2018-05-18 14:52:38 -07:00
arm tcg: Fix helper function vs host abi for float16 2018-05-31 14:50:51 +01:00
cris * Don't silently truncate extremely long words in the command line 2018-05-14 09:55:09 +01:00
hppa fpu/softfloat: Specialize on snan_bit_is_one 2018-05-17 15:27:15 -07:00
i386 x86/cpu: use standard-headers/asm-x86.kvm_para.h 2018-05-23 03:14:41 +03:00
lm32 lm32: take BQL before writing IP/IM register 2018-05-21 13:37:12 +02:00
m68k tcg: fix s/compliment/complement/ typos 2018-05-20 08:25:23 +03:00
microblaze target-microblaze: Consolidate MMU enabled checks 2018-05-29 09:35:15 +02:00
mips trivial patches for 2018-05-20 2018-05-21 10:50:32 +01:00
moxie icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
nios2 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
openrisc target/openrisc: Merge disas_openrisc_insn 2018-05-14 14:58:08 -07:00
ppc ppc: Rename 2.13 machines to 3.0 2018-05-29 11:28:46 +01:00
riscv target/riscv: Honor CPU_DUMP_FPU 2018-05-18 14:52:38 -07:00
s390x target/s390x: Honor CPU_DUMP_FPU 2018-05-18 14:52:38 -07:00
sh4 fpu/softfloat: Specialize on snan_bit_is_one 2018-05-17 15:27:15 -07:00
sparc target/sparc: Honor CPU_DUMP_FPU 2018-05-18 14:52:38 -07:00
tilegx target/tilegx: avoid integer overflow in next_page PC check 2018-05-09 10:12:21 -07:00
tricore icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
unicore32 target/unicore32: Honor CPU_DUMP_FPU 2018-05-18 14:52:38 -07:00
xtensa trivial patches for 2018-05-20 2018-05-21 10:50:32 +01:00