Mercurial > projects > dstress
annotate run/byte_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 | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.byte_02; | |
0 | 6 |
7 int main(){ | |
8 byte a, b, c; | |
9 | |
10 // "+" | |
11 a=16; b=-124; c=a+b; | |
12 assert( a == 16); | |
13 assert( b == -124); | |
14 assert( c == -108); | |
15 a=-124; b=16; c=a+b; | |
16 assert( a == -124); | |
17 assert( b == 16); | |
18 assert( c == -108); | |
19 a=63; b=28; c=a+b; | |
20 assert( a == 63); | |
21 assert( b == 28); | |
22 assert( c == 91); | |
23 a=-63; b=-28; c=a+b; | |
24 assert( a == -63); | |
25 assert( b == -28); | |
26 assert( c == -91); | |
27 | |
28 return 0; | |
29 } |