[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h |
Date: |
Thu, 25 Feb 2010 15:04:28 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
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
- [Qemu-devel] [PATCH 0/2] simplify global register save/restore, Paolo Bonzini, 2010/02/10
- [Qemu-devel] [PATCH 1/2] remove dead m68k global register definitions, Paolo Bonzini, 2010/02/10
- [Qemu-devel] [PATCH 2/2] get rid of hostregs_helper.h, Paolo Bonzini, 2010/02/10
- Re: [Qemu-devel] [PATCH 2/2] get rid of hostregs_helper.h, Blue Swirl, 2010/02/18
- [Qemu-devel] [PATCH v2 1/2] remove dead m68k definitions, Paolo Bonzini, 2010/02/18
- [Qemu-devel] [PATCH v2 2/2] get rid of hostregs_helper.h, Paolo Bonzini, 2010/02/18
- [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h, Blue Swirl, 2010/02/18
- [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h, Michael S. Tsirkin, 2010/02/25
- [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h, Paolo Bonzini, 2010/02/25
- [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h,
Michael S. Tsirkin <=
- [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h, Paolo Bonzini, 2010/02/25
Re: [Qemu-devel] [PATCH 0/2] simplify global register save/restore, Blue Swirl, 2010/02/13
Re: [Qemu-devel] [PATCH 0/2] simplify global register save/restore, Paul Brook, 2010/02/26