annotate run/v/volatile_01_B.d @ 611:697d0f7b0fe8

Sean Kelly <sean@f4.ca> 2005-07-31 news:dciqn7$73f$1@digitaldaemon.com
author thomask
date Tue, 02 Aug 2005 22:46:24 +0000
parents
children b8c0195059d9
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$
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
3 // $Autor$
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
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
7 // @uri@ news:dciqn7$73f$1@digitaldaemon.com
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_B;
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 ){
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
12 T load( inout T val ){
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
13 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 }