[PATCH 2/57][Arm][GAS] Add support for MVE instructions: vpst, vadd, vsub and vabd

Andre Vieira (lists) andre.simoesdiasvieira@arm.com
Mon May 13 13:42:00 GMT 2019


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  <andre.simoesdiasvieira@arm.com>

         * 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
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor.patch
Type: text/x-patch
Size: 13398 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190513/1750aa92/attachment.bin>


More information about the Binutils mailing list