Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: 'Mark Kettenis' <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [RFC-v2] amd64-windows: Fix funcall with by-pointer arguments
Date: Tue, 17 Sep 2013 13:50:00 -0000	[thread overview]
Message-ID: <20130917135029.GJ3132@adacore.com> (raw)
In-Reply-To: <20130916205705.GC3132@adacore.com>

> Thanks for doing that. I haven't completely finished reviewing
> the patch yet, but I wanted to send a message so that you and
> everyone else knows that I am on it. The patch looked good, minus
> some trivial formatting issues which I will fix, but I noticed
> a problem with function returning arrays. I am not sure where
> it is coming from, whether from me incorrectly applying your
> change, or missing something else, or whether it's a regression.
> 
> I ran out of time for today, but will try to pursue this further
> tomorrow.

Small update for today. This is the change I had to apply on top of
your patch in order to fix the problem:

-  else if (amd64_windows_passed_by_integer_register (type))
-    regnum = AMD64_RAX_REGNUM;
+  else if (len == 1 || len == 2 || len == 4 || len == 8)
+    {
+      /* All values of this size are returned via RAX.  */
+      regnum = AMD64_RAX_REGNUM;
+    }

It fixes the case where we return a small array of integers.
The documentation I have said, at the time:

    Return values that can fit into 64-bits are returned through RAX
    (including __m64 types), except for __m128, __m128i, __m128d, floats,
    and doubles, which are returned in XMM0. [...] User defined types to
    be returned must be 1, 2, 4, 8, 16, 32, or 64 bits in length.

This all made me realize that merging our two patches creates
a bit of confusion about what is a pure rewrite, and what is an
attempt to fix what.

So, here is what I will do: I will clean my patch up, retest,
also remove all amd64-windows-specific hooks as initially said,
and then send you an updated patch containing your changes, with
my fixes. If you could please:
  1. Re-test, making sure that I did not break anything back;
  2. Re-submit each piece for each problem that you're solving,
     with description provided with each patch.

This will make the review process easier for me.

Thank you!
-- 
Joel


  reply	other threads:[~2013-09-17 13:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 17:23 Joel Brobecker
2012-10-24 17:23 ` [RFA 2/2] amd64-windows: Arguments passed by pointer Joel Brobecker
2012-10-24 17:24 ` [RFA 1/2] Revert "amd64-windows: memory args passed by pointer during function calls." Joel Brobecker
2012-10-25 13:18 ` amd64-windows: Fix funcall with by-pointer arguments Mark Kettenis
2013-01-16 11:59   ` Joel Brobecker
2013-09-13 22:11     ` [RFC-v2] " Pierre Muller
2013-09-16 20:57       ` Joel Brobecker
2013-09-17 13:50         ` Joel Brobecker [this message]
2013-09-20 23:20           ` Joel Brobecker
2013-09-24 16:33             ` Joel Brobecker
2013-09-24 16:33               ` [commit 1/4] Reimplement function calls on amd64-windows Joel Brobecker
2013-09-24 17:26                 ` fixed ChangeLog: " Joel Brobecker
2013-09-24 16:33               ` [commit 4/4] Revert use of classify callback in i386 gdbarch_tdep Joel Brobecker
2013-09-24 16:33               ` [commit 3/4] Revert use of memory_args_by_pointer " Joel Brobecker
2013-09-24 16:33               ` [commit 2/4] Revert use of integer_param_regs_saved_in_caller_frame " Joel Brobecker
2013-09-24 16:53               ` [RFC-v2] amd64-windows: Fix funcall with by-pointer arguments Mark Kettenis
2013-09-24 22:02               ` Pierre Muller
2013-09-26  0:34                 ` Joel Brobecker

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=20130917135029.GJ3132@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /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