target/arm: Implement fp16 for Neon VRINT-with-specified-rounding-mode

Convert the Neon VRINT-with-specified-rounding-mode insns to gvec,
and use this to implement the fp16 versions.

Backports 18725916b1438b54d6d6533980833d2251a20b7c
This commit is contained in:
Peter Maydell 2021-03-01 17:44:47 -05:00 committed by Lioncash
parent eb4054d04f
commit 53aba9d900
20 changed files with 62 additions and 97 deletions

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_aarch64 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_aarch64
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_aarch64 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_aarch64
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_aarch64 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_aarch64
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_aarch64
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_aarch64
#define helper_power_down helper_power_down_aarch64 #define helper_power_down helper_power_down_aarch64
#define helper_pre_hvc helper_pre_hvc_aarch64 #define helper_pre_hvc helper_pre_hvc_aarch64
#define helper_pre_smc helper_pre_smc_aarch64 #define helper_pre_smc helper_pre_smc_aarch64
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_aarch64 #define helper_sel_flags helper_sel_flags_aarch64
#define helper_set_cp_reg helper_set_cp_reg_aarch64 #define helper_set_cp_reg helper_set_cp_reg_aarch64
#define helper_set_cp_reg64 helper_set_cp_reg64_aarch64 #define helper_set_cp_reg64 helper_set_cp_reg64_aarch64
#define helper_set_neon_rmode helper_set_neon_rmode_aarch64
#define helper_set_r13_banked helper_set_r13_banked_aarch64 #define helper_set_r13_banked helper_set_r13_banked_aarch64
#define helper_set_rmode helper_set_rmode_aarch64 #define helper_set_rmode helper_set_rmode_aarch64
#define helper_set_user_reg helper_set_user_reg_aarch64 #define helper_set_user_reg helper_set_user_reg_aarch64

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_aarch64eb #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_aarch64eb
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_aarch64eb #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_aarch64eb
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_aarch64eb #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_aarch64eb
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_aarch64eb
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_aarch64eb
#define helper_power_down helper_power_down_aarch64eb #define helper_power_down helper_power_down_aarch64eb
#define helper_pre_hvc helper_pre_hvc_aarch64eb #define helper_pre_hvc helper_pre_hvc_aarch64eb
#define helper_pre_smc helper_pre_smc_aarch64eb #define helper_pre_smc helper_pre_smc_aarch64eb
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_aarch64eb #define helper_sel_flags helper_sel_flags_aarch64eb
#define helper_set_cp_reg helper_set_cp_reg_aarch64eb #define helper_set_cp_reg helper_set_cp_reg_aarch64eb
#define helper_set_cp_reg64 helper_set_cp_reg64_aarch64eb #define helper_set_cp_reg64 helper_set_cp_reg64_aarch64eb
#define helper_set_neon_rmode helper_set_neon_rmode_aarch64eb
#define helper_set_r13_banked helper_set_r13_banked_aarch64eb #define helper_set_r13_banked helper_set_r13_banked_aarch64eb
#define helper_set_rmode helper_set_rmode_aarch64eb #define helper_set_rmode helper_set_rmode_aarch64eb
#define helper_set_user_reg helper_set_user_reg_aarch64eb #define helper_set_user_reg helper_set_user_reg_aarch64eb

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_arm #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_arm
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_arm #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_arm
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_arm #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_arm
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_arm
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_arm
#define helper_power_down helper_power_down_arm #define helper_power_down helper_power_down_arm
#define helper_pre_hvc helper_pre_hvc_arm #define helper_pre_hvc helper_pre_hvc_arm
#define helper_pre_smc helper_pre_smc_arm #define helper_pre_smc helper_pre_smc_arm
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_arm #define helper_sel_flags helper_sel_flags_arm
#define helper_set_cp_reg helper_set_cp_reg_arm #define helper_set_cp_reg helper_set_cp_reg_arm
#define helper_set_cp_reg64 helper_set_cp_reg64_arm #define helper_set_cp_reg64 helper_set_cp_reg64_arm
#define helper_set_neon_rmode helper_set_neon_rmode_arm
#define helper_set_r13_banked helper_set_r13_banked_arm #define helper_set_r13_banked helper_set_r13_banked_arm
#define helper_set_rmode helper_set_rmode_arm #define helper_set_rmode helper_set_rmode_arm
#define helper_set_user_reg helper_set_user_reg_arm #define helper_set_user_reg helper_set_user_reg_arm

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_armeb #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_armeb
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_armeb #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_armeb
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_armeb #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_armeb
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_armeb
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_armeb
#define helper_power_down helper_power_down_armeb #define helper_power_down helper_power_down_armeb
#define helper_pre_hvc helper_pre_hvc_armeb #define helper_pre_hvc helper_pre_hvc_armeb
#define helper_pre_smc helper_pre_smc_armeb #define helper_pre_smc helper_pre_smc_armeb
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_armeb #define helper_sel_flags helper_sel_flags_armeb
#define helper_set_cp_reg helper_set_cp_reg_armeb #define helper_set_cp_reg helper_set_cp_reg_armeb
#define helper_set_cp_reg64 helper_set_cp_reg64_armeb #define helper_set_cp_reg64 helper_set_cp_reg64_armeb
#define helper_set_neon_rmode helper_set_neon_rmode_armeb
#define helper_set_r13_banked helper_set_r13_banked_armeb #define helper_set_r13_banked helper_set_r13_banked_armeb
#define helper_set_rmode helper_set_rmode_armeb #define helper_set_rmode helper_set_rmode_armeb
#define helper_set_user_reg helper_set_user_reg_armeb #define helper_set_user_reg helper_set_user_reg_armeb

View file

@ -1854,6 +1854,8 @@ symbols = (
'helper_gvec_vcvt_rm_us', 'helper_gvec_vcvt_rm_us',
'helper_gvec_vcvt_rm_sh', 'helper_gvec_vcvt_rm_sh',
'helper_gvec_vcvt_rm_uh', 'helper_gvec_vcvt_rm_uh',
'helper_gvec_vrint_rm_h',
'helper_gvec_vrint_rm_s',
'helper_power_down', 'helper_power_down',
'helper_pre_hvc', 'helper_pre_hvc',
'helper_pre_smc', 'helper_pre_smc',
@ -1900,7 +1902,6 @@ symbols = (
'helper_sel_flags', 'helper_sel_flags',
'helper_set_cp_reg', 'helper_set_cp_reg',
'helper_set_cp_reg64', 'helper_set_cp_reg64',
'helper_set_neon_rmode',
'helper_set_r13_banked', 'helper_set_r13_banked',
'helper_set_rmode', 'helper_set_rmode',
'helper_set_user_reg', 'helper_set_user_reg',

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_m68k #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_m68k
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_m68k #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_m68k
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_m68k #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_m68k
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_m68k
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_m68k
#define helper_power_down helper_power_down_m68k #define helper_power_down helper_power_down_m68k
#define helper_pre_hvc helper_pre_hvc_m68k #define helper_pre_hvc helper_pre_hvc_m68k
#define helper_pre_smc helper_pre_smc_m68k #define helper_pre_smc helper_pre_smc_m68k
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_m68k #define helper_sel_flags helper_sel_flags_m68k
#define helper_set_cp_reg helper_set_cp_reg_m68k #define helper_set_cp_reg helper_set_cp_reg_m68k
#define helper_set_cp_reg64 helper_set_cp_reg64_m68k #define helper_set_cp_reg64 helper_set_cp_reg64_m68k
#define helper_set_neon_rmode helper_set_neon_rmode_m68k
#define helper_set_r13_banked helper_set_r13_banked_m68k #define helper_set_r13_banked helper_set_r13_banked_m68k
#define helper_set_rmode helper_set_rmode_m68k #define helper_set_rmode helper_set_rmode_m68k
#define helper_set_user_reg helper_set_user_reg_m68k #define helper_set_user_reg helper_set_user_reg_m68k

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_mips
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_mips
#define helper_power_down helper_power_down_mips #define helper_power_down helper_power_down_mips
#define helper_pre_hvc helper_pre_hvc_mips #define helper_pre_hvc helper_pre_hvc_mips
#define helper_pre_smc helper_pre_smc_mips #define helper_pre_smc helper_pre_smc_mips
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_mips #define helper_sel_flags helper_sel_flags_mips
#define helper_set_cp_reg helper_set_cp_reg_mips #define helper_set_cp_reg helper_set_cp_reg_mips
#define helper_set_cp_reg64 helper_set_cp_reg64_mips #define helper_set_cp_reg64 helper_set_cp_reg64_mips
#define helper_set_neon_rmode helper_set_neon_rmode_mips
#define helper_set_r13_banked helper_set_r13_banked_mips #define helper_set_r13_banked helper_set_r13_banked_mips
#define helper_set_rmode helper_set_rmode_mips #define helper_set_rmode helper_set_rmode_mips
#define helper_set_user_reg helper_set_user_reg_mips #define helper_set_user_reg helper_set_user_reg_mips

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips64 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips64
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips64 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips64
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips64 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips64
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_mips64
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_mips64
#define helper_power_down helper_power_down_mips64 #define helper_power_down helper_power_down_mips64
#define helper_pre_hvc helper_pre_hvc_mips64 #define helper_pre_hvc helper_pre_hvc_mips64
#define helper_pre_smc helper_pre_smc_mips64 #define helper_pre_smc helper_pre_smc_mips64
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_mips64 #define helper_sel_flags helper_sel_flags_mips64
#define helper_set_cp_reg helper_set_cp_reg_mips64 #define helper_set_cp_reg helper_set_cp_reg_mips64
#define helper_set_cp_reg64 helper_set_cp_reg64_mips64 #define helper_set_cp_reg64 helper_set_cp_reg64_mips64
#define helper_set_neon_rmode helper_set_neon_rmode_mips64
#define helper_set_r13_banked helper_set_r13_banked_mips64 #define helper_set_r13_banked helper_set_r13_banked_mips64
#define helper_set_rmode helper_set_rmode_mips64 #define helper_set_rmode helper_set_rmode_mips64
#define helper_set_user_reg helper_set_user_reg_mips64 #define helper_set_user_reg helper_set_user_reg_mips64

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips64el #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mips64el
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips64el #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mips64el
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips64el #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mips64el
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_mips64el
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_mips64el
#define helper_power_down helper_power_down_mips64el #define helper_power_down helper_power_down_mips64el
#define helper_pre_hvc helper_pre_hvc_mips64el #define helper_pre_hvc helper_pre_hvc_mips64el
#define helper_pre_smc helper_pre_smc_mips64el #define helper_pre_smc helper_pre_smc_mips64el
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_mips64el #define helper_sel_flags helper_sel_flags_mips64el
#define helper_set_cp_reg helper_set_cp_reg_mips64el #define helper_set_cp_reg helper_set_cp_reg_mips64el
#define helper_set_cp_reg64 helper_set_cp_reg64_mips64el #define helper_set_cp_reg64 helper_set_cp_reg64_mips64el
#define helper_set_neon_rmode helper_set_neon_rmode_mips64el
#define helper_set_r13_banked helper_set_r13_banked_mips64el #define helper_set_r13_banked helper_set_r13_banked_mips64el
#define helper_set_rmode helper_set_rmode_mips64el #define helper_set_rmode helper_set_rmode_mips64el
#define helper_set_user_reg helper_set_user_reg_mips64el #define helper_set_user_reg helper_set_user_reg_mips64el

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mipsel #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_mipsel
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mipsel #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_mipsel
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mipsel #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_mipsel
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_mipsel
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_mipsel
#define helper_power_down helper_power_down_mipsel #define helper_power_down helper_power_down_mipsel
#define helper_pre_hvc helper_pre_hvc_mipsel #define helper_pre_hvc helper_pre_hvc_mipsel
#define helper_pre_smc helper_pre_smc_mipsel #define helper_pre_smc helper_pre_smc_mipsel
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_mipsel #define helper_sel_flags helper_sel_flags_mipsel
#define helper_set_cp_reg helper_set_cp_reg_mipsel #define helper_set_cp_reg helper_set_cp_reg_mipsel
#define helper_set_cp_reg64 helper_set_cp_reg64_mipsel #define helper_set_cp_reg64 helper_set_cp_reg64_mipsel
#define helper_set_neon_rmode helper_set_neon_rmode_mipsel
#define helper_set_r13_banked helper_set_r13_banked_mipsel #define helper_set_r13_banked helper_set_r13_banked_mipsel
#define helper_set_rmode helper_set_rmode_mipsel #define helper_set_rmode helper_set_rmode_mipsel
#define helper_set_user_reg helper_set_user_reg_mipsel #define helper_set_user_reg helper_set_user_reg_mipsel

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_powerpc #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_powerpc
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_powerpc #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_powerpc
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_powerpc #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_powerpc
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_powerpc
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_powerpc
#define helper_power_down helper_power_down_powerpc #define helper_power_down helper_power_down_powerpc
#define helper_pre_hvc helper_pre_hvc_powerpc #define helper_pre_hvc helper_pre_hvc_powerpc
#define helper_pre_smc helper_pre_smc_powerpc #define helper_pre_smc helper_pre_smc_powerpc
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_powerpc #define helper_sel_flags helper_sel_flags_powerpc
#define helper_set_cp_reg helper_set_cp_reg_powerpc #define helper_set_cp_reg helper_set_cp_reg_powerpc
#define helper_set_cp_reg64 helper_set_cp_reg64_powerpc #define helper_set_cp_reg64 helper_set_cp_reg64_powerpc
#define helper_set_neon_rmode helper_set_neon_rmode_powerpc
#define helper_set_r13_banked helper_set_r13_banked_powerpc #define helper_set_r13_banked helper_set_r13_banked_powerpc
#define helper_set_rmode helper_set_rmode_powerpc #define helper_set_rmode helper_set_rmode_powerpc
#define helper_set_user_reg helper_set_user_reg_powerpc #define helper_set_user_reg helper_set_user_reg_powerpc

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_riscv32 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_riscv32
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_riscv32 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_riscv32
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_riscv32 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_riscv32
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_riscv32
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_riscv32
#define helper_power_down helper_power_down_riscv32 #define helper_power_down helper_power_down_riscv32
#define helper_pre_hvc helper_pre_hvc_riscv32 #define helper_pre_hvc helper_pre_hvc_riscv32
#define helper_pre_smc helper_pre_smc_riscv32 #define helper_pre_smc helper_pre_smc_riscv32
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_riscv32 #define helper_sel_flags helper_sel_flags_riscv32
#define helper_set_cp_reg helper_set_cp_reg_riscv32 #define helper_set_cp_reg helper_set_cp_reg_riscv32
#define helper_set_cp_reg64 helper_set_cp_reg64_riscv32 #define helper_set_cp_reg64 helper_set_cp_reg64_riscv32
#define helper_set_neon_rmode helper_set_neon_rmode_riscv32
#define helper_set_r13_banked helper_set_r13_banked_riscv32 #define helper_set_r13_banked helper_set_r13_banked_riscv32
#define helper_set_rmode helper_set_rmode_riscv32 #define helper_set_rmode helper_set_rmode_riscv32
#define helper_set_user_reg helper_set_user_reg_riscv32 #define helper_set_user_reg helper_set_user_reg_riscv32

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_riscv64 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_riscv64
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_riscv64 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_riscv64
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_riscv64 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_riscv64
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_riscv64
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_riscv64
#define helper_power_down helper_power_down_riscv64 #define helper_power_down helper_power_down_riscv64
#define helper_pre_hvc helper_pre_hvc_riscv64 #define helper_pre_hvc helper_pre_hvc_riscv64
#define helper_pre_smc helper_pre_smc_riscv64 #define helper_pre_smc helper_pre_smc_riscv64
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_riscv64 #define helper_sel_flags helper_sel_flags_riscv64
#define helper_set_cp_reg helper_set_cp_reg_riscv64 #define helper_set_cp_reg helper_set_cp_reg_riscv64
#define helper_set_cp_reg64 helper_set_cp_reg64_riscv64 #define helper_set_cp_reg64 helper_set_cp_reg64_riscv64
#define helper_set_neon_rmode helper_set_neon_rmode_riscv64
#define helper_set_r13_banked helper_set_r13_banked_riscv64 #define helper_set_r13_banked helper_set_r13_banked_riscv64
#define helper_set_rmode helper_set_rmode_riscv64 #define helper_set_rmode helper_set_rmode_riscv64
#define helper_set_user_reg helper_set_user_reg_riscv64 #define helper_set_user_reg helper_set_user_reg_riscv64

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_sparc #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_sparc
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_sparc #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_sparc
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_sparc #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_sparc
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_sparc
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_sparc
#define helper_power_down helper_power_down_sparc #define helper_power_down helper_power_down_sparc
#define helper_pre_hvc helper_pre_hvc_sparc #define helper_pre_hvc helper_pre_hvc_sparc
#define helper_pre_smc helper_pre_smc_sparc #define helper_pre_smc helper_pre_smc_sparc
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_sparc #define helper_sel_flags helper_sel_flags_sparc
#define helper_set_cp_reg helper_set_cp_reg_sparc #define helper_set_cp_reg helper_set_cp_reg_sparc
#define helper_set_cp_reg64 helper_set_cp_reg64_sparc #define helper_set_cp_reg64 helper_set_cp_reg64_sparc
#define helper_set_neon_rmode helper_set_neon_rmode_sparc
#define helper_set_r13_banked helper_set_r13_banked_sparc #define helper_set_r13_banked helper_set_r13_banked_sparc
#define helper_set_rmode helper_set_rmode_sparc #define helper_set_rmode helper_set_rmode_sparc
#define helper_set_user_reg helper_set_user_reg_sparc #define helper_set_user_reg helper_set_user_reg_sparc

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_sparc64 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_sparc64
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_sparc64 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_sparc64
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_sparc64 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_sparc64
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_sparc64
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_sparc64
#define helper_power_down helper_power_down_sparc64 #define helper_power_down helper_power_down_sparc64
#define helper_pre_hvc helper_pre_hvc_sparc64 #define helper_pre_hvc helper_pre_hvc_sparc64
#define helper_pre_smc helper_pre_smc_sparc64 #define helper_pre_smc helper_pre_smc_sparc64
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_sparc64 #define helper_sel_flags helper_sel_flags_sparc64
#define helper_set_cp_reg helper_set_cp_reg_sparc64 #define helper_set_cp_reg helper_set_cp_reg_sparc64
#define helper_set_cp_reg64 helper_set_cp_reg64_sparc64 #define helper_set_cp_reg64 helper_set_cp_reg64_sparc64
#define helper_set_neon_rmode helper_set_neon_rmode_sparc64
#define helper_set_r13_banked helper_set_r13_banked_sparc64 #define helper_set_r13_banked helper_set_r13_banked_sparc64
#define helper_set_rmode helper_set_rmode_sparc64 #define helper_set_rmode helper_set_rmode_sparc64
#define helper_set_user_reg helper_set_user_reg_sparc64 #define helper_set_user_reg helper_set_user_reg_sparc64

View file

@ -212,7 +212,6 @@ DEF_HELPER_3(vfp_sqtoh, f16, i64, i32, ptr)
DEF_HELPER_3(vfp_uqtoh, f16, i64, i32, ptr) DEF_HELPER_3(vfp_uqtoh, f16, i64, i32, ptr)
DEF_HELPER_FLAGS_2(set_rmode, TCG_CALL_NO_RWG, i32, i32, ptr) DEF_HELPER_FLAGS_2(set_rmode, TCG_CALL_NO_RWG, i32, i32, ptr)
DEF_HELPER_FLAGS_2(set_neon_rmode, TCG_CALL_NO_RWG, i32, i32, env)
DEF_HELPER_FLAGS_3(vfp_fcvt_f16_to_f32, TCG_CALL_NO_RWG, f32, f16, ptr, i32) DEF_HELPER_FLAGS_3(vfp_fcvt_f16_to_f32, TCG_CALL_NO_RWG, f32, f16, ptr, i32)
DEF_HELPER_FLAGS_3(vfp_fcvt_f32_to_f16, TCG_CALL_NO_RWG, f16, f32, ptr, i32) DEF_HELPER_FLAGS_3(vfp_fcvt_f32_to_f16, TCG_CALL_NO_RWG, f16, f32, ptr, i32)
@ -636,6 +635,9 @@ DEF_HELPER_FLAGS_4(gvec_vcvt_rm_us, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_vcvt_rm_sh, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(gvec_vcvt_rm_sh, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_vcvt_rm_uh, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(gvec_vcvt_rm_uh, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_vrint_rm_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_vrint_rm_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_frecpe_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(gvec_frecpe_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_frecpe_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(gvec_frecpe_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_4(gvec_frecpe_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(gvec_frecpe_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)

View file

@ -3817,68 +3817,6 @@ static bool trans_VRINTX(DisasContext *s, arg_2misc *a)
return do_2misc_fp(s, a, gen_helper_rints_exact); return do_2misc_fp(s, a, gen_helper_rints_exact);
} }
static bool do_vrint(DisasContext *s, arg_2misc *a, int rmode)
{
/*
* Handle a VRINT* operation by iterating 32 bits at a time,
* with a specified rounding mode in operation.
*/
int pass;
TCGv_ptr fpst;
TCGv_i32 tcg_rmode;
TCGContext *tcg_ctx = s->uc->tcg_ctx;
if (!arm_dc_feature(s, ARM_FEATURE_NEON) ||
!arm_dc_feature(s, ARM_FEATURE_V8)) {
return false;
}
/* UNDEF accesses to D16-D31 if they don't exist. */
if (!dc_isar_feature(aa32_simd_r32, s) &&
((a->vd | a->vm) & 0x10)) {
return false;
}
if (a->size != 2) {
/* TODO: FP16 will be the size == 1 case */
return false;
}
if ((a->vd | a->vm) & a->q) {
return false;
}
if (!vfp_access_check(s)) {
return true;
}
fpst = fpstatus_ptr(tcg_ctx, FPST_STD);
tcg_rmode = tcg_const_i32(tcg_ctx, arm_rmode_to_sf(rmode));
gen_helper_set_neon_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env);
for (pass = 0; pass < (a->q ? 4 : 2); pass++) {
TCGv_i32 tmp = neon_load_reg(s, a->vm, pass);
gen_helper_rints(tcg_ctx, tmp, tmp, fpst);
neon_store_reg(s, a->vd, pass, tmp);
}
gen_helper_set_neon_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env);
tcg_temp_free_i32(tcg_ctx, tcg_rmode);
tcg_temp_free_ptr(tcg_ctx, fpst);
return true;
}
#define DO_VRINT(INSN, RMODE) \
static bool trans_##INSN(DisasContext *s, arg_2misc *a) \
{ \
return do_vrint(s, a, RMODE); \
}
DO_VRINT(VRINTN, FPROUNDING_TIEEVEN)
DO_VRINT(VRINTA, FPROUNDING_TIEAWAY)
DO_VRINT(VRINTZ, FPROUNDING_ZERO)
DO_VRINT(VRINTM, FPROUNDING_NEGINF)
DO_VRINT(VRINTP, FPROUNDING_POSINF)
#define DO_VEC_RMODE(INSN, RMODE, OP) \ #define DO_VEC_RMODE(INSN, RMODE, OP) \
static void gen_##INSN(TCGContext *s, unsigned vece, uint32_t rd_ofs, \ static void gen_##INSN(TCGContext *s, unsigned vece, uint32_t rd_ofs, \
uint32_t rm_ofs, \ uint32_t rm_ofs, \
@ -3920,6 +3858,12 @@ DO_VEC_RMODE(VCVTPS, FPROUNDING_POSINF, vcvt_rm_s)
DO_VEC_RMODE(VCVTMU, FPROUNDING_NEGINF, vcvt_rm_u) DO_VEC_RMODE(VCVTMU, FPROUNDING_NEGINF, vcvt_rm_u)
DO_VEC_RMODE(VCVTMS, FPROUNDING_NEGINF, vcvt_rm_s) DO_VEC_RMODE(VCVTMS, FPROUNDING_NEGINF, vcvt_rm_s)
DO_VEC_RMODE(VRINTN, FPROUNDING_TIEEVEN, vrint_rm_)
DO_VEC_RMODE(VRINTA, FPROUNDING_TIEAWAY, vrint_rm_)
DO_VEC_RMODE(VRINTZ, FPROUNDING_ZERO, vrint_rm_)
DO_VEC_RMODE(VRINTM, FPROUNDING_NEGINF, vrint_rm_)
DO_VEC_RMODE(VRINTP, FPROUNDING_POSINF, vrint_rm_)
static bool trans_VSWP(DisasContext *s, arg_2misc *a) static bool trans_VSWP(DisasContext *s, arg_2misc *a)
{ {
TCGv_i64 rm, rd; TCGv_i64 rm, rd;

View file

@ -1892,3 +1892,24 @@ DO_VCVT_RMODE(gvec_vcvt_rm_sh, helper_vfp_toshh, uint16_t)
DO_VCVT_RMODE(gvec_vcvt_rm_uh, helper_vfp_touhh, uint16_t) DO_VCVT_RMODE(gvec_vcvt_rm_uh, helper_vfp_touhh, uint16_t)
#undef DO_VCVT_RMODE #undef DO_VCVT_RMODE
#define DO_VRINT_RMODE(NAME, FUNC, TYPE) \
void HELPER(NAME)(void *vd, void *vn, void *stat, uint32_t desc) \
{ \
float_status *fpst = stat; \
intptr_t i, oprsz = simd_oprsz(desc); \
uint32_t rmode = simd_data(desc); \
uint32_t prev_rmode = get_float_rounding_mode(fpst); \
TYPE *d = vd, *n = vn; \
set_float_rounding_mode(rmode, fpst); \
for (i = 0; i < oprsz / sizeof(TYPE); i++) { \
d[i] = FUNC(n[i], fpst); \
} \
set_float_rounding_mode(prev_rmode, fpst); \
clear_tail(d, oprsz, simd_maxsz(desc)); \
}
DO_VRINT_RMODE(gvec_vrint_rm_h, helper_rinth, uint16_t)
DO_VRINT_RMODE(gvec_vrint_rm_s, helper_rints, uint32_t)
#undef DO_VRINT_RMODE

View file

@ -463,24 +463,6 @@ uint32_t HELPER(set_rmode)(uint32_t rmode, void *fpstp)
return prev_rmode; return prev_rmode;
} }
/*
* Set the current fp rounding mode in the standard fp status and return
* the old one. This is for NEON instructions that need to change the
* rounding mode but wish to use the standard FPSCR values for everything
* else. Always set the rounding mode back to the correct value after
* modifying it.
* The argument is a softfloat float_round_ value.
*/
uint32_t HELPER(set_neon_rmode)(uint32_t rmode, CPUARMState *env)
{
float_status *fp_status = &env->vfp.standard_fp_status;
uint32_t prev_rmode = get_float_rounding_mode(fp_status);
set_float_rounding_mode(rmode, fp_status);
return prev_rmode;
}
/* Half precision conversions. */ /* Half precision conversions. */
float32 HELPER(vfp_fcvt_f16_to_f32)(uint32_t a, void *fpstp, uint32_t ahp_mode) float32 HELPER(vfp_fcvt_f16_to_f32)(uint32_t a, void *fpstp, uint32_t ahp_mode)
{ {

View file

@ -1848,6 +1848,8 @@
#define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_x86_64 #define helper_gvec_vcvt_rm_us helper_gvec_vcvt_rm_us_x86_64
#define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_x86_64 #define helper_gvec_vcvt_rm_sh helper_gvec_vcvt_rm_sh_x86_64
#define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_x86_64 #define helper_gvec_vcvt_rm_uh helper_gvec_vcvt_rm_uh_x86_64
#define helper_gvec_vrint_rm_h helper_gvec_vrint_rm_h_x86_64
#define helper_gvec_vrint_rm_s helper_gvec_vrint_rm_s_x86_64
#define helper_power_down helper_power_down_x86_64 #define helper_power_down helper_power_down_x86_64
#define helper_pre_hvc helper_pre_hvc_x86_64 #define helper_pre_hvc helper_pre_hvc_x86_64
#define helper_pre_smc helper_pre_smc_x86_64 #define helper_pre_smc helper_pre_smc_x86_64
@ -1894,7 +1896,6 @@
#define helper_sel_flags helper_sel_flags_x86_64 #define helper_sel_flags helper_sel_flags_x86_64
#define helper_set_cp_reg helper_set_cp_reg_x86_64 #define helper_set_cp_reg helper_set_cp_reg_x86_64
#define helper_set_cp_reg64 helper_set_cp_reg64_x86_64 #define helper_set_cp_reg64 helper_set_cp_reg64_x86_64
#define helper_set_neon_rmode helper_set_neon_rmode_x86_64
#define helper_set_r13_banked helper_set_r13_banked_x86_64 #define helper_set_r13_banked helper_set_r13_banked_x86_64
#define helper_set_rmode helper_set_rmode_x86_64 #define helper_set_rmode helper_set_rmode_x86_64
#define helper_set_user_reg helper_set_user_reg_x86_64 #define helper_set_user_reg helper_set_user_reg_x86_64