view test/asm1.d @ 137:ce7b81fb957f trunk

[svn r141] fixed more problems with classinfo moved more IR state out of the AST classes
author lindquist
date Fri, 18 Jan 2008 16:42:16 +0100
parents 5825d48b27d1
children 21f85bac0b1a
line wrap: on
line source

module asm1;

void main()
{
    version(LLVM_InlineAsm_X86_64)
    {
        long x;
        asm
        {
            mov RAX, 42L;
            mov x, RAX;
        }
        printf("x = %ld\n", x);
    }
    else
    {
        static assert(0, "no llvm inline asm for this platform yet");
    }
}