annotate norun/i/in_out_body_10_B.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 b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
781
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
6 // @date@ 2005-12-12
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 870
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5835
781
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
870
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 781
diff changeset
9 // __DSTRESS_TORTURE_BLOCK__ -release
38ea1bb385b6 bit -> bool and __DSTRESS_TORTURE_BLOCK__ fixes
thomask
parents: 781
diff changeset
10 // __DSTRESS_ELINE__ 28
781
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
11
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 module dstress.norun.i.in_out_body_10_B;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 class Base {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16 int func()
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17 out (result) {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
18 assert(result);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
19 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
20 body {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
21 return 13;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
22 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
23 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
24
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
25 class Derived : Base {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
26 override int func()
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
27 out (result) {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
28 assert(0);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
29 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
30 body {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
31 return 17;
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
32 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
33 }
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
34
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
35 int main() {
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
36 Derived derived = new Derived();
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
37
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
38 assert(derived.func() == 17);
56e9b89c4b72 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
39 }