annotate run/v/volatile_01_A.d @ 1535:20d8ee6523e1

updated to DMD-1.013
author thomask
date Mon, 07 May 2007 05:19:57 +0000
parents b8c0195059d9
children 56d43974b468
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
611
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
1 // $HeadURL$
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
2 // $Date$
618
569a4150a3dd fixed meta data
thomask
parents: 611
diff changeset
3 // $Author$
611
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
4
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
6 // @date@ 2005-07-31
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 618
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4638
611
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
8
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
9 module dstress.run.v.volatile_01_A;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
10
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
11 template load( T, int i, size_t sizeofT : 4 = T.sizeof ){
1535
20d8ee6523e1 updated to DMD-1.013
thomask
parents: 1489
diff changeset
12 T load( ref T val ){
611
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
13 volatile asm{
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
14 naked;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
15 mov EAX, [EAX];
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
16 ret;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
17 }
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
18 }
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
19 }
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
20
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
21 int main(){
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
22 int i;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
23 load!(int,1)(i);
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
24 load!(int,2)(i);
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
25 return 0;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
26 }