This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 2018-08-28 11:49, Alan Hayward wrote:
On 28 Aug 2018, at 16:43, Simon Marchi <simon.marchi@polymtl.ca> wrote:

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?


Yes, it should be static. But, in this patch nothing calls the function, which
causes a compile failure. I make it static in patch 2.
A little awkward, but seemed the best way to do it.


Alan.

Ah, I see. Another option would be to put __attribute__((unused)) temporarily. But I'm fine with what you've done too.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]