view tests/mini/naked_asm4.d @ 943:95d09451cb59

Reverted the template instantiation changes from rev [940]. Wasn't safe it seems :(
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 05 Feb 2009 18:17:42 +0100
parents 5e3bb0c3ea8b
children
line wrap: on
line source

void foo()
{
    version(X86)
    asm
    {
        naked;
        jmp pass;
        hlt;
pass:   ret;
    }
    else version(X86_64)
    asm
    {
        naked;
        jmp pass;
        hlt;
pass:   ret;
    }
    else static assert(0, "todo");
}

void main()
{
    foo();
}