From 81657e580045026b3a79f3a8db6fac5e7e5dad66 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 27 Apr 2022 16:29:32 +0100 Subject: [PATCH] AArch64: add support for DFP (Decimal Floating point) This small patch adds support for TYPE_CODE_DECFLOAT in aapcs_is_vfp_call_or_return_candidate_1 and pass_in_v_vfp_candidate, so that GDB for AArch64 knows how to pass DFP parameters and how to read DFP results when calling a function. Tested on aarch64-linux-gnu, with a GCC with DFP support in the PATH, all of GDB's DFP tests pass. --- gdb/aarch64-tdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index e35c083454d..67a3f96e1a7 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -1470,6 +1470,7 @@ aapcs_is_vfp_call_or_return_candidate_1 (struct type *type, switch (type->code ()) { case TYPE_CODE_FLT: + case TYPE_CODE_DECFLOAT: if (TYPE_LENGTH (type) > 16) return -1; @@ -1780,6 +1781,7 @@ pass_in_v_vfp_candidate (struct gdbarch *gdbarch, struct regcache *regcache, switch (arg_type->code ()) { case TYPE_CODE_FLT: + case TYPE_CODE_DECFLOAT: return pass_in_v (gdbarch, regcache, info, TYPE_LENGTH (arg_type), value_contents (arg).data ()); break; -- 2.30.2