Mercurial > projects > ldc
view tests/mini/naked_asm2.d @ 922:0749c0757a43
Apply naked changes of [920] to dmd2/
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 03 Feb 2009 18:11:39 +0100 |
parents | 545f54041d91 |
children | 79e3d33e6d6e |
line wrap: on
line source
int foo() { static int fourty2 = 42; version(X86) asm { naked; mov EAX, fourty2; ret; } else static assert(0, "todo"); } void main() { int i = foo(); printf("i == %d\n", i); assert(i == 42); } extern(C) int printf(char*, ...);