[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from l
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp |
Date: |
Thu, 11 Aug 2011 14:31:46 +0100 |
On 11 August 2011 14:13, Paolo Bonzini <address@hidden> wrote:
> On 08/11/2011 02:40 PM, Peter Maydell wrote:
>> We don't change env between the setjmp and longjmp so the compiler
>> should not trash it. (Indeed according to Jan in
>> http://lists.gnu.org/archive/html/qemu-devel/2011-07/msg00144.html
>> -Wclobbered doesn't complain about this code.)
>
> Then it's a compiler bug, not smartness. Making env volatile (or making a
> volatile copy if there is a performance impact) should still be enough to
> work around it.
Yes. (It would have to be a volatile copy, I think, env is a function
parameter and I don't think you can make those volatile.)
https://bugs.launchpad.net/qemu/+bug/823902 includes some discussion
of the effects on the test of adding the volatile copy.
-- PMM
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Peter Maydell, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Peter Maydell, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, David Gilbert, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Peter Maydell, 2011/08/11
- Re: [Qemu-devel] [PATCH] tcg: Reload local variables after return from longjmp, Paolo Bonzini, 2011/08/11