mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-08 22:45:43 +00:00
target/arm: Implement SVE Integer Arithmetic - Unary Predicated Group
Backports commit afac6d0467c1327ad2e30a3c35347fcf5a773742 from qemu
This commit is contained in:
parent
878b862a04
commit
32949156d2
|
@ -3274,6 +3274,10 @@
|
|||
#define helper_sdiv64 helper_sdiv64_aarch64
|
||||
#define helper_simd_tbl helper_simd_tbl_aarch64
|
||||
#define helper_sqrt_f16 helper_sqrt_f16_aarch64
|
||||
#define helper_sve_abs_b helper_sve_abs_b_aarch64
|
||||
#define helper_sve_abs_d helper_sve_abs_d_aarch64
|
||||
#define helper_sve_abs_h helper_sve_abs_h_aarch64
|
||||
#define helper_sve_abs_s helper_sve_abs_s_aarch64
|
||||
#define helper_sve_add_zpzz_b helper_sve_add_zpzz_b_aarch64
|
||||
#define helper_sve_add_zpzz_d helper_sve_add_zpzz_d_aarch64
|
||||
#define helper_sve_add_zpzz_h helper_sve_add_zpzz_h_aarch64
|
||||
|
@ -3311,6 +3315,22 @@
|
|||
#define helper_sve_clr_d helper_sve_clr_d_aarch64
|
||||
#define helper_sve_clr_h helper_sve_clr_h_aarch64
|
||||
#define helper_sve_clr_s helper_sve_clr_s_aarch64
|
||||
#define helper_sve_cls_b helper_sve_cls_b_aarch64
|
||||
#define helper_sve_cls_d helper_sve_cls_d_aarch64
|
||||
#define helper_sve_cls_h helper_sve_cls_h_aarch64
|
||||
#define helper_sve_cls_s helper_sve_cls_s_aarch64
|
||||
#define helper_sve_clz_b helper_sve_clz_b_aarch64
|
||||
#define helper_sve_clz_d helper_sve_clz_d_aarch64
|
||||
#define helper_sve_clz_h helper_sve_clz_h_aarch64
|
||||
#define helper_sve_clz_s helper_sve_clz_s_aarch64
|
||||
#define helper_sve_cnot_b helper_sve_cnot_b_aarch64
|
||||
#define helper_sve_cnot_d helper_sve_cnot_d_aarch64
|
||||
#define helper_sve_cnot_h helper_sve_cnot_h_aarch64
|
||||
#define helper_sve_cnot_s helper_sve_cnot_s_aarch64
|
||||
#define helper_sve_cnt_zpz_b helper_sve_cnt_zpz_b_aarch64
|
||||
#define helper_sve_cnt_zpz_d helper_sve_cnt_zpz_d_aarch64
|
||||
#define helper_sve_cnt_zpz_h helper_sve_cnt_zpz_h_aarch64
|
||||
#define helper_sve_cnt_zpz_s helper_sve_cnt_zpz_s_aarch64
|
||||
#define helper_sve_eor_pppp helper_sve_eor_pppp_aarch64
|
||||
#define helper_sve_eor_zpzz_b helper_sve_eor_zpzz_b_aarch64
|
||||
#define helper_sve_eor_zpzz_d helper_sve_eor_zpzz_d_aarch64
|
||||
|
@ -3320,6 +3340,12 @@
|
|||
#define helper_sve_eorv_d helper_sve_eorv_d_aarch64
|
||||
#define helper_sve_eorv_h helper_sve_eorv_h_aarch64
|
||||
#define helper_sve_eorv_s helper_sve_eorv_s_aarch64
|
||||
#define helper_sve_fabs_d helper_sve_fabs_d_aarch64
|
||||
#define helper_sve_fabs_h helper_sve_fabs_h_aarch64
|
||||
#define helper_sve_fabs_s helper_sve_fabs_s_aarch64
|
||||
#define helper_sve_fneg_d helper_sve_fneg_d_aarch64
|
||||
#define helper_sve_fneg_h helper_sve_fneg_h_aarch64
|
||||
#define helper_sve_fneg_s helper_sve_fneg_s_aarch64
|
||||
#define helper_sve_lsl_zpzi_b helper_sve_lsl_zpzi_b_aarch64
|
||||
#define helper_sve_lsl_zpzi_d helper_sve_lsl_zpzi_d_aarch64
|
||||
#define helper_sve_lsl_zpzi_h helper_sve_lsl_zpzi_h_aarch64
|
||||
|
@ -3347,7 +3373,15 @@
|
|||
#define helper_sve_mul_zpzz_h helper_sve_mul_zpzz_h_aarch64
|
||||
#define helper_sve_mul_zpzz_s helper_sve_mul_zpzz_s_aarch64
|
||||
#define helper_sve_nand_pppp helper_sve_nand_pppp_aarch64
|
||||
#define helper_sve_neg_b helper_sve_neg_b_aarch64
|
||||
#define helper_sve_neg_d helper_sve_neg_d_aarch64
|
||||
#define helper_sve_neg_h helper_sve_neg_h_aarch64
|
||||
#define helper_sve_neg_s helper_sve_neg_s_aarch64
|
||||
#define helper_sve_nor_pppp helper_sve_nor_pppp_aarch64
|
||||
#define helper_sve_not_zpz_b helper_sve_not_zpz_b_aarch64
|
||||
#define helper_sve_not_zpz_d helper_sve_not_zpz_d_aarch64
|
||||
#define helper_sve_not_zpz_h helper_sve_not_zpz_h_aarch64
|
||||
#define helper_sve_not_zpz_s helper_sve_not_zpz_s_aarch64
|
||||
#define helper_sve_orn_pppp helper_sve_orn_pppp_aarch64
|
||||
#define helper_sve_orr_pppp helper_sve_orr_pppp_aarch64
|
||||
#define helper_sve_orr_zpzz_b helper_sve_orr_zpzz_b_aarch64
|
||||
|
@ -3392,6 +3426,12 @@
|
|||
#define helper_sve_sub_zpzz_d helper_sve_sub_zpzz_d_aarch64
|
||||
#define helper_sve_sub_zpzz_h helper_sve_sub_zpzz_h_aarch64
|
||||
#define helper_sve_sub_zpzz_s helper_sve_sub_zpzz_s_aarch64
|
||||
#define helper_sve_sxtb_d helper_sve_sxtb_d_aarch64
|
||||
#define helper_sve_sxtb_h helper_sve_sxtb_h_aarch64
|
||||
#define helper_sve_sxtb_s helper_sve_sxtb_s_aarch64
|
||||
#define helper_sve_sxth_d helper_sve_sxth_d_aarch64
|
||||
#define helper_sve_sxth_s helper_sve_sxth_s_aarch64
|
||||
#define helper_sve_sxtw_d helper_sve_sxtw_d_aarch64
|
||||
#define helper_sve_pfirst helper_sve_pfirst_aarch64
|
||||
#define helper_sve_pnext helper_sve_pnext_aarch64
|
||||
#define helper_sve_predtest helper_sve_predtest_aarch64
|
||||
|
@ -3426,6 +3466,12 @@
|
|||
#define helper_sve_umulh_zpzz_d helper_sve_umulh_zpzz_d_aarch64
|
||||
#define helper_sve_umulh_zpzz_h helper_sve_umulh_zpzz_h_aarch64
|
||||
#define helper_sve_umulh_zpzz_s helper_sve_umulh_zpzz_s_aarch64
|
||||
#define helper_sve_uxtb_d helper_sve_uxtb_d_aarch64
|
||||
#define helper_sve_uxtb_h helper_sve_uxtb_h_aarch64
|
||||
#define helper_sve_uxtb_s helper_sve_uxtb_s_aarch64
|
||||
#define helper_sve_uxth_d helper_sve_uxth_d_aarch64
|
||||
#define helper_sve_uxth_s helper_sve_uxth_s_aarch64
|
||||
#define helper_sve_uxtw_d helper_sve_uxtw_d_aarch64
|
||||
#define helper_udiv64 helper_udiv64_aarch64
|
||||
#define helper_vfp_cmpd_a64 helper_vfp_cmpd_a64_aarch64
|
||||
#define helper_vfp_cmped_a64 helper_vfp_cmped_a64_aarch64
|
||||
|
|
|
@ -3274,6 +3274,10 @@
|
|||
#define helper_sdiv64 helper_sdiv64_aarch64eb
|
||||
#define helper_simd_tbl helper_simd_tbl_aarch64eb
|
||||
#define helper_sqrt_f16 helper_sqrt_f16_aarch64eb
|
||||
#define helper_sve_abs_b helper_sve_abs_b_aarch64eb
|
||||
#define helper_sve_abs_d helper_sve_abs_d_aarch64eb
|
||||
#define helper_sve_abs_h helper_sve_abs_h_aarch64eb
|
||||
#define helper_sve_abs_s helper_sve_abs_s_aarch64eb
|
||||
#define helper_sve_add_zpzz_b helper_sve_add_zpzz_b_aarch64eb
|
||||
#define helper_sve_add_zpzz_d helper_sve_add_zpzz_d_aarch64eb
|
||||
#define helper_sve_add_zpzz_h helper_sve_add_zpzz_h_aarch64eb
|
||||
|
@ -3311,6 +3315,22 @@
|
|||
#define helper_sve_clr_d helper_sve_clr_d_aarch64eb
|
||||
#define helper_sve_clr_h helper_sve_clr_h_aarch64eb
|
||||
#define helper_sve_clr_s helper_sve_clr_s_aarch64eb
|
||||
#define helper_sve_cls_b helper_sve_cls_b_aarch64eb
|
||||
#define helper_sve_cls_d helper_sve_cls_d_aarch64eb
|
||||
#define helper_sve_cls_h helper_sve_cls_h_aarch64eb
|
||||
#define helper_sve_cls_s helper_sve_cls_s_aarch64eb
|
||||
#define helper_sve_clz_b helper_sve_clz_b_aarch64eb
|
||||
#define helper_sve_clz_d helper_sve_clz_d_aarch64eb
|
||||
#define helper_sve_clz_h helper_sve_clz_h_aarch64eb
|
||||
#define helper_sve_clz_s helper_sve_clz_s_aarch64eb
|
||||
#define helper_sve_cnot_b helper_sve_cnot_b_aarch64eb
|
||||
#define helper_sve_cnot_d helper_sve_cnot_d_aarch64eb
|
||||
#define helper_sve_cnot_h helper_sve_cnot_h_aarch64eb
|
||||
#define helper_sve_cnot_s helper_sve_cnot_s_aarch64eb
|
||||
#define helper_sve_cnt_zpz_b helper_sve_cnt_zpz_b_aarch64eb
|
||||
#define helper_sve_cnt_zpz_d helper_sve_cnt_zpz_d_aarch64eb
|
||||
#define helper_sve_cnt_zpz_h helper_sve_cnt_zpz_h_aarch64eb
|
||||
#define helper_sve_cnt_zpz_s helper_sve_cnt_zpz_s_aarch64eb
|
||||
#define helper_sve_eor_pppp helper_sve_eor_pppp_aarch64eb
|
||||
#define helper_sve_eor_zpzz_b helper_sve_eor_zpzz_b_aarch64eb
|
||||
#define helper_sve_eor_zpzz_d helper_sve_eor_zpzz_d_aarch64eb
|
||||
|
@ -3320,6 +3340,12 @@
|
|||
#define helper_sve_eorv_d helper_sve_eorv_d_aarch64eb
|
||||
#define helper_sve_eorv_h helper_sve_eorv_h_aarch64eb
|
||||
#define helper_sve_eorv_s helper_sve_eorv_s_aarch64eb
|
||||
#define helper_sve_fabs_d helper_sve_fabs_d_aarch64eb
|
||||
#define helper_sve_fabs_h helper_sve_fabs_h_aarch64eb
|
||||
#define helper_sve_fabs_s helper_sve_fabs_s_aarch64eb
|
||||
#define helper_sve_fneg_d helper_sve_fneg_d_aarch64eb
|
||||
#define helper_sve_fneg_h helper_sve_fneg_h_aarch64eb
|
||||
#define helper_sve_fneg_s helper_sve_fneg_s_aarch64eb
|
||||
#define helper_sve_lsl_zpzi_b helper_sve_lsl_zpzi_b_aarch64eb
|
||||
#define helper_sve_lsl_zpzi_d helper_sve_lsl_zpzi_d_aarch64eb
|
||||
#define helper_sve_lsl_zpzi_h helper_sve_lsl_zpzi_h_aarch64eb
|
||||
|
@ -3347,7 +3373,15 @@
|
|||
#define helper_sve_mul_zpzz_h helper_sve_mul_zpzz_h_aarch64eb
|
||||
#define helper_sve_mul_zpzz_s helper_sve_mul_zpzz_s_aarch64eb
|
||||
#define helper_sve_nand_pppp helper_sve_nand_pppp_aarch64eb
|
||||
#define helper_sve_neg_b helper_sve_neg_b_aarch64eb
|
||||
#define helper_sve_neg_d helper_sve_neg_d_aarch64eb
|
||||
#define helper_sve_neg_h helper_sve_neg_h_aarch64eb
|
||||
#define helper_sve_neg_s helper_sve_neg_s_aarch64eb
|
||||
#define helper_sve_nor_pppp helper_sve_nor_pppp_aarch64eb
|
||||
#define helper_sve_not_zpz_b helper_sve_not_zpz_b_aarch64eb
|
||||
#define helper_sve_not_zpz_d helper_sve_not_zpz_d_aarch64eb
|
||||
#define helper_sve_not_zpz_h helper_sve_not_zpz_h_aarch64eb
|
||||
#define helper_sve_not_zpz_s helper_sve_not_zpz_s_aarch64eb
|
||||
#define helper_sve_orn_pppp helper_sve_orn_pppp_aarch64eb
|
||||
#define helper_sve_orr_pppp helper_sve_orr_pppp_aarch64eb
|
||||
#define helper_sve_orr_zpzz_b helper_sve_orr_zpzz_b_aarch64eb
|
||||
|
@ -3392,6 +3426,12 @@
|
|||
#define helper_sve_sub_zpzz_d helper_sve_sub_zpzz_d_aarch64eb
|
||||
#define helper_sve_sub_zpzz_h helper_sve_sub_zpzz_h_aarch64eb
|
||||
#define helper_sve_sub_zpzz_s helper_sve_sub_zpzz_s_aarch64eb
|
||||
#define helper_sve_sxtb_d helper_sve_sxtb_d_aarch64eb
|
||||
#define helper_sve_sxtb_h helper_sve_sxtb_h_aarch64eb
|
||||
#define helper_sve_sxtb_s helper_sve_sxtb_s_aarch64eb
|
||||
#define helper_sve_sxth_d helper_sve_sxth_d_aarch64eb
|
||||
#define helper_sve_sxth_s helper_sve_sxth_s_aarch64eb
|
||||
#define helper_sve_sxtw_d helper_sve_sxtw_d_aarch64eb
|
||||
#define helper_sve_pfirst helper_sve_pfirst_aarch64eb
|
||||
#define helper_sve_pnext helper_sve_pnext_aarch64eb
|
||||
#define helper_sve_predtest helper_sve_predtest_aarch64eb
|
||||
|
@ -3426,6 +3466,12 @@
|
|||
#define helper_sve_umulh_zpzz_d helper_sve_umulh_zpzz_d_aarch64eb
|
||||
#define helper_sve_umulh_zpzz_h helper_sve_umulh_zpzz_h_aarch64eb
|
||||
#define helper_sve_umulh_zpzz_s helper_sve_umulh_zpzz_s_aarch64eb
|
||||
#define helper_sve_uxtb_d helper_sve_uxtb_d_aarch64eb
|
||||
#define helper_sve_uxtb_h helper_sve_uxtb_h_aarch64eb
|
||||
#define helper_sve_uxtb_s helper_sve_uxtb_s_aarch64eb
|
||||
#define helper_sve_uxth_d helper_sve_uxth_d_aarch64eb
|
||||
#define helper_sve_uxth_s helper_sve_uxth_s_aarch64eb
|
||||
#define helper_sve_uxtw_d helper_sve_uxtw_d_aarch64eb
|
||||
#define helper_udiv64 helper_udiv64_aarch64eb
|
||||
#define helper_vfp_cmpd_a64 helper_vfp_cmpd_a64_aarch64eb
|
||||
#define helper_vfp_cmped_a64 helper_vfp_cmped_a64_aarch64eb
|
||||
|
|
|
@ -3295,6 +3295,10 @@ aarch64_symbols = (
|
|||
'helper_sdiv64',
|
||||
'helper_simd_tbl',
|
||||
'helper_sqrt_f16',
|
||||
'helper_sve_abs_b',
|
||||
'helper_sve_abs_d',
|
||||
'helper_sve_abs_h',
|
||||
'helper_sve_abs_s',
|
||||
'helper_sve_add_zpzz_b',
|
||||
'helper_sve_add_zpzz_d',
|
||||
'helper_sve_add_zpzz_h',
|
||||
|
@ -3332,6 +3336,22 @@ aarch64_symbols = (
|
|||
'helper_sve_clr_d',
|
||||
'helper_sve_clr_h',
|
||||
'helper_sve_clr_s',
|
||||
'helper_sve_cls_b',
|
||||
'helper_sve_cls_d',
|
||||
'helper_sve_cls_h',
|
||||
'helper_sve_cls_s',
|
||||
'helper_sve_clz_b',
|
||||
'helper_sve_clz_d',
|
||||
'helper_sve_clz_h',
|
||||
'helper_sve_clz_s',
|
||||
'helper_sve_cnot_b',
|
||||
'helper_sve_cnot_d',
|
||||
'helper_sve_cnot_h',
|
||||
'helper_sve_cnot_s',
|
||||
'helper_sve_cnt_zpz_b',
|
||||
'helper_sve_cnt_zpz_d',
|
||||
'helper_sve_cnt_zpz_h',
|
||||
'helper_sve_cnt_zpz_s',
|
||||
'helper_sve_eor_pppp',
|
||||
'helper_sve_eor_zpzz_b',
|
||||
'helper_sve_eor_zpzz_d',
|
||||
|
@ -3341,6 +3361,12 @@ aarch64_symbols = (
|
|||
'helper_sve_eorv_d',
|
||||
'helper_sve_eorv_h',
|
||||
'helper_sve_eorv_s',
|
||||
'helper_sve_fabs_d',
|
||||
'helper_sve_fabs_h',
|
||||
'helper_sve_fabs_s',
|
||||
'helper_sve_fneg_d',
|
||||
'helper_sve_fneg_h',
|
||||
'helper_sve_fneg_s',
|
||||
'helper_sve_lsl_zpzi_b',
|
||||
'helper_sve_lsl_zpzi_d',
|
||||
'helper_sve_lsl_zpzi_h',
|
||||
|
@ -3368,7 +3394,15 @@ aarch64_symbols = (
|
|||
'helper_sve_mul_zpzz_h',
|
||||
'helper_sve_mul_zpzz_s',
|
||||
'helper_sve_nand_pppp',
|
||||
'helper_sve_neg_b',
|
||||
'helper_sve_neg_d',
|
||||
'helper_sve_neg_h',
|
||||
'helper_sve_neg_s',
|
||||
'helper_sve_nor_pppp',
|
||||
'helper_sve_not_zpz_b',
|
||||
'helper_sve_not_zpz_d',
|
||||
'helper_sve_not_zpz_h',
|
||||
'helper_sve_not_zpz_s',
|
||||
'helper_sve_orn_pppp',
|
||||
'helper_sve_orr_pppp',
|
||||
'helper_sve_orr_zpzz_b',
|
||||
|
@ -3413,6 +3447,12 @@ aarch64_symbols = (
|
|||
'helper_sve_sub_zpzz_d',
|
||||
'helper_sve_sub_zpzz_h',
|
||||
'helper_sve_sub_zpzz_s',
|
||||
'helper_sve_sxtb_d',
|
||||
'helper_sve_sxtb_h',
|
||||
'helper_sve_sxtb_s',
|
||||
'helper_sve_sxth_d',
|
||||
'helper_sve_sxth_s',
|
||||
'helper_sve_sxtw_d',
|
||||
'helper_sve_pfirst',
|
||||
'helper_sve_pnext',
|
||||
'helper_sve_predtest',
|
||||
|
@ -3447,6 +3487,12 @@ aarch64_symbols = (
|
|||
'helper_sve_umulh_zpzz_d',
|
||||
'helper_sve_umulh_zpzz_h',
|
||||
'helper_sve_umulh_zpzz_s',
|
||||
'helper_sve_uxtb_d',
|
||||
'helper_sve_uxtb_h',
|
||||
'helper_sve_uxtb_s',
|
||||
'helper_sve_uxth_d',
|
||||
'helper_sve_uxth_s',
|
||||
'helper_sve_uxtw_d',
|
||||
'helper_udiv64',
|
||||
'helper_vfp_cmpd_a64',
|
||||
'helper_vfp_cmped_a64',
|
||||
|
|
|
@ -285,6 +285,66 @@ DEF_HELPER_FLAGS_4(sve_asrd_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
|||
DEF_HELPER_FLAGS_4(sve_asrd_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_asrd_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_cls_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cls_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cls_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cls_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_clz_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_clz_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_clz_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_clz_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_cnt_zpz_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnt_zpz_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnt_zpz_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnt_zpz_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_cnot_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnot_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnot_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_cnot_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_fabs_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_fabs_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_fabs_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_fneg_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_fneg_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_fneg_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_not_zpz_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_not_zpz_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_not_zpz_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_not_zpz_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_sxtb_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_sxtb_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_sxtb_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_uxtb_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_uxtb_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_uxtb_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_sxth_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_sxth_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_uxth_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_uxth_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_sxtw_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_uxtw_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_abs_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_abs_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_abs_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_abs_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve_neg_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_neg_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_neg_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(sve_neg_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_5(sve_and_pppp, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_5(sve_bic_pppp, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_5(sve_eor_pppp, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32)
|
||||
|
|
|
@ -163,6 +163,29 @@ ASR_zpzw 00000100 .. 011 000 100 ... ..... ..... @rdn_pg_rm
|
|||
LSR_zpzw 00000100 .. 011 001 100 ... ..... ..... @rdn_pg_rm
|
||||
LSL_zpzw 00000100 .. 011 011 100 ... ..... ..... @rdn_pg_rm
|
||||
|
||||
### SVE Integer Arithmetic - Unary Predicated Group
|
||||
|
||||
# SVE unary bit operations (predicated)
|
||||
# Note esz != 0 for FABS and FNEG.
|
||||
CLS 00000100 .. 011 000 101 ... ..... ..... @rd_pg_rn
|
||||
CLZ 00000100 .. 011 001 101 ... ..... ..... @rd_pg_rn
|
||||
CNT_zpz 00000100 .. 011 010 101 ... ..... ..... @rd_pg_rn
|
||||
CNOT 00000100 .. 011 011 101 ... ..... ..... @rd_pg_rn
|
||||
NOT_zpz 00000100 .. 011 110 101 ... ..... ..... @rd_pg_rn
|
||||
FABS 00000100 .. 011 100 101 ... ..... ..... @rd_pg_rn
|
||||
FNEG 00000100 .. 011 101 101 ... ..... ..... @rd_pg_rn
|
||||
|
||||
# SVE integer unary operations (predicated)
|
||||
# Note esz > original size for extensions.
|
||||
ABS 00000100 .. 010 110 101 ... ..... ..... @rd_pg_rn
|
||||
NEG 00000100 .. 010 111 101 ... ..... ..... @rd_pg_rn
|
||||
SXTB 00000100 .. 010 000 101 ... ..... ..... @rd_pg_rn
|
||||
UXTB 00000100 .. 010 001 101 ... ..... ..... @rd_pg_rn
|
||||
SXTH 00000100 .. 010 010 101 ... ..... ..... @rd_pg_rn
|
||||
UXTH 00000100 .. 010 011 101 ... ..... ..... @rd_pg_rn
|
||||
SXTW 00000100 .. 010 100 101 ... ..... ..... @rd_pg_rn
|
||||
UXTW 00000100 .. 010 101 101 ... ..... ..... @rd_pg_rn
|
||||
|
||||
### SVE Logical - Unpredicated Group
|
||||
|
||||
# SVE bitwise logical operations (unpredicated)
|
||||
|
|
|
@ -499,6 +499,133 @@ DO_ZPZW(sve_lsl_zpzw_s, uint32_t, uint64_t, H1_4, DO_LSL)
|
|||
|
||||
#undef DO_ZPZW
|
||||
|
||||
/* Fully general two-operand expander, controlled by a predicate.
|
||||
*/
|
||||
#define DO_ZPZ(NAME, TYPE, H, OP) \
|
||||
void HELPER(NAME)(void *vd, void *vn, void *vg, uint32_t desc) \
|
||||
{ \
|
||||
intptr_t i, opr_sz = simd_oprsz(desc); \
|
||||
for (i = 0; i < opr_sz; ) { \
|
||||
uint16_t pg = *(uint16_t *)(vg + H1_2(i >> 3)); \
|
||||
do { \
|
||||
if (pg & 1) { \
|
||||
TYPE nn = *(TYPE *)(vn + H(i)); \
|
||||
*(TYPE *)(vd + H(i)) = OP(nn); \
|
||||
} \
|
||||
i += sizeof(TYPE), pg >>= sizeof(TYPE); \
|
||||
} while (i & 15); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Similarly, specialized for 64-bit operands. */
|
||||
#define DO_ZPZ_D(NAME, TYPE, OP) \
|
||||
void HELPER(NAME)(void *vd, void *vn, void *vg, uint32_t desc) \
|
||||
{ \
|
||||
intptr_t i, opr_sz = simd_oprsz(desc) / 8; \
|
||||
TYPE *d = vd, *n = vn; \
|
||||
uint8_t *pg = vg; \
|
||||
for (i = 0; i < opr_sz; i += 1) { \
|
||||
if (pg[H1(i)] & 1) { \
|
||||
TYPE nn = n[i]; \
|
||||
d[i] = OP(nn); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define DO_CLS_B(N) (clrsb32(N) - 24)
|
||||
#define DO_CLS_H(N) (clrsb32(N) - 16)
|
||||
|
||||
DO_ZPZ(sve_cls_b, int8_t, H1, DO_CLS_B)
|
||||
DO_ZPZ(sve_cls_h, int16_t, H1_2, DO_CLS_H)
|
||||
DO_ZPZ(sve_cls_s, int32_t, H1_4, clrsb32)
|
||||
DO_ZPZ_D(sve_cls_d, int64_t, clrsb64)
|
||||
|
||||
#define DO_CLZ_B(N) (clz32(N) - 24)
|
||||
#define DO_CLZ_H(N) (clz32(N) - 16)
|
||||
|
||||
DO_ZPZ(sve_clz_b, uint8_t, H1, DO_CLZ_B)
|
||||
DO_ZPZ(sve_clz_h, uint16_t, H1_2, DO_CLZ_H)
|
||||
DO_ZPZ(sve_clz_s, uint32_t, H1_4, clz32)
|
||||
DO_ZPZ_D(sve_clz_d, uint64_t, clz64)
|
||||
|
||||
DO_ZPZ(sve_cnt_zpz_b, uint8_t, H1, ctpop8)
|
||||
DO_ZPZ(sve_cnt_zpz_h, uint16_t, H1_2, ctpop16)
|
||||
DO_ZPZ(sve_cnt_zpz_s, uint32_t, H1_4, ctpop32)
|
||||
DO_ZPZ_D(sve_cnt_zpz_d, uint64_t, ctpop64)
|
||||
|
||||
#define DO_CNOT(N) (N == 0)
|
||||
|
||||
DO_ZPZ(sve_cnot_b, uint8_t, H1, DO_CNOT)
|
||||
DO_ZPZ(sve_cnot_h, uint16_t, H1_2, DO_CNOT)
|
||||
DO_ZPZ(sve_cnot_s, uint32_t, H1_4, DO_CNOT)
|
||||
DO_ZPZ_D(sve_cnot_d, uint64_t, DO_CNOT)
|
||||
|
||||
#define DO_FABS(N) (N & ((__typeof(N))-1 >> 1))
|
||||
|
||||
DO_ZPZ(sve_fabs_h, uint16_t, H1_2, DO_FABS)
|
||||
DO_ZPZ(sve_fabs_s, uint32_t, H1_4, DO_FABS)
|
||||
DO_ZPZ_D(sve_fabs_d, uint64_t, DO_FABS)
|
||||
|
||||
#define DO_FNEG(N) (N ^ ~((__typeof(N))-1 >> 1))
|
||||
|
||||
DO_ZPZ(sve_fneg_h, uint16_t, H1_2, DO_FNEG)
|
||||
DO_ZPZ(sve_fneg_s, uint32_t, H1_4, DO_FNEG)
|
||||
DO_ZPZ_D(sve_fneg_d, uint64_t, DO_FNEG)
|
||||
|
||||
#define DO_NOT(N) (~N)
|
||||
|
||||
DO_ZPZ(sve_not_zpz_b, uint8_t, H1, DO_NOT)
|
||||
DO_ZPZ(sve_not_zpz_h, uint16_t, H1_2, DO_NOT)
|
||||
DO_ZPZ(sve_not_zpz_s, uint32_t, H1_4, DO_NOT)
|
||||
DO_ZPZ_D(sve_not_zpz_d, uint64_t, DO_NOT)
|
||||
|
||||
#define DO_SXTB(N) ((int8_t)N)
|
||||
#define DO_SXTH(N) ((int16_t)N)
|
||||
#define DO_SXTS(N) ((int32_t)N)
|
||||
#define DO_UXTB(N) ((uint8_t)N)
|
||||
#define DO_UXTH(N) ((uint16_t)N)
|
||||
#define DO_UXTS(N) ((uint32_t)N)
|
||||
|
||||
DO_ZPZ(sve_sxtb_h, uint16_t, H1_2, DO_SXTB)
|
||||
DO_ZPZ(sve_sxtb_s, uint32_t, H1_4, DO_SXTB)
|
||||
DO_ZPZ(sve_sxth_s, uint32_t, H1_4, DO_SXTH)
|
||||
DO_ZPZ_D(sve_sxtb_d, uint64_t, DO_SXTB)
|
||||
DO_ZPZ_D(sve_sxth_d, uint64_t, DO_SXTH)
|
||||
DO_ZPZ_D(sve_sxtw_d, uint64_t, DO_SXTS)
|
||||
|
||||
DO_ZPZ(sve_uxtb_h, uint16_t, H1_2, DO_UXTB)
|
||||
DO_ZPZ(sve_uxtb_s, uint32_t, H1_4, DO_UXTB)
|
||||
DO_ZPZ(sve_uxth_s, uint32_t, H1_4, DO_UXTH)
|
||||
DO_ZPZ_D(sve_uxtb_d, uint64_t, DO_UXTB)
|
||||
DO_ZPZ_D(sve_uxth_d, uint64_t, DO_UXTH)
|
||||
DO_ZPZ_D(sve_uxtw_d, uint64_t, DO_UXTS)
|
||||
|
||||
#define DO_ABS(N) (N < 0 ? -N : N)
|
||||
|
||||
DO_ZPZ(sve_abs_b, int8_t, H1, DO_ABS)
|
||||
DO_ZPZ(sve_abs_h, int16_t, H1_2, DO_ABS)
|
||||
DO_ZPZ(sve_abs_s, int32_t, H1_4, DO_ABS)
|
||||
DO_ZPZ_D(sve_abs_d, int64_t, DO_ABS)
|
||||
|
||||
#define DO_NEG(N) (-N)
|
||||
|
||||
DO_ZPZ(sve_neg_b, uint8_t, H1, DO_NEG)
|
||||
DO_ZPZ(sve_neg_h, uint16_t, H1_2, DO_NEG)
|
||||
DO_ZPZ(sve_neg_s, uint32_t, H1_4, DO_NEG)
|
||||
DO_ZPZ_D(sve_neg_d, uint64_t, DO_NEG)
|
||||
|
||||
#undef DO_CLS_B
|
||||
#undef DO_CLS_H
|
||||
#undef DO_CLZ_B
|
||||
#undef DO_CLZ_H
|
||||
#undef DO_CNOT
|
||||
#undef DO_FABS
|
||||
#undef DO_FNEG
|
||||
#undef DO_ABS
|
||||
#undef DO_NEG
|
||||
#undef DO_ZPZ
|
||||
#undef DO_ZPZ_D
|
||||
|
||||
/* Two-operand reduction expander, controlled by a predicate.
|
||||
* The difference between TYPERED and TYPERET has to do with
|
||||
* sign-extension. E.g. for SMAX, TYPERED must be signed,
|
||||
|
|
|
@ -329,6 +329,120 @@ static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a, uint32_t insn)
|
|||
|
||||
#undef DO_ZPZZ
|
||||
|
||||
/*
|
||||
*** SVE Integer Arithmetic - Unary Predicated Group
|
||||
*/
|
||||
|
||||
static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn)
|
||||
{
|
||||
if (fn == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
unsigned vsz = vec_full_reg_size(s);
|
||||
tcg_gen_gvec_3_ool(tcg_ctx, vec_full_reg_offset(s, a->rd),
|
||||
vec_full_reg_offset(s, a->rn),
|
||||
pred_full_reg_offset(s, a->pg),
|
||||
vsz, vsz, 0, fn);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#define DO_ZPZ(NAME, name) \
|
||||
static bool trans_##NAME(DisasContext *s, arg_rpr_esz *a, uint32_t insn) \
|
||||
{ \
|
||||
static gen_helper_gvec_3 * const fns[4] = { \
|
||||
gen_helper_sve_##name##_b, gen_helper_sve_##name##_h, \
|
||||
gen_helper_sve_##name##_s, gen_helper_sve_##name##_d, \
|
||||
}; \
|
||||
return do_zpz_ool(s, a, fns[a->esz]); \
|
||||
}
|
||||
|
||||
DO_ZPZ(CLS, cls)
|
||||
DO_ZPZ(CLZ, clz)
|
||||
DO_ZPZ(CNT_zpz, cnt_zpz)
|
||||
DO_ZPZ(CNOT, cnot)
|
||||
DO_ZPZ(NOT_zpz, not_zpz)
|
||||
DO_ZPZ(ABS, abs)
|
||||
DO_ZPZ(NEG, neg)
|
||||
|
||||
static bool trans_FABS(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL,
|
||||
gen_helper_sve_fabs_h,
|
||||
gen_helper_sve_fabs_s,
|
||||
gen_helper_sve_fabs_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_FNEG(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL,
|
||||
gen_helper_sve_fneg_h,
|
||||
gen_helper_sve_fneg_s,
|
||||
gen_helper_sve_fneg_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_SXTB(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL,
|
||||
gen_helper_sve_sxtb_h,
|
||||
gen_helper_sve_sxtb_s,
|
||||
gen_helper_sve_sxtb_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_UXTB(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL,
|
||||
gen_helper_sve_uxtb_h,
|
||||
gen_helper_sve_uxtb_s,
|
||||
gen_helper_sve_uxtb_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_SXTH(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL, NULL,
|
||||
gen_helper_sve_sxth_s,
|
||||
gen_helper_sve_sxth_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_UXTH(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
static gen_helper_gvec_3 * const fns[4] = {
|
||||
NULL, NULL,
|
||||
gen_helper_sve_uxth_s,
|
||||
gen_helper_sve_uxth_d
|
||||
};
|
||||
return do_zpz_ool(s, a, fns[a->esz]);
|
||||
}
|
||||
|
||||
static bool trans_SXTW(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_sxtw_d : NULL);
|
||||
}
|
||||
|
||||
static bool trans_UXTW(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
|
||||
{
|
||||
return do_zpz_ool(s, a, a->esz == 3 ? gen_helper_sve_uxtw_d : NULL);
|
||||
}
|
||||
|
||||
#undef DO_ZPZ
|
||||
|
||||
/*
|
||||
*** SVE Integer Reduction Group
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue