annotate run/creal_02.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 5511f9277078
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
374
f87ba6507260 added missing meta-data
thomask
parents: 94
diff changeset
1 // $HeadURL$
f87ba6507260 added missing meta-data
thomask
parents: 94
diff changeset
2 // $Date$
f87ba6507260 added missing meta-data
thomask
parents: 94
diff changeset
3 // $Author$
f87ba6507260 added missing meta-data
thomask
parents: 94
diff changeset
4
94
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
5 module dstress.run.creal_02;
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
6
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
7 int main(){
920
5511f9277078 testcase review
thomask
parents: 374
diff changeset
8 real x1 = 2.0L;
5511f9277078 testcase review
thomask
parents: 374
diff changeset
9 real y1 = 3.0L;
5511f9277078 testcase review
thomask
parents: 374
diff changeset
10 real x2 = 5.0L;
5511f9277078 testcase review
thomask
parents: 374
diff changeset
11 real y2 = 7.0L;
5511f9277078 testcase review
thomask
parents: 374
diff changeset
12 ireal i = 1.0Li;
94
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
13
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
14 creal a = x1 + y1*i;
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
15 creal b = x2 + y2*i;
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
16 creal c = a - b;
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
17
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
18 creal d = (x1-x2) + (y1*i-y2*i);
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
19 assert(c == d);
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
20
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
21 return 0;
8fd629339db4 added basic creal tests
thomask
parents:
diff changeset
22 }