http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49104
Uros Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.05.22 18:04:30 Target Milestone|--- |4.6.1 Ever Confirmed|0 |1 --- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2011-05-22 18:04:30 UTC --- No, the problem is in search_line_mmx (lex.c), compiled with SSE option. This option also enables CMOVE instruction, so we have protect usage of search_line_mmx with following patch: --cut here-- Index: libcpp/lex.c =================================================================== --- libcpp/lex.c (revision 174030) +++ libcpp/lex.c (working copy) @@ -480,7 +480,7 @@ static void __attribute__((constructor)) init_vectorized_lexer (void) { - unsigned dummy, ecx = 0, edx = 0; + unsigned dummy, ecx = 0, edx = 0, edx_e = 0; search_line_fast_type impl = search_line_acc_char; int minimum = 0; @@ -488,7 +488,7 @@ minimum = 3; #elif defined(__SSE2__) minimum = 2; -#elif defined(__SSE__) || defined(__3dNOW_A__) +#elif defined(__SSE__) minimum = 1; #endif @@ -503,9 +503,9 @@ else if (minimum == 1 || (edx & bit_SSE)) impl = search_line_mmx; } - else if (__get_cpuid (0x80000001, &dummy, &dummy, &dummy, &edx)) + else if (__get_cpuid (0x80000001, &dummy, &dummy, &dummy, &edx_e)) { - if (minimum == 1 || edx & bit_3DNOWP) + if (minimum == 1 || (edx_e & bit_3DNOWP && edx & bit_CMOV)) impl = search_line_mmx; } --cut here-- Reinhard, can you please test the above patch?