annotate run/v/volatile_01_A.d @ 1602:56d43974b468

Fix broken tests fvbommel pointed out in #2.
author Christian Kamm <kamm incasoftware de>
date Fri, 06 Mar 2009 15:48:16 +0100
parents 20d8ee6523e1
children
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;
1602
56d43974b468 Fix broken tests fvbommel pointed out in #2.
Christian Kamm <kamm incasoftware de>
parents: 1535
diff changeset
23 version (X86) {
56d43974b468 Fix broken tests fvbommel pointed out in #2.
Christian Kamm <kamm incasoftware de>
parents: 1535
diff changeset
24 load!(int,1)(i);
56d43974b468 Fix broken tests fvbommel pointed out in #2.
Christian Kamm <kamm incasoftware de>
parents: 1535
diff changeset
25 load!(int,2)(i);
56d43974b468 Fix broken tests fvbommel pointed out in #2.
Christian Kamm <kamm incasoftware de>
parents: 1535
diff changeset
26 }
611
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
27 return 0;
697d0f7b0fe8 Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
28 }