Mercurial > projects > dstress
view run/a/asm_fistp_01_C.d @ 715:a35e4f0a9049
partial iasm FPU review
author | thomask |
---|---|
date | Fri, 28 Oct 2005 21:22:25 +0000 |
parents | 98e3d2ab382f |
children | a468938b0160 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // __DSTRESS_DFLAGS__ addon/cpuinfo.d module dstress.run.a.asm_fistp_01_C; import addon.cpuinfo; int main(){ version(D_InlineAsm){ haveFPU(); real r = -800.0L; long a, b; asm{ finit; fld1; fld r; fistp a; fistp b; } assert(a == -800); assert(b == 1); return 0; }else{ pragma(msg, "no inline asm support"); static assert(0); } }