Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix passing double float complex arguments in sparc64
Date: Sat, 08 Feb 2014 02:47:00 -0000	[thread overview]
Message-ID: <20140208024729.GJ5485@adacore.com> (raw)
In-Reply-To: <87mwi5s7me.fsf@oracle.com>

Hi Jose,

Sorry about the delay....

> 2013-10-15  Jose E. Marchesi  <jose.marchesi@oracle.com>
> 
>         * sparc64-tdep.c (sparc64_store_arguments): Do not align complex
>         double float arguments to 16-byte in the argument slots.

One remark and a question...

>        if (regnum != -1)
>         {
>           regcache_cooked_write (regcache, regnum, valbuf);
> +         if (sparc64_complex_floating_p (type)
> +             && (len == 16)
> +             && (regnum < SPARC64_D30_REGNUM))
> +           regcache_cooked_write (regcache, regnum + 1, valbuf + 8);

I think this part should be moved next to where complex_floating_point
types are handled in terms of setting regnum. It seems to be the way
things are done for other situations like this.

>           /* If we're storing the value in a floating-point register,
>               also store it in the corresponding %0 register(s).  */
>           if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D10_REGNUM)
>             {
> +             int dregnum = regnum;
>               gdb_assert (element < 6);
>               regnum = SPARC_O0_REGNUM + element;
>               regcache_cooked_write (regcache, regnum, valbuf);
> +             if (sparc64_complex_floating_p (type)
> +                 && (len == 16)
> +                 && (dregnum < SPARC64_D10_REGNUM))
> +               regcache_cooked_write (regcache, regnum + 1, valbuf + 8);

I think the same is true of this hunk, no? Also, I don't see the reason
why you're defining a new variable dregnum which is just a copy of
regnum.

-- 
Joel


  reply	other threads:[~2014-02-08  2:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 15:01 Jose E. Marchesi
2014-02-05 19:02 ` Jose E. Marchesi
2014-02-08  2:47   ` Joel Brobecker [this message]
2014-02-10 13:22     ` Jose E. Marchesi
2014-02-11  4:45       ` Joel Brobecker
2014-02-11 12:39         ` Jose E. Marchesi
  -- strict thread matches above, loose matches on Subject: below --
2013-10-15 15:55 Jose E. Marchesi
2013-10-23 19:58 ` Mark Kettenis
2013-12-10 18:46   ` Jose E. Marchesi
2013-12-11 12:29     ` Jose E. Marchesi
2013-12-11 14:09       ` Jose E. Marchesi

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=20140208024729.GJ5485@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    /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