All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Richard Henderson <rth@twiddle.net>,
	Alexander Graf <agraf@suse.de>,
	Aurelien Jarno <aurelien@aurel32.net>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs
Date: Thu, 13 Sep 2012 07:50:57 +0200	[thread overview]
Message-ID: <50517441.9060103@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA_p0DdZVnXQSx+qObyZm0Ve8vGJxsYK=4Apc5nP01izRw@mail.gmail.com>

Am 12.09.2012 23:18, schrieb Peter Maydell:
> On 12 September 2012 21:44, Stefan Weil <sw@weilnetz.de> wrote:
>> --- a/tcg/i386/tcg-target.c
>> +++ b/tcg/i386/tcg-target.c
>> @@ -75,9 +75,7 @@ static const int tcg_target_call_iarg_regs[] = {
>>       TCG_REG_R8,
>>       TCG_REG_R9,
>>   #else
>> -    TCG_REG_EAX,
>> -    TCG_REG_EDX,
>> -    TCG_REG_ECX
>> +    /* 32 bit mode uses stack based calling convention (GCC default). */
>>   #endif
>>   };
> This makes the array zero-length for 32 bit targets, but functions
> like tcg_out_tlb_load() and tcg_out_qemu_ld() still unconditionally
> access elements in it...
>
> -- PMM

Thanks for the hint. I'm afraid there are a lot more functions
of that kind in i386/tcg-target.c.

I could use conditional compilation for those accesses,
but first I'd like to understand why this works at all.

- sw

  reply	other threads:[~2012-09-13  5:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 20:44 [Qemu-devel] [PATCH 0/4] Fix and clean tcg_target_get_call_iarg_regs_count Stefan Weil
2012-09-12 20:44 ` [Qemu-devel] [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments Stefan Weil
2012-09-12 20:44 ` [Qemu-devel] [PATCH 2/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs Stefan Weil
2012-09-12 21:18   ` Peter Maydell
2012-09-13  5:50     ` Stefan Weil [this message]
2012-09-13 14:19       ` Richard Henderson
2012-09-13 14:31       ` Peter Maydell
2012-09-12 20:44 ` [Qemu-devel] [PATCH 3/4] tcg: Move tcg_target_get_call_iarg_regs_count to tcg.c Stefan Weil
2012-09-12 20:59   ` Aurelien Jarno
2012-09-13  5:31     ` Stefan Weil
2012-09-12 20:44 ` [Qemu-devel] [PATCH 4/4] tcg: Remove unused parameter from tcg_target_get_call_iarg_regs_count 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=50517441.9060103@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.