public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@arm.com>
To: gdb-patches@sourceware.org, Luis Machado <Luis.Machado@arm.com>
Subject: Re: [PATCH 2/2] AArch64: add support for DFP (Decimal Floating point)
Date: Tue, 24 May 2022 09:55:49 +0200	[thread overview]
Message-ID: <d9398155-b3e6-7558-f521-70778c622730@arm.com> (raw)
In-Reply-To: <20220520090619.90409-2-christophe.lyon@arm.com>



On 5/20/22 11:06, Christophe Lyon wrote:
> 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.

More precisely, patch 1/2 has a side-effect of enabling the GDB DFP 
tests, some of which fail without this patch 2/2:
gdb.base/dfp-test.exp: Call function with many _Decimal128 arguments.
gdb.base/dfp-test.exp: Call function with many _Decimal32 arguments.
gdb.base/dfp-test.exp: Call function with many _Decimal64 arguments.
gdb.base/dfp-test.exp: Call function with many mixed decimal float 
arguments.
gdb.base/dfp-test.exp: Call function with mixed decimal float arguments 
TEST.
gdb.base/dfp-test.exp: Call function with mixed decimal float arguments.
gdb.base/dfp-test.exp: backtrace function with correct _Decimal128 
arguments.
gdb.base/dfp-test.exp: backtrace function with correct _Decimal32 arguments.
gdb.base/dfp-test.exp: backtrace function with correct _Decimal64 arguments.

OK?

Christophe


> ---
>   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  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:06 [PATCH 1/2] Merge config/ changes from GCC, to enable DFP on AArch64 Christophe Lyon
2022-05-20  9:06 ` [PATCH 2/2] AArch64: add support for DFP (Decimal Floating point) Christophe Lyon
2022-05-24  7:55   ` Christophe Lyon [this message]
2022-05-24  8:10     ` Luis Machado
2022-05-20 16:17 ` [PATCH 1/2] Merge config/ changes from GCC, to enable DFP on AArch64 Tom Tromey

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=d9398155-b3e6-7558-f521-70778c622730@arm.com \
    --to=christophe.lyon@arm.com \
    --cc=Luis.Machado@arm.com \
    --cc=gdb-patches@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).