annotate run/o/opDiv_07_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
521
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
1 // $HeadURL$
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
2 // $Date$
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
3 // $Author$
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
4
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
5 // @author@ David Friedman <d3rdclsmail_a_@_t_earthlink_d_._t_net>
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
6 // @date@ 2005-05-03
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 525
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3881
521
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
8
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
9 module dstress.run.o.opDiv_07_B;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
10
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
11 int main(){
525
60bcfb2cf1e3 ifloat * ifloat => float
thomask
parents: 521
diff changeset
12 float a = -1.0fi / 0.0fi;
521
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
13
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
14 ifloat b = -1.0fi;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
15 ifloat c = 0.0fi;
525
60bcfb2cf1e3 ifloat * ifloat => float
thomask
parents: 521
diff changeset
16 float d;
521
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
17
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
18 void* X = &a;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
19
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
20 d = b/c;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
21 void* Y = &d;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
22
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
23 assert((cast(int*)X)[0]==(cast(int*)Y)[0]);
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
24 return 0;
a8b982e594e7 compiletime versus runtime opDiv
thomask
parents:
diff changeset
25 }