Mercurial > projects > ldc
annotate tests/mini/asm6.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 | 08f87d8cd101 |
children |
rev | line source |
---|---|
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
1 extern(C) int printf(char*, ...); |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
2 |
1215
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
3 version (D_InlineAsm_X86) |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
4 version = InlineAsm_X86_Any; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
5 version (D_InlineAsm_X86_64) |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
6 version = InlineAsm_X86_Any; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
7 |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
8 void main() |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
9 { |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
10 int a,b,c; |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
11 a = int.max-1; |
741
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
12 b = 5; |
1215
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
13 version (InlineAsm_X86_Any) |
741
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
14 { |
1215
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
15 asm |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
16 { |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
17 mov EAX, a; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
18 mov ECX, b; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
19 add EAX, ECX; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
20 jo Loverflow; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
21 mov c, EAX; |
08f87d8cd101
Fix some unittests for 64-bit asm. They were operating on int variables as if
Frits van Bommel <fvbommel wxs.nl>
parents:
1035
diff
changeset
|
22 } |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
23 } |
741
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
24 printf("a == %d\n", a); |
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
25 printf("b == %d\n", b); |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
26 printf("c == %d\n", c); |
741
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
27 assert(c == c); |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
28 return; |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
29 |
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
30 Loverflow: |
741
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
31 int y=0; |
4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
Christian Kamm <kamm incasoftware de>
parents:
341
diff
changeset
|
32 //assert(0, "overflow"); |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
diff
changeset
|
33 } |