Mercurial > projects > ldc
view tests/mini/asm5.d @ 1621:fb2e6707ad17
Merge DMD r314+r315: bugzilla 2029 Typesafe variadic functions don't...
Both DMD revisions are for fixing bugzilla 2029 (Typesafe variadic
functions don't work in CTFE).
The DMD r314 commit message is:
bugzilla 2029 (Typesafe variadic functions don't work in CTFE
The DMD r315 commit message is:
bugzilla 2029 - try again
---
dmd/constfold.c | 11 ++++-
dmd/declaration.c | 21 +++++++++-
dmd/declaration.h | 10 ++++-
dmd/expression.c | 1 +
dmd/interpret.c | 111 +++++++++++++++++++++++++++++++++++++++++++++--------
dmd/mars.h | 2 +-
dmd/mtype.c | 2 +-
7 files changed, 135 insertions(+), 23 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:22 -0300 |
parents | 855889b7b268 |
children |
line wrap: on
line source
int foo() { version(X86) { asm { mov EAX, 42; } } else version(X86_64) { asm { movq RAX, 42; } } else static assert(0, "todo"); } ulong bar() { version(X86) { asm { mov EAX, 0xFF; mov EDX, 0xAA; } } else version(X86_64) { asm { movq RAX, 0xAA000000FF; } } else static assert(0, "todo"); } void main() { long l = 1; l = 2; l = 4; l = 8; assert(foo() == 42); assert(bar() == 0xAA000000FF); }