All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 06/11] TCG/x86: use stack for TCG temps
Date: Wed, 18 May 2011 09:09:13 -0700	[thread overview]
Message-ID: <4DD3EF29.8060004@twiddle.net> (raw)
In-Reply-To: <20110517184636.GW30615@hall.aurel32.net>

On 05/17/2011 11:46 AM, Aurelien Jarno wrote:
>> -    tcg_set_frame(s, TCG_AREG0, offsetof(CPUState, temp_buf),
>> -                  CPU_TEMP_BUF_NLONGS * sizeof(long));
>>  }
> 
> Note that this patch is likely to break calls to helpers which need
> parameters on the stack, by judging at the current code (I haven't 
> tested it in practice):
> 
> |     if (allocate_args) {
> |         tcg_out_addi(s, TCG_REG_CALL_STACK, -STACK_DIR(call_stack_size));
> |     }
> 
> The stack register (esp) is decreased.

I don't think this ever happens in practice, given that we've already
allocated TCG_STATIC_CALL_ARGS_SIZE worth of stack for calls.  For 
i386, that's 32 int-sized arguments, well more than any helper needs.

This code in tcg.c is way too simplistic to actually work on targets
with non-trivial stack allocation policies, e.g. ppc64.  The fact 
that the target works at present is testament to the fact that this
code doesn't actually trigger.  I would be just as happy to remove
this dynamic stack allocation code and replace it with an assert.



r~

      parent reply	other threads:[~2011-05-18 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14 19:38 [Qemu-devel] [PATCH 06/11] TCG/x86: use stack for TCG temps Blue Swirl
2011-05-17 14:57 ` Richard Henderson
2011-05-17 18:46 ` Aurelien Jarno
2011-05-17 20:08   ` Blue Swirl
2011-05-18 16:09   ` Richard Henderson [this message]

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=4DD3EF29.8060004@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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 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.