view tests/mini/naked_asm4.d @ 1041:9dca7182aa75

Added some documentation for the IrFuncTyArg structure, which is key to writing ABI transformations.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 04 Mar 2009 16:13:16 +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();
}