=== modified file 'adler32_x86.c' --- adler32_x86.c 2011-03-15 00:28:12 +0000 +++ adler32_x86.c 2011-03-15 23:14:56 +0000 @@ -1041,12 +1041,17 @@ local inline int toggle_eflags_test(const unsigned long mask) { unsigned long f; + int result; f = read_flags(); write_flags(f ^ mask); - if (!((f ^ read_flags()) & mask)) - return 0; - return -1; + result = !!((f ^ read_flags()) & mask); + /* + * restore the old flags, the test for i486 tests the alignment + * check bit, and left set will confuse the x86 software world. + */ + write_flags(f); + return result; } /* ========================================================================= */ @@ -1070,6 +1075,9 @@ return; our_cpu.init_done = -1; + /* force a write out to memory */ + __asm__ __volatile__ ("" : : "m" (our_cpu.init_done)); + if (!is_486()) return;