DragonFly bugs List (threaded) for 2007-05
Re: acpi module failing to load in 1.9.0 preview #4?
It is possible to 'fix' the problem by adjusting the __asm to actually
declare that it is referencing the static variable, but I dunno if it
is worth the hassle.
Basically, with all versions of GCC, the compiler does not know SQUAT
about the code that is actually in an __asm() line, EXCEPT for the
variable declarations in the line. For example:
#define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr)))
Here GCC doesn't have a clue about "fnsave %0". All it knows about
is the C -> ASM conversion of the variable 'addr'.
So if you don't specify a variable list with proper attributes, GCC
will feel free to optimize the hell out of it. In fact, if you do
not specify __volatile GCC will consider removing the __asm line
entirely and if you don't specify the "memory" attribute GCC will feel
free to reorder memory ops around the assembly (when __asm is used for
Isn't that fun?