mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-31 22:55:40 +00:00
target/arm: AArch32 VCVT fixed-point to float is always round-to-nearest
For AArch32, unlike the VCVT of integer to float, which honours the rounding mode specified by the FPSCR, VCVT of fixed-point to float is always round-to-nearest. (AArch64 fixed-point-to-float conversions always honour the FPCR rounding mode.) Implement this by providing _round_to_nearest versions of the relevant helpers which set the rounding mode temporarily when making the call to the underlying softfloat function. We only need to change the VFP VCVT instructions, because the standard- FPSCR value used by the Neon VCVT is always set to round-to-nearest, so we don't need to do the extra work of saving and restoring the rounding mode. Backports commit 61db12d9f9eb36761edba4d9a414cd8dd34c512b
This commit is contained in:
parent
31013d5a8f
commit
d350644817
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_aarch64
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_aarch64
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_aarch64
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_aarch64
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_aarch64
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_aarch64
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_aarch64
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_aarch64
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_aarch64
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_aarch64
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_aarch64
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_aarch64
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_aarch64
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_aarch64
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_aarch64
|
||||
#define helper_wfe helper_wfe_aarch64
|
||||
#define helper_wfi helper_wfi_aarch64
|
||||
#define helper_yield helper_yield_aarch64
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_aarch64eb
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_aarch64eb
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_aarch64eb
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_aarch64eb
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_aarch64eb
|
||||
#define helper_wfe helper_wfe_aarch64eb
|
||||
#define helper_wfi helper_wfi_aarch64eb
|
||||
#define helper_yield helper_yield_aarch64eb
|
||||
|
|
12
qemu/arm.h
12
qemu/arm.h
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_arm
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_arm
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_arm
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_arm
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_arm
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_arm
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_arm
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_arm
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_arm
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_arm
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_arm
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_arm
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_arm
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_arm
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_arm
|
||||
#define helper_wfe helper_wfe_arm
|
||||
#define helper_wfi helper_wfi_arm
|
||||
#define helper_yield helper_yield_arm
|
||||
|
|
12
qemu/armeb.h
12
qemu/armeb.h
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_armeb
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_armeb
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_armeb
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_armeb
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_armeb
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_armeb
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_armeb
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_armeb
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_armeb
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_armeb
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_armeb
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_armeb
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_armeb
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_armeb
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_armeb
|
||||
#define helper_wfe helper_wfe_armeb
|
||||
#define helper_wfi helper_wfi_armeb
|
||||
#define helper_yield helper_yield_armeb
|
||||
|
|
|
@ -2085,6 +2085,18 @@ symbols = (
|
|||
'helper_vfp_uqtod',
|
||||
'helper_vfp_uqtoh',
|
||||
'helper_vfp_uqtos',
|
||||
'helper_vfp_shtos_round_to_nearest',
|
||||
'helper_vfp_sltos_round_to_nearest',
|
||||
'helper_vfp_uhtos_round_to_nearest',
|
||||
'helper_vfp_ultos_round_to_nearest',
|
||||
'helper_vfp_shtod_round_to_nearest',
|
||||
'helper_vfp_sltod_round_to_nearest',
|
||||
'helper_vfp_uhtod_round_to_nearest',
|
||||
'helper_vfp_ultod_round_to_nearest',
|
||||
'helper_vfp_shtoh_round_to_nearest',
|
||||
'helper_vfp_uhtoh_round_to_nearest',
|
||||
'helper_vfp_sltoh_round_to_nearest',
|
||||
'helper_vfp_ultoh_round_to_nearest',
|
||||
'helper_wfe',
|
||||
'helper_wfi',
|
||||
'helper_yield',
|
||||
|
|
12
qemu/m68k.h
12
qemu/m68k.h
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_m68k
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_m68k
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_m68k
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_m68k
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_m68k
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_m68k
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_m68k
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_m68k
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_m68k
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_m68k
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_m68k
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_m68k
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_m68k
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_m68k
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_m68k
|
||||
#define helper_wfe helper_wfe_m68k
|
||||
#define helper_wfi helper_wfi_m68k
|
||||
#define helper_yield helper_yield_m68k
|
||||
|
|
12
qemu/mips.h
12
qemu/mips.h
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_mips
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_mips
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_mips
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_mips
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_mips
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_mips
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_mips
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_mips
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_mips
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_mips
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_mips
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_mips
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_mips
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_mips
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_mips
|
||||
#define helper_wfe helper_wfe_mips
|
||||
#define helper_wfi helper_wfi_mips
|
||||
#define helper_yield helper_yield_mips
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_mips64
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_mips64
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_mips64
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_mips64
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_mips64
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_mips64
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_mips64
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_mips64
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_mips64
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_mips64
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_mips64
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_mips64
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_mips64
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_mips64
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_mips64
|
||||
#define helper_wfe helper_wfe_mips64
|
||||
#define helper_wfi helper_wfi_mips64
|
||||
#define helper_yield helper_yield_mips64
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_mips64el
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_mips64el
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_mips64el
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_mips64el
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_mips64el
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_mips64el
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_mips64el
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_mips64el
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_mips64el
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_mips64el
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_mips64el
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_mips64el
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_mips64el
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_mips64el
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_mips64el
|
||||
#define helper_wfe helper_wfe_mips64el
|
||||
#define helper_wfi helper_wfi_mips64el
|
||||
#define helper_yield helper_yield_mips64el
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_mipsel
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_mipsel
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_mipsel
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_mipsel
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_mipsel
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_mipsel
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_mipsel
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_mipsel
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_mipsel
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_mipsel
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_mipsel
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_mipsel
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_mipsel
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_mipsel
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_mipsel
|
||||
#define helper_wfe helper_wfe_mipsel
|
||||
#define helper_wfi helper_wfi_mipsel
|
||||
#define helper_yield helper_yield_mipsel
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_powerpc
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_powerpc
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_powerpc
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_powerpc
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_powerpc
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_powerpc
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_powerpc
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_powerpc
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_powerpc
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_powerpc
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_powerpc
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_powerpc
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_powerpc
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_powerpc
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_powerpc
|
||||
#define helper_wfe helper_wfe_powerpc
|
||||
#define helper_wfi helper_wfi_powerpc
|
||||
#define helper_yield helper_yield_powerpc
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_riscv32
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_riscv32
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_riscv32
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_riscv32
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_riscv32
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_riscv32
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_riscv32
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_riscv32
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_riscv32
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_riscv32
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_riscv32
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_riscv32
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_riscv32
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_riscv32
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_riscv32
|
||||
#define helper_wfe helper_wfe_riscv32
|
||||
#define helper_wfi helper_wfi_riscv32
|
||||
#define helper_yield helper_yield_riscv32
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_riscv64
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_riscv64
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_riscv64
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_riscv64
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_riscv64
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_riscv64
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_riscv64
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_riscv64
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_riscv64
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_riscv64
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_riscv64
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_riscv64
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_riscv64
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_riscv64
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_riscv64
|
||||
#define helper_wfe helper_wfe_riscv64
|
||||
#define helper_wfi helper_wfi_riscv64
|
||||
#define helper_yield helper_yield_riscv64
|
||||
|
|
12
qemu/sparc.h
12
qemu/sparc.h
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_sparc
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_sparc
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_sparc
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_sparc
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_sparc
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_sparc
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_sparc
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_sparc
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_sparc
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_sparc
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_sparc
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_sparc
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_sparc
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_sparc
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_sparc
|
||||
#define helper_wfe helper_wfe_sparc
|
||||
#define helper_wfi helper_wfi_sparc
|
||||
#define helper_yield helper_yield_sparc
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_sparc64
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_sparc64
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_sparc64
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_sparc64
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_sparc64
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_sparc64
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_sparc64
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_sparc64
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_sparc64
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_sparc64
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_sparc64
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_sparc64
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_sparc64
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_sparc64
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_sparc64
|
||||
#define helper_wfe helper_wfe_sparc64
|
||||
#define helper_wfi helper_wfi_sparc64
|
||||
#define helper_yield helper_yield_sparc64
|
||||
|
|
|
@ -211,6 +211,19 @@ DEF_HELPER_3(vfp_ultoh, f16, i32, i32, ptr)
|
|||
DEF_HELPER_3(vfp_sqtoh, f16, i64, i32, ptr)
|
||||
DEF_HELPER_3(vfp_uqtoh, f16, i64, i32, ptr)
|
||||
|
||||
DEF_HELPER_3(vfp_shtos_round_to_nearest, f32, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_sltos_round_to_nearest, f32, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_uhtos_round_to_nearest, f32, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_ultos_round_to_nearest, f32, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_shtod_round_to_nearest, f64, i64, i32, ptr)
|
||||
DEF_HELPER_3(vfp_sltod_round_to_nearest, f64, i64, i32, ptr)
|
||||
DEF_HELPER_3(vfp_uhtod_round_to_nearest, f64, i64, i32, ptr)
|
||||
DEF_HELPER_3(vfp_ultod_round_to_nearest, f64, i64, i32, ptr)
|
||||
DEF_HELPER_3(vfp_shtoh_round_to_nearest, f16, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_uhtoh_round_to_nearest, f16, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_sltoh_round_to_nearest, f16, i32, i32, ptr)
|
||||
DEF_HELPER_3(vfp_ultoh_round_to_nearest, f16, i32, i32, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_2(set_rmode, TCG_CALL_NO_RWG, i32, i32, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_3(vfp_fcvt_f16_to_f32, TCG_CALL_NO_RWG, f32, f16, ptr, i32)
|
||||
|
|
|
@ -3197,16 +3197,16 @@ static bool trans_VCVT_fix_hp(DisasContext *s, arg_VCVT_fix_sp *a)
|
|||
/* Switch on op:U:sx bits */
|
||||
switch (a->opc) {
|
||||
case 0:
|
||||
gen_helper_vfp_shtoh(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_shtoh_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 1:
|
||||
gen_helper_vfp_sltoh(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_sltoh_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 2:
|
||||
gen_helper_vfp_uhtoh(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_uhtoh_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 3:
|
||||
gen_helper_vfp_ultoh(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_ultoh_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 4:
|
||||
gen_helper_vfp_toshh_round_to_zero(tcg_ctx, vd, vd, shift, fpst);
|
||||
|
@ -3257,16 +3257,16 @@ static bool trans_VCVT_fix_sp(DisasContext *s, arg_VCVT_fix_sp *a)
|
|||
/* Switch on op:U:sx bits */
|
||||
switch (a->opc) {
|
||||
case 0:
|
||||
gen_helper_vfp_shtos(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_shtos_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 1:
|
||||
gen_helper_vfp_sltos(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_sltos_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 2:
|
||||
gen_helper_vfp_uhtos(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_uhtos_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 3:
|
||||
gen_helper_vfp_ultos(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_ultos_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 4:
|
||||
gen_helper_vfp_toshs_round_to_zero(tcg_ctx, vd, vd, shift, fpst);
|
||||
|
@ -3323,16 +3323,16 @@ static bool trans_VCVT_fix_dp(DisasContext *s, arg_VCVT_fix_dp *a)
|
|||
/* Switch on op:U:sx bits */
|
||||
switch (a->opc) {
|
||||
case 0:
|
||||
gen_helper_vfp_shtod(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_shtod_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 1:
|
||||
gen_helper_vfp_sltod(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_sltod_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 2:
|
||||
gen_helper_vfp_uhtod(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_uhtod_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 3:
|
||||
gen_helper_vfp_ultod(tcg_ctx, vd, vd, shift, fpst);
|
||||
gen_helper_vfp_ultod_round_to_nearest(tcg_ctx, vd, vd, shift, fpst);
|
||||
break;
|
||||
case 4:
|
||||
gen_helper_vfp_toshd_round_to_zero(tcg_ctx, vd, vd, shift, fpst);
|
||||
|
|
|
@ -396,12 +396,32 @@ float32 VFP_HELPER(fcvts, d)(float64 x, CPUARMState *env)
|
|||
return float64_to_float32(x, &env->vfp.fp_status);
|
||||
}
|
||||
|
||||
/* VFP3 fixed point conversion. */
|
||||
/*
|
||||
* VFP3 fixed point conversion. The AArch32 versions of fix-to-float
|
||||
* must always round-to-nearest; the AArch64 ones honour the FPSCR
|
||||
* rounding mode. (For AArch32 Neon the standard-FPSCR is set to
|
||||
* round-to-nearest so either helper will work.) AArch32 float-to-fix
|
||||
* must round-to-zero.
|
||||
*/
|
||||
#define VFP_CONV_FIX_FLOAT(name, p, fsz, ftype, isz, itype) \
|
||||
ftype HELPER(vfp_##name##to##p)(uint##isz##_t x, uint32_t shift, \
|
||||
void *fpstp) \
|
||||
{ return itype##_to_##float##fsz##_scalbn(x, -shift, fpstp); }
|
||||
|
||||
#define VFP_CONV_FIX_FLOAT_ROUND(name, p, fsz, ftype, isz, itype) \
|
||||
ftype HELPER(vfp_##name##to##p##_round_to_nearest)(uint##isz##_t x, \
|
||||
uint32_t shift, \
|
||||
void *fpstp) \
|
||||
{ \
|
||||
ftype ret; \
|
||||
float_status *fpst = fpstp; \
|
||||
FloatRoundMode oldmode = fpst->float_rounding_mode; \
|
||||
fpst->float_rounding_mode = float_round_nearest_even; \
|
||||
ret = itype##_to_##float##fsz##_scalbn(x, -shift, fpstp); \
|
||||
fpst->float_rounding_mode = oldmode; \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
#define VFP_CONV_FLOAT_FIX_ROUND(name, p, fsz, ftype, isz, itype, ROUND, suff) \
|
||||
uint##isz##_t HELPER(vfp_to##name##p##suff)(ftype x, uint32_t shift, \
|
||||
void *fpst) \
|
||||
|
@ -415,6 +435,7 @@ uint##isz##_t HELPER(vfp_to##name##p##suff)(ftype x, uint32_t shift, \
|
|||
|
||||
#define VFP_CONV_FIX(name, p, fsz, ftype, isz, itype) \
|
||||
VFP_CONV_FIX_FLOAT(name, p, fsz, ftype, isz, itype) \
|
||||
VFP_CONV_FIX_FLOAT_ROUND(name, p, fsz, ftype, isz, itype) \
|
||||
VFP_CONV_FLOAT_FIX_ROUND(name, p, fsz, ftype, isz, itype, \
|
||||
float_round_to_zero, _round_to_zero) \
|
||||
VFP_CONV_FLOAT_FIX_ROUND(name, p, fsz, ftype, isz, itype, \
|
||||
|
|
|
@ -2079,6 +2079,18 @@
|
|||
#define helper_vfp_uqtod helper_vfp_uqtod_x86_64
|
||||
#define helper_vfp_uqtoh helper_vfp_uqtoh_x86_64
|
||||
#define helper_vfp_uqtos helper_vfp_uqtos_x86_64
|
||||
#define helper_vfp_shtos_round_to_nearest helper_vfp_shtos_round_to_nearest_x86_64
|
||||
#define helper_vfp_sltos_round_to_nearest helper_vfp_sltos_round_to_nearest_x86_64
|
||||
#define helper_vfp_uhtos_round_to_nearest helper_vfp_uhtos_round_to_nearest_x86_64
|
||||
#define helper_vfp_ultos_round_to_nearest helper_vfp_ultos_round_to_nearest_x86_64
|
||||
#define helper_vfp_shtod_round_to_nearest helper_vfp_shtod_round_to_nearest_x86_64
|
||||
#define helper_vfp_sltod_round_to_nearest helper_vfp_sltod_round_to_nearest_x86_64
|
||||
#define helper_vfp_uhtod_round_to_nearest helper_vfp_uhtod_round_to_nearest_x86_64
|
||||
#define helper_vfp_ultod_round_to_nearest helper_vfp_ultod_round_to_nearest_x86_64
|
||||
#define helper_vfp_shtoh_round_to_nearest helper_vfp_shtoh_round_to_nearest_x86_64
|
||||
#define helper_vfp_uhtoh_round_to_nearest helper_vfp_uhtoh_round_to_nearest_x86_64
|
||||
#define helper_vfp_sltoh_round_to_nearest helper_vfp_sltoh_round_to_nearest_x86_64
|
||||
#define helper_vfp_ultoh_round_to_nearest helper_vfp_ultoh_round_to_nearest_x86_64
|
||||
#define helper_wfe helper_wfe_x86_64
|
||||
#define helper_wfi helper_wfi_x86_64
|
||||
#define helper_yield helper_yield_x86_64
|
||||
|
|
Loading…
Reference in a new issue