This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults



------- Comment #21 from andi-gcc at firstfloor dot org  2010-06-19 12:23 -------
This is the inline (after preprocessor) 

I guess the many asm meta commands confuse the heuristic. Maybe it could
be fixed to ignore such commands.

static inline void rdtsc_barrier(void)
{
 asm volatile ("661:\n\t" ".byte 0x66,0x66,0x90\n" "\n662:\n" ".section
.altinstructions,\"a\"\n" " " ".balign 8" " " "\n" " " ".quad" " " "661b\n" " "
".quad" " " "663f\n" "   .byte " "(3*32+17)" "\n" "      .byte 662b-661b\n" "  
 .byte 664f-663f\n" "    .byte 0xff + (664f-663f) - (662b-661b)\n"
".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "mfence"
"\n664:\n" ".previous" : : : "memory");
 asm volatile ("661:\n\t" ".byte 0x66,0x66,0x90\n" "\n662:\n" ".section
.altinstructions,\"a\"\n" " " ".balign 8" " " "\n" " " ".quad" " " "661b\n" " "
".quad" " " "663f\n" "   .byte " "(3*32+18)" "\n" "      .byte 662b-661b\n" "  
 .byte 664f-663f\n" "    .byte 0xff + (664f-663f) - (662b-661b)\n"
".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "lfence"
"\n664:\n" ".previous" : : : "memory");
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]