This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2010 12:23:14 -0000
- Subject: [Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults
- References: <bug-44129-19181@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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