Mercurial > projects > dstress
annotate run/i/ieee_754_int2flt_G.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 | 9dcac8d4e97f |
children |
rev | line source |
---|---|
883 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.i.ieee_754_int2flt_G; | |
6 | |
7 int main(){ | |
8 size_t border; | |
1091 | 9 |
883 | 10 if((ulong.sizeof * 8) < real.dig * 3){ |
11 border = ulong.sizeof * 8; | |
12 }else{ | |
13 border = real.dig * 3; | |
14 } | |
15 | |
16 for(ulong i = 0; i < border; i++){ | |
884 | 17 ulong test = 1; |
18 test <<= i; | |
883 | 19 real r = test; |
20 ulong result = cast(ulong)r; | |
21 | |
22 if(result != test){ | |
23 assert(0); | |
24 } | |
25 } | |
26 | |
27 return 0; | |
28 } |