From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1652) id 0B333385E02C; Tue, 24 May 2022 09:50:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B333385E02C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Christophe Lyon To: gdb-cvs@sourceware.org Subject: [binutils-gdb] AArch64: add support for DFP (Decimal Floating point) X-Act-Checkin: binutils-gdb X-Git-Author: Christophe Lyon X-Git-Refname: refs/heads/master X-Git-Oldrev: a55dfbb9abeda5255f002ae4445d9c390c3f6025 X-Git-Newrev: 81657e580045026b3a79f3a8db6fac5e7e5dad66 Message-Id: <20220524095004.0B333385E02C@sourceware.org> Date: Tue, 24 May 2022 09:50:04 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2022 09:50:04 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D81657e580045= 026b3a79f3a8db6fac5e7e5dad66 commit 81657e580045026b3a79f3a8db6fac5e7e5dad66 Author: Christophe Lyon Date: Wed Apr 27 16:29:32 2022 +0100 AArch64: add support for DFP (Decimal Floating point) =20 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. =20 Tested on aarch64-linux-gnu, with a GCC with DFP support in the PATH, all of GDB's DFP tests pass. Diff: --- 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; =20 @@ -1780,6 +1781,7 @@ pass_in_v_vfp_candidate (struct gdbarch *gdbarch, str= uct 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;