qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h
Date: Thu, 25 Feb 2010 15:04:28 +0200	[thread overview]
Message-ID: <20100225130427.GA10660@redhat.com> (raw)
In-Reply-To: <4B867230.60708@redhat.com>

On Thu, Feb 25, 2010 at 01:50:56PM +0100, Paolo Bonzini wrote:
> On 02/25/2010 12:40 PM, Michael S. Tsirkin wrote:
>> On Thu, Feb 18, 2010 at 11:28:14PM +0200, Blue Swirl wrote:
>>>>      /* restore global registers */
>>>> -#include "hostregs_helper.h"
>>>> +    asm("");
>>>> +    env = (void *) saved_env_reg;
>>>>
>>
>> Is this sufficient?
>> I see __asm__ __volatile__("": : :"memory") in virtio.
>> Is memory clobber implied? What about volatile?
>
> All asms without colons ("old-style") are volatile.  Clobbering memory  
> is not necessary since we are only caring about blocking assignments of  
> "env", which is by definition in a register

Then I think you should add that as a clobber. Otherwise what prevents the
compiler from reordering this asm wrt assignments?

> (hostregs_helper.h wasn't  
> clobbering memory either).


Maybe it was buggy :)

> Paolo

  reply	other threads:[~2010-02-25 13:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 23:26 [Qemu-devel] [PATCH 0/2] simplify global register save/restore Paolo Bonzini
2010-02-10 23:26 ` [Qemu-devel] [PATCH 1/2] remove dead m68k global register definitions Paolo Bonzini
2010-02-10 23:26 ` [Qemu-devel] [PATCH 2/2] get rid of hostregs_helper.h Paolo Bonzini
2010-02-18 19:07   ` Blue Swirl
2010-02-18 20:25     ` [Qemu-devel] [PATCH v2 1/2] remove dead m68k definitions Paolo Bonzini
2010-02-18 20:25       ` [Qemu-devel] [PATCH v2 2/2] get rid of hostregs_helper.h Paolo Bonzini
2010-02-18 21:28         ` [Qemu-devel] " Blue Swirl
2010-02-25 11:40           ` Michael S. Tsirkin
2010-02-25 12:50             ` Paolo Bonzini
2010-02-25 13:04               ` Michael S. Tsirkin [this message]
2010-02-25 13:11                 ` Paolo Bonzini
2010-02-13 17:58 ` [Qemu-devel] [PATCH 0/2] simplify global register save/restore Blue Swirl
2010-02-13 20:26   ` [Qemu-devel] " Paolo Bonzini
2010-02-13 20:57     ` Blue Swirl
2010-02-13 20:58       ` Paolo Bonzini
2010-02-26 11:30 ` [Qemu-devel] " Paul Brook
2010-02-26 13:05   ` Paolo Bonzini
2010-02-26 18:32     ` Paul Brook
2010-03-01 12:30       ` Paolo Bonzini
2010-03-01 14:02         ` Paul Brook

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=20100225130427.GA10660@redhat.com \
    --to=mst@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=pbonzini@redhat.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 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).