annotate run/mini/arrays18.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents c6ef09dfba4d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1628
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
1 module mini.arrays18;
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
2
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
3 struct Str { int a,b; }
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
4 void main() {
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
5 Str[] arr = new Str[64];
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
6
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
7 auto tmp = Str(1,2);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
8 arr[] = tmp;
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
9 assert(arr[0].a == 1);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
10 assert(arr[0].b == 2);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
11 assert(arr[13].a == 1);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
12 assert(arr[13].b == 2);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
13 assert(arr[42].a == 1);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
14 assert(arr[42].b == 2);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
15 assert(arr[63].a == 1);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
16 assert(arr[63].b == 2);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
17
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
18 arr[] = Str(3,4);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
19 assert(arr[0].a == 3);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
20 assert(arr[0].b == 4);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
21 assert(arr[13].a == 3);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
22 assert(arr[13].b == 4);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
23 assert(arr[42].a == 3);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
24 assert(arr[42].b == 4);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
25 assert(arr[63].a == 3);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
26 assert(arr[63].b == 4);
c6ef09dfba4d add mini test set from ldc project
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
27 }