[lkml]   [2010]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: gcc 4.5.1 / as miscompiling drivers/char/i8k.c ?
Andi Kleen <> writes:

> Jim <> writes:
>> After upgrading my Dell laptop, both OS+kernel the i8k interface was giving
>> nonsensical output. As it turned out it's not the kernel but compiler
>> upgrade which broke this.
>> Guys at Archlinux have found the underlying cause (but don't seem to have
>> submitted a patch yet):
>> gcc seems to optimize the assembly statements away.
>> And indeed, applying this patch makes the i8k interface work again,
>> i.e. replacing the asm(..) construct by asm volatile(..)
> The compiler really should not optimize the asm away, because
> it has both input and output arguments which are later used.
> "asm volatile" normally just means "don't move significantly"

The asm fails to mention that it modifies *regs.


Andreas Schwab,
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."

 \ /
  Last update: 2010-11-07 23:43    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean