------- 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

Reply via email to