lkml.org 
[lkml]   [1998]   [Jan]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Alan Cox)
SubjectRe: gcc-2.8.0 miscompiles kernel (Was: gcc-2.8 out...)
DateSun, 18 Jan 1998 17:41:04 +0000 (GMT)
> The output of objdump -d -S seems to indicate that the line..
>     *(&eflags) = (eflags & 0xffffcfff) | (level << 12);
> .. was simply optimized away by 2.8.0.
> 
> Since the manipulation in question is to a local variable, and there
> are no references past this line, it's OK for gcc to throw it away as
> it is not valid after the function returns.

Interesting but ultimately the compiler does win the argument. Changing the
kernel so it generates

	*((volatile u32 *)&eflags)

should persuade gcc to behave. Right now the compiler knows the result of
a local variable stack assigment is thrown and the kernel knows it isnt.

Alan


\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.173 / U:0.020 seconds]
©2003-2008 Jasper Spaans