public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Christophe Lyon <clyon@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] AArch64: add support for DFP (Decimal Floating point)
Date: Tue, 24 May 2022 09:50:04 +0000 (GMT)	[thread overview]
Message-ID: <20220524095004.0B333385E02C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81657e580045026b3a79f3a8db6fac5e7e5dad66

commit 81657e580045026b3a79f3a8db6fac5e7e5dad66
Author: Christophe Lyon <christophe.lyon@arm.com>
Date:   Wed Apr 27 16:29:32 2022 +0100

    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.

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;
 
@@ -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;


                 reply	other threads:[~2022-05-24  9:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220524095004.0B333385E02C@sourceware.org \
    --to=clyon@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).