From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>, Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] w64: Fix calls of TCG helper functions with 5 arguments
Date: Wed, 12 Sep 2012 21:14:51 +0200 [thread overview]
Message-ID: <20120912191451.GB6791@ohm.aurel32.net> (raw)
In-Reply-To: <CAFEAcA-nRn4S3Tim1jrOaOtCdtGE4m1xjiBMgTgS-1kJ-po_fg@mail.gmail.com>
On Wed, Sep 12, 2012 at 07:12:47PM +0100, Peter Maydell wrote:
> On 12 September 2012 19:03, Stefan Weil <sw@weilnetz.de> wrote:
> > diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
> > index da17bba..43b5572 100644
> > --- a/tcg/i386/tcg-target.c
> > +++ b/tcg/i386/tcg-target.c
> > @@ -118,7 +118,7 @@ static void patch_reloc(uint8_t *code_ptr, int type,
> > static inline int tcg_target_get_call_iarg_regs_count(int flags)
> > {
> > if (TCG_TARGET_REG_BITS == 64) {
> > - return 6;
> > + return ARRAY_SIZE(tcg_target_call_iarg_regs);
> > }
> >
> > return 0;
>
> Hmm. Why can't we just return the array size in all cases?
> Is there something special about 32 bit x86? I checked, and
> all our other TCG targets return the same value as the size of
> the iarg_regs array (either using ARRAY_SIZE or by just returning
> the right number)...
>
On 32-bit x86, all arguments are now being passed on the stack, that's
why the function returns 0. On the other hand when the change has been
done, the registers haven't been removed from tcg_target_call_iarg_regs.
I think this patch is fine enough for 1.2, but a better patch is needed
for master.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2012-09-12 19:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 18:03 [Qemu-devel] [PATCH] w64: Fix calls of TCG helper functions with 5 arguments Stefan Weil
2012-09-12 18:12 ` Peter Maydell
2012-09-12 19:14 ` Aurelien Jarno [this message]
2012-09-12 19:39 ` Stefan Weil
2012-09-14 17:44 ` Blue Swirl
2012-09-12 20:01 ` Stefan Weil
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=20120912191451.GB6791@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=sw@weilnetz.de \
/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 NNTP newsgroup(s).