linux-mips
[Top] [All Lists]

Re: [patch] Prevent dead code/data removal with gcc 3.4

To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Subject: Re: [patch] Prevent dead code/data removal with gcc 3.4
From: Ralf Baechle <ralf@linux-mips.org>
Date: Sat, 14 Feb 2004 02:15:39 +0100
Cc: David Daney <ddaney@avtrex.com>, "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>, linux-mips@linux-mips.org
In-reply-to: <20040213224959.GB20118@rembrandt.csv.ica.uni-stuttgart.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.55.0402131453360.15042@jurand.ds.pg.gda.pl> <20040213145316.GA23810@linux-mips.org> <20040213222253.GA20118@rembrandt.csv.ica.uni-stuttgart.de> <402D513F.8080205@avtrex.com> <20040213224959.GB20118@rembrandt.csv.ica.uni-stuttgart.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Fri, Feb 13, 2004 at 11:50:00PM +0100, Thiemo Seufer wrote:

> > My understanding is that with gcc-3.4 that __asm__ __volatile__ does not 
> > protect against dead code removal.  If the code is not dead __volatile__ 
> > works as documented, but dead code removal still happens.
> 
> The inline version isn't dead code, and gcc isn't allowed to reschedule
> code around a __asm__ __volatile__, so the patch should be ok.

It's the gcc generated function epilogue which is the problem.  There's
no reliable way to work around that ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>