qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu vs gcc4


From: Paul Brook
Subject: Re: [Qemu-devel] qemu vs gcc4
Date: Mon, 23 Oct 2006 15:31:50 +0100
User-agent: KMail/1.9.4

> > We already do that. It doesn't stop gcc putting the return in the middle
> > of the function.
> >
> > Paul
>
> void f1();
> void f2();
>
> void f(int *z, int x, int y)
> {
>     if (x) {
>         *z = x;
>         f1();
>     } else {
>         *z = y;
>         f2();
>     }
>     asm volatile ("");
> }
>
> works, with gcc -O2 -fno-reorder-blocks. removing either the asm or the
> -f flag doesn't.  No idea if it's consistent across architectures.

It doesn't work reliably though. We already do everything you mention above.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]