annotate run/opCat_05.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 38ea1bb385b6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
410
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
1 // $HeadURL$
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
2 // $Date$
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
3 // $Author$
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
4
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
6 // @date@ 2005-04-08
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
7 // @uri@ news:d36g3g$31ec$1@digitaldaemon.com
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
8
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
9 module dstress.run.opCat_05;
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
10
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
11 int main(){
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 410
diff changeset
12 static bool[] a = [true, true, false, true, false];
410
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
13 assert(a.length==5);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
14 assert(a[0]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
15 assert(a[1]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
16 assert(a[2]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
17 assert(a[3]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
18 assert(a[4]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
19
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 410
diff changeset
20 bool[] b = a~true;
410
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
21
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
22 assert(a.length==5);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
23 assert(a[0]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
24 assert(a[1]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
25 assert(a[2]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
26 assert(a[3]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
27 assert(a[4]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
28
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
29 assert(b.length==6);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
30 assert(b[0]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
31 assert(b[1]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
32 assert(b[2]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
33 assert(b[3]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
34 assert(b[4]==false);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
35 assert(b[5]==true);
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
36
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
37 return 0;
537363a856bf ~/~= bit array
thomask
parents:
diff changeset
38 }