target/arm: Update BRKA, BRKB, BRKN for PREDDESC
Since b64ee454a4
, all predicate operations should be
using these field macros for predicates.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210309155305.11301-6-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
2acbfbe431
commit
04c774a25d
@ -2710,7 +2710,7 @@ static uint32_t do_zero(ARMPredicateReg *d, intptr_t oprsz)
|
||||
void HELPER(sve_brkpa)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (last_active_pred(vn, vg, oprsz)) {
|
||||
compute_brk_z(vd, vm, vg, oprsz, true);
|
||||
} else {
|
||||
@ -2721,7 +2721,7 @@ void HELPER(sve_brkpa)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t HELPER(sve_brkpas)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (last_active_pred(vn, vg, oprsz)) {
|
||||
return compute_brks_z(vd, vm, vg, oprsz, true);
|
||||
} else {
|
||||
@ -2732,7 +2732,7 @@ uint32_t HELPER(sve_brkpas)(void *vd, void *vn, void *vm, void *vg,
|
||||
void HELPER(sve_brkpb)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (last_active_pred(vn, vg, oprsz)) {
|
||||
compute_brk_z(vd, vm, vg, oprsz, false);
|
||||
} else {
|
||||
@ -2743,7 +2743,7 @@ void HELPER(sve_brkpb)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t HELPER(sve_brkpbs)(void *vd, void *vn, void *vm, void *vg,
|
||||
uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (last_active_pred(vn, vg, oprsz)) {
|
||||
return compute_brks_z(vd, vm, vg, oprsz, false);
|
||||
} else {
|
||||
@ -2753,56 +2753,55 @@ uint32_t HELPER(sve_brkpbs)(void *vd, void *vn, void *vm, void *vg,
|
||||
|
||||
void HELPER(sve_brka_z)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
compute_brk_z(vd, vn, vg, oprsz, true);
|
||||
}
|
||||
|
||||
uint32_t HELPER(sve_brkas_z)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
return compute_brks_z(vd, vn, vg, oprsz, true);
|
||||
}
|
||||
|
||||
void HELPER(sve_brkb_z)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
compute_brk_z(vd, vn, vg, oprsz, false);
|
||||
}
|
||||
|
||||
uint32_t HELPER(sve_brkbs_z)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
return compute_brks_z(vd, vn, vg, oprsz, false);
|
||||
}
|
||||
|
||||
void HELPER(sve_brka_m)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
compute_brk_m(vd, vn, vg, oprsz, true);
|
||||
}
|
||||
|
||||
uint32_t HELPER(sve_brkas_m)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
return compute_brks_m(vd, vn, vg, oprsz, true);
|
||||
}
|
||||
|
||||
void HELPER(sve_brkb_m)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
compute_brk_m(vd, vn, vg, oprsz, false);
|
||||
}
|
||||
|
||||
uint32_t HELPER(sve_brkbs_m)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
return compute_brks_m(vd, vn, vg, oprsz, false);
|
||||
}
|
||||
|
||||
void HELPER(sve_brkn)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (!last_active_pred(vn, vg, oprsz)) {
|
||||
do_zero(vd, oprsz);
|
||||
}
|
||||
@ -2827,8 +2826,7 @@ static uint32_t predtest_ones(ARMPredicateReg *d, intptr_t oprsz,
|
||||
|
||||
uint32_t HELPER(sve_brkns)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
|
||||
intptr_t oprsz = FIELD_EX32(pred_desc, PREDDESC, OPRSZ);
|
||||
if (last_active_pred(vn, vg, oprsz)) {
|
||||
return predtest_ones(vd, oprsz, -1);
|
||||
} else {
|
||||
|
@ -2850,7 +2850,7 @@ static bool do_brk3(DisasContext *s, arg_rprr_s *a,
|
||||
TCGv_ptr n = tcg_temp_new_ptr();
|
||||
TCGv_ptr m = tcg_temp_new_ptr();
|
||||
TCGv_ptr g = tcg_temp_new_ptr();
|
||||
TCGv_i32 t = tcg_const_i32(vsz - 2);
|
||||
TCGv_i32 t = tcg_const_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz));
|
||||
|
||||
tcg_gen_addi_ptr(d, cpu_env, pred_full_reg_offset(s, a->rd));
|
||||
tcg_gen_addi_ptr(n, cpu_env, pred_full_reg_offset(s, a->rn));
|
||||
@ -2884,7 +2884,7 @@ static bool do_brk2(DisasContext *s, arg_rpr_s *a,
|
||||
TCGv_ptr d = tcg_temp_new_ptr();
|
||||
TCGv_ptr n = tcg_temp_new_ptr();
|
||||
TCGv_ptr g = tcg_temp_new_ptr();
|
||||
TCGv_i32 t = tcg_const_i32(vsz - 2);
|
||||
TCGv_i32 t = tcg_const_i32(FIELD_DP32(0, PREDDESC, OPRSZ, vsz));
|
||||
|
||||
tcg_gen_addi_ptr(d, cpu_env, pred_full_reg_offset(s, a->rd));
|
||||
tcg_gen_addi_ptr(n, cpu_env, pred_full_reg_offset(s, a->rn));
|
||||
|
Loading…
Reference in New Issue
Block a user