view run/a/asm_ds_01_A.d @ 1337:0839eb936902

[Issue 697] No const folding on asm db,dw, etc Don Clugston <clugdbug@yahoo.com.au> 2006-12-18 http://d.puremagic.com/issues/show_bug.cgi?id=697
author thomask
date Tue, 23 Jan 2007 12:03:51 +0000
parents
children bebc7472a832
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Don Clugston <clugdbug@yahoo.com.au>
// @date@	2006-12-18
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=697
// @desc@	[Issue 697] No const folding on asm db,dw, etc

module dstress.run.a.asm_ds_01_A;

version(D_InlineAsm_X86){
	version = runTest;
}else version(D_InlineAsm_X86_64){
	version = runTest;
}

version(runTest){
	int main(){
		int i = 3;
		short x = 0x4040;

		asm{
			mov EAX, i;
			ds x;
			mov i, EAX;
		}

		assert(i == 5);

		return 0;
	}
}else{
	pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
	static assert(0);
}