public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] AArch64: add support for DFP (Decimal Floating point)
@ 2022-05-24  9:50 Christophe Lyon
  0 siblings, 0 replies; only message in thread
From: Christophe Lyon @ 2022-05-24  9:50 UTC (permalink / raw)
  To: gdb-cvs

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-24  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  9:50 [binutils-gdb] AArch64: add support for DFP (Decimal Floating point) Christophe Lyon

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).