btmux-0.6-rc4/doc/
btmux-0.6-rc4/event/
btmux-0.6-rc4/game/
btmux-0.6-rc4/game/maps/
btmux-0.6-rc4/game/mechs/
btmux-0.6-rc4/game/text/help/
btmux-0.6-rc4/game/text/help/cat_faction/
btmux-0.6-rc4/game/text/help/cat_inform/
btmux-0.6-rc4/game/text/help/cat_misc/
btmux-0.6-rc4/game/text/help/cat_mux/
btmux-0.6-rc4/game/text/help/cat_mux/cat_commands/
btmux-0.6-rc4/game/text/help/cat_mux/cat_functions/
btmux-0.6-rc4/game/text/help/cat_templates/
btmux-0.6-rc4/game/text/wizhelp/
btmux-0.6-rc4/include/
btmux-0.6-rc4/misc/
btmux-0.6-rc4/python/
btmux-0.6-rc4/src/hcode/btech/
btmux-0.6-rc4/tree/
#ifndef __PREFETCH_H__
#define __PREFETCH_H__

#define alternative_input(oldinstr, newinstr, feature, input...)        \
    asm volatile ("661:\n\t" oldinstr "\n662:\n"                \
            ".section .altinstructions,\"a\"\n"           \
            "  .align 4\n"                        \
            "  .long 661b\n"            /* label */           \
            "  .long 663f\n"        /* new instruction */     \
            "  .byte %c0\n"             /* feature bit */     \
            "  .byte 662b-661b\n"       /* sourcelen */       \
            "  .byte 664f-663f\n"       /* replacementlen */      \
            ".previous\n"                     \
            ".section .altinstr_replacement,\"ax\"\n"         \
            "663:\n\t" newinstr "\n664:\n"   /* replacement */    \
            ".previous" :: "i" (feature), ##input)


static inline void prefetch(const void *x)
{
    alternative_input(ASM_NOP4,
            "prefetchnta (%1)",
            X86_FEATURE_XMM,
            "r" (x));
}


#endif