Mercurial > projects > dstress
view 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 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Autor$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2005-07-31 // @uri@ news:dciqn7$73f$1@digitaldaemon.com module dstress.run.v.volatile_01_B; template load( T, int i, size_t sizeofT : 4 = T.sizeof ){ T load( inout T val ){ asm{ naked; mov EAX, [EAX]; ret; } } } int main(){ int i; load!(int,1)(i); load!(int,2)(i); return 0; }