Hi, After Nick's comments I decided to clean up the definition and uses of check_simd_pred_availability. I hope it makes the function clearer now. This is to be applied on top of the MVE series (was easier and cleaner than rebasing everything). Is this OK? Cheers, Andre gas/ChangeLog 2019-05-13 Andre Vieira * config/tc-arm.c (check_simd_pred_availability): Refactor. (do_neon_dyadic_i_su): Refactor use of check_simd_pred_availability. (do_neon_dyadic_i64_su): Likewise. (do_neon_shl): Likewise. (do_neon_qshl): Likewise. (do_neon_rshl): Likewise. (do_neon_logic): Likewise. (do_neon_dyadic_if_su): Likewise. (do_neon_addsub_if_i): Likewise. (do_neon_mac_maybe_scalar): Likewise. (do_neon_fmac): Likewise. (do_neon_mul): Likewise. (do_neon_qdmulh): Likewise. (do_neon_qrdmlah): Likewise. (do_neon_abs_neg): Likewise. (do_neon_sli): Likewise. (do_neon_sri): Likewise. (do_neon_qshlu_imm): Likewise. (do_neon_cvt_1): Likewise. (do_neon_cvttb_1): Likewise. (do_neon_mvn): Likewise. (do_neon_rev): Likewise. (do_neon_dup): Likewise. (do_neon_mov): Likewise. (do_neon_rshift_round_imm): Likewise. (do_neon_sat_abs_neg): Likewise. (do_neon_cls): Likewise. (do_neon_clz): Likewise. (do_vmaxnm): Likewise. (do_vrint_1): Likewise. (do_vcmla): Likewise. (do_vcadd): Likewise. On 02/05/2019 11:56, Nick Clifton wrote: > Hi Andre, > >> This patch adds most of the framework used by the rest of the GAS patches for MVE. > > I noticed that this function: > >> +static int >> +check_simd_pred_availability (int fp, unsigned check) > > returns an integer value, but it is only ever used in boolean > tests. IMHO it should either have a bfd_boolean return type, > or else an enum with the return values having textual names to > indicate their meaning. > > I also saw that in do_neon_logic() there is a test against > the function returning FAIL: > > if (rs == NS_QQQ > && check_simd_pred_availability (0, NEON_CHECK_ARCH | NEON_CHECK_CC) > == FAIL) > > But FAIL is not one of the values explicitly returned by > check_simd_pred_availability().... > > Cheers > Nick > >