[PATCH 1/4] Aarch64: Func to detect args passed in float regs

Simon Marchi simon.marchi@polymtl.ca
Tue Aug 28 15:43:00 GMT 2018


On 2018-08-20 05:29, Alan Hayward wrote:
> aapcs_is_vfp_call_or_return_candidate is as an eventual replacement
> for is_hfa_or_hva.
> 
> This function is based on the GCC code
> gcc/config/aarch64/aarch64.c:aarch64_vfp_is_call_or_return_candidate ()
> 
> 2018-08-20  Alan Hayward  <alan.hayward@arm.com>
> 
> 	* aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
> 	(aapcs_is_vfp_call_or_return_candidate_1): New function.
> 	(aapcs_is_vfp_call_or_return_candidate): Likewise.

I'm not an AArch64 expert, but I didn't spot anything suspicious.  The 
documentation
helps a lot to understand, thanks for that.


> +/* Return true if an argument, whose type is described by TYPE, can
> be passed or
> +   returned in simd/fp registers, providing enough parameter passing 
> registers
> +   are available.  This is as described in the AAPCS64.
> +
> +   Upon successful return, *COUNT returns the number of needed 
> registers,
> +   *FUNDAMENTAL_TYPE contains the type of those registers.
> +
> +   Candidate as per the AAPCS64 5.4.2.C is either a:
> +   - float.
> +   - short-vector.
> +   - HFA (Homogeneous Floating-point Aggregate, 4.3.5.1). A Composite
> type where
> +     all the members are floats and has at most 4 members.
> +   - HVA (Homogeneous Short-vector Aggregate, 4.3.5.2). A Composite 
> type where
> +     all the members are short vectors and has at most 4 members.
> +   - Complex (7.1.1)
> +
> +   Note that HFAs and HVAs can include nested structures and arrays.  
> */
> +
> +bool

static?

Simon



More information about the Gdb-patches mailing list