Mercurial > projects > dstress
changeset 638:61d8b062bf80
added some basic integer asm operations and registers tests
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_A; + +void main(){ + version(D_InlineAsm){ + short x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_B; + +void main(){ + version(D_InlineAsm){ + ushort x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_C; + +void main(){ + version(D_InlineAsm){ + int x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_D.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_D; + +void main(){ + version(D_InlineAsm){ + uint x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_E.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_E; + +void main(){ + version(D_InlineAsm){ + long x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_F.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_F; + +void main(){ + version(D_InlineAsm){ + ulong x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_G.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_G; + +void main(){ + version(D_InlineAsm){ + float x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_H.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_H; + +void main(){ + version(D_InlineAsm){ + ifloat x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_I.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_I; + +void main(){ + version(D_InlineAsm){ + cfloat x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_J.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_J; + +void main(){ + version(D_InlineAsm){ + real x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_K.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_K; + +void main(){ + version(D_InlineAsm){ + ireal x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_L.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_L; + +void main(){ + version(D_InlineAsm){ + creal x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_M.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_M; + +void main(){ + version(D_InlineAsm){ + double x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_N.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_N; + +void main(){ + version(D_InlineAsm){ + idouble x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_O.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.a.asm_ah_02_O; + +void main(){ + version(D_InlineAsm){ + cdouble x; + + asm{ + mov + AH, + x; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_Q.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 17 + +module dstress.nocompile.a.asm_ah_02_Q; + +enum E : short { + A = 0x1234, + B = 0x5678 +} + +void main(){ + version(D_InlineAsm){ + asm{ + mov AH, E.B; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/asm_ah_02_R.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 17 + +module dstress.nocompile.a.asm_ah_02_R; + +enum E : int { + A = 0x1234, + B = 0x5678 +} + +void main(){ + version(D_InlineAsm){ + asm{ + mov AH, E.B; + } + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- a/run/a/asm_add_01.d Wed Aug 17 21:28:25 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - // $HeadURL$ - // $Date$ - // $Author$ - -module dstress.run.a.asm_add_01; - -int test(int i){ - asm{ - naked; - add EAX, EAX; - ret; - } -} - -int main(){ - assert(test(1)==2); - assert(test(2)==4); - assert(test(3)==6); - return 0; -} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_add_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_add_01_A; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_23_45_56; + ubyte b = 0xFFu; + + assert(i==0x12_23_45_56); + assert(b==0xFFu); + + asm{ + mov EAX, 0; + mov AH, b; + add AH, 1; + mov i, EAX; + } + + assert(i==0); + assert(b==0xFFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_add_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_add_01_B; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_23_45_56u; + ushort s = 0xFFFFu; + + assert(i==0x12_23_45_56u); + assert(s==0xFFFFu); + + asm{ + mov EAX, 0; + mov AX, s; + add AX, 1; + mov i, EAX; + } + + assert(i==0u); + assert(s==0xFFFFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_add_01_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_add_01_C; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_23_45_56u; + uint s = 0xFF_FF_FF_FFu; + + assert(i==0x12_23_45_56u); + assert(s==0xFF_FF_FF_FFu); + + asm{ + mov EAX, s; + add EAX, 1; + mov i, EAX; + } + + assert(i==0u); + assert(s==0xFF_FF_FF_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ah_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ah_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov AH, a; + mov b, AH; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ah_02_P.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ah_02_P; + +enum E : byte{ + A = 0x12, + B = 0x23 +} + +int main(){ + version(D_InlineAsm){ + byte b; + assert(b==0); + + asm{ + mov AH, E.A; + mov b, AH; + } + + assert(b==E.A); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_al_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_al_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov AL, a; + mov b, AL; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ax_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ax_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b = 0x34; + short s; + + assert(a==0x12); + assert(b==0x34); + assert(s==0x00_00); + + asm{ + mov AH, a; + mov AL, b; + mov s, AX; + } + + assert(a==0x12); + assert(b==0x34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ax_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ax_02; + +int main(){ + version(D_InlineAsm){ + byte a = 0; + byte b = 0; + short s=0x12_34; + + assert(a==0); + assert(b==0); + assert(s==0x12_34); + + asm{ + mov AX, s; + mov a, AH; + mov b, AL; + } + + assert(s==0x12_34); + assert(a==0x12); + assert(b==0x34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_bh_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_bh_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov BH, a; + mov b, BH; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_bl_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_bl_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov BL, a; + mov b, BL; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_bx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_bx_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b = 0x34; + short s; + + assert(a==0x12); + assert(b==0x34); + assert(s==0x00_00); + + asm{ + mov BH, a; + mov BL, b; + mov s, BX; + } + + assert(a==0x12); + assert(b==0x34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_bx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_bx_02; + +int main(){ + version(D_InlineAsm){ + byte a = 0; + byte b = 0; + short s=0x12_34; + + assert(a==0); + assert(b==0); + assert(s==0x12_34); + + asm{ + mov BX, s; + mov a, BH; + mov b, BL; + } + + assert(s==0x12_34); + assert(a==0x12); + assert(b==0x34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_cbw_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_cbw_01; + +int main(){ + version(D_InlineAsm){ + uint i=0x12_3F_FF_FFu; + byte b=-128; + + assert(i==0x12_3F_FF_FFu); + + asm{ + mov EAX, i; + mov AL, b; + cbw; + mov i, EAX; + } + + assert(i== 0x12_3F_FF_80u); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ch_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ch_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov CH, a; + mov b, CH; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_cl_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_cl_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov CL, a; + mov b, CL; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_cwd_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_cwd_01; + +int main(){ + version(D_InlineAsm){ + uint i=0x12_3F_FF_FFu; + uint ii; + short s=-128; + + asm{ + mov EAX, i; + mov EDX, i; + mov AX, s; + cwd; + mov i, EAX; + mov ii, EDX; + } + + assert(i==0x12_3F_FF_80u); + assert(ii==0x12_3F_FF_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_cx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_cx_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b = 0x34; + short s; + + assert(a==0x12); + assert(b==0x34); + assert(s==0x00_00); + + asm{ + mov CH, a; + mov CL, b; + mov s, CX; + } + + assert(a==0x12); + assert(b==0x34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_cx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_cx_02; + +int main(){ + version(D_InlineAsm){ + byte a = 0; + byte b = 0; + short s=0x12_34; + + assert(a==0); + assert(b==0); + assert(s==0x12_34); + + asm{ + mov CX, s; + mov a, CH; + mov b, CL; + } + + assert(s==0x12_34); + assert(a==0x12); + assert(b==0x34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dec_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dec_01_A; + +int main(){ + version(D_InlineAsm){ + uint i = 0x00_00_00_00u; + + assert(i==0x00_00_00_00u); + + asm{ + mov EAX, i; + dec AL; + mov i, EAX; + } + + assert(i==0x00_00_00_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dec_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dec_01_B; + +int main(){ + version(D_InlineAsm){ + uint i = 0x00_00_00_00u; + + assert(i==0x00_00_00_00u); + + asm{ + mov EAX, i; + dec AX; + mov i, EAX; + } + + assert(i==0x00_00_FF_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dec_01_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dec_01_C; + +int main(){ + version(D_InlineAsm){ + uint i = 0x00_00_00_00u; + + assert(i==0x00_00_00_00u); + + asm{ + mov EAX, i; + dec EAX; + mov i, EAX; + } + + assert(i==0xFF_FF_FF_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dh_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dh_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov DH, a; + mov b, DH; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_di_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_di_01; + +int main(){ + version(D_InlineAsm){ + short a=0x12_34; + short b; + + assert(a==0x12_34); + assert(b==0); + + asm{ + mov DI, a; + mov b, DI; + } + + assert(a==0x12_34); + assert(b==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dl_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dl_01; + +int main(){ + version(D_InlineAsm){ + byte a=0x12; + byte b; + + assert(a==0x12); + assert(b==0); + + asm{ + mov DL, a; + mov b, DL; + } + + assert(a==0x12); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dx_01; + +int main(){ + version(D_InlineAsm){ + byte a = 0x12; + byte b = 0x34; + short s; + + assert(a==0x12); + assert(b==0x34); + assert(s==0x00_00); + + asm{ + mov DH, a; + mov DL, b; + mov s, DX; + } + + assert(a==0x12); + assert(b==0x34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_dx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_dx_02; + +int main(){ + version(D_InlineAsm){ + byte a = 0; + byte b = 0; + short s=0x12_34; + + assert(a==0); + assert(b==0); + assert(s==0x12_34); + + asm{ + mov DX, s; + mov a, DH; + mov b, DL; + } + + assert(s==0x12_34); + assert(a==0x12); + assert(b==0x34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_eax_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_eax_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov EAX, i; + mov AX, s; + mov i, EAX; + } + + assert(i==0x00_00_12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_eax_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_eax_02; + +int main(){ + version(D_InlineAsm){ + int i=0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov EAX, i; + mov s, AX; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ebx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ebx_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov EBX, i; + mov BX, s; + mov i, EBX; + } + + assert(i==0x00_00_12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ebx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ebx_02; + +int main(){ + version(D_InlineAsm){ + int i=0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov EBX, i; + mov s, BX; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ecx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ecx_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov ECX, i; + mov CX, s; + mov i, ECX; + } + + assert(i==0x00_00_12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_ecx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_ecx_02; + +int main(){ + version(D_InlineAsm){ + int i=0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov ECX, i; + mov s, CX; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_edi_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_edi_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov EDI, 0; + mov DI, s; + mov i, EDI; + } + + assert(i==0x12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_edi_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_edi_01; + +int main(){ + version(D_InlineAsm){ + int i = 0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov EDI, i; + mov s, DI; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_edx_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_edx_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov EDX, i; + mov DX, s; + mov i, EDX; + } + + assert(i==0x00_00_12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_edx_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_edx_02; + +int main(){ + version(D_InlineAsm){ + int i=0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov EDX, i; + mov s, DX; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_esi_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_esi_01; + +int main(){ + version(D_InlineAsm){ + int i; + short s=0x12_34; + + assert(i==0); + assert(s==0x12_34); + + asm{ + mov ESI, 0; + mov SI, s; + mov i, SDI; + } + + assert(i==0x12_34); + assert(s==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_esi_02.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_esi_01; + +int main(){ + version(D_InlineAsm){ + int i = 0x12_34_56_78; + short s=0; + + assert(i==0x12_34_56_78); + assert(s==0); + + asm{ + mov ESI, i; + mov s, SI; + } + + assert(i==0x12_34_56_78); + assert(s==0x56_78); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- a/run/a/asm_imul_01.d Wed Aug 17 21:28:25 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - // $HeadURL$ - // $Date$ - // $Author$ - -module dstress.run.a.asm_imul_01; - -int test(int i){ - asm{ - naked; - imul EAX, EAX; - ret; - } -} - -int main(){ - assert(test(0) == 0); - assert(test(1) == 1); - assert(test(3) == 9); - assert(test(-5) == 25); - return 0; -} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_imul_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_imul_01_A; + +int main(){ + version(D_InlineAsm){ + byte a = -2; + byte b = 3; + + asm{ + mov AL, a; + imul b; + mov b, AL; + } + + assert(b==-6); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_imul_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_imul_01_B; + +int main(){ + version(D_InlineAsm){ + short a = -2; + short b = 3; + + asm{ + mov AX, a; + imul b; + mov b, AX; + } + + assert(b==-6); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_imul_01_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_imul_01_C; + +int main(){ + version(D_InlineAsm){ + int a = -2; + int b = 3; + + asm{ + mov EAX, a; + imul b; + mov b, EAX; + } + + assert(b==-6); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_imul_02_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_imul_02_A; + +int main(){ + version(D_InlineAsm){ + int a = -2; + int b = 3; + + asm{ + mov EAX, a; + imul EAX, b; + mov b, EAX; + } + + assert(b==-6); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_imul_02_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_imul_02_B; + +int main(){ + version(D_InlineAsm){ + short a = -2; + short b = 3; + + asm{ + mov AX, a; + imul AX, b; + mov b, AX; + } + + assert(b==-6); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_inc_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_inc_01_A; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_34_5F_FFu; + + assert(i==0x12_34_5F_FFu); + + asm{ + mov EAX, i; + inc AL; + mov i, EAX; + } + + assert(i==0x12_34_5F_00u); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_inc_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_inc_01_B; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_3F_FF_FFu; + + assert(i==0x12_3F_FF_FFu); + + asm{ + mov EAX, i; + inc AX; + mov i, EAX; + } + + assert(i==0x12_3F_00_00u); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_inc_01_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_inc_01_C; + +int main(){ + version(D_InlineAsm){ + uint i = 0xFF_FF_FF_FFu; + + assert(i==0xFF_FF_FF_FFu); + + asm{ + mov EAX, i; + inc EAX; + mov i, EAX; + } + + assert(i==0x00_00_00_00u); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_movsx_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,40 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_movsx_01_A; + +int main(){ + version(D_InlineAsm){ + int i=0xFF_FF_FF_FFu; + byte b=byte.min; + + assert(i==0xFF_FF_FF_FFu); + + asm{ + mov EAX, i; + mov AL, b; + movsx EAX, AL; + mov i, EAX; + } + + assert(i==byte.min); + + i=0xFF_FF_FF_FFu; + b=byte.max; + + asm{ + mov EAX, i; + mov AL, b; + movsx EAX, AL; + mov i, EAX; + } + + assert(i==byte.max); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_movzx_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,43 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_movzx_01_A; + +int main(){ + version(D_InlineAsm){ + uint i = 0xFF_FF_FF_FFu; + ubyte b = 0xFF; + + assert(i==0xFF_FF_FF_FFu); + assert(b==0xFF); + + asm{ + mov EAX, i; + mov AL, b; + movzx AX, AL; + mov i, EAX; + } + + assert(i==0xFF_FF_00_FFu); + assert(b==0xFF); + + i=0xFF_FF_FF_FFu; + b=0x12; + + asm{ + mov EAX, i; + mov AL, b; + movzx AX, AL; + mov i, EAX; + } + + assert(i==0xFF_FF_00_12u); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_movzx_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,43 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_movzx_01_B; + +int main(){ + version(D_InlineAsm){ + uint i = 0xFF_FF_FF_FFu; + ubyte b = 0xFF; + + assert(i==0xFF_FF_FF_FFu); + assert(b==0xFF); + + asm{ + mov EAX, i; + mov AL, b; + movzx EAX, AL; + mov i, EAX; + } + + assert(i==0x00_00_00_FFu); + assert(b==0xFF); + + i = 0xFF_FF_FF_FFu; + b=0x12; + + asm{ + mov EAX, i; + mov AL, b; + movzx EAX, AL; + mov i, EAX; + } + + assert(i==0x00_00_00_12u); + assert(b==0x12); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_si_01.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_si_01; + +int main(){ + version(D_InlineAsm){ + short a=0x12_34; + short b; + + assert(a==0x12_34); + assert(b==0); + + asm{ + mov SI, a; + mov b, SI; + } + + assert(a==0x12_34); + assert(b==0x12_34); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_sub_01_A.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_sub_01_A; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_34_5F_00u; + + assert(i==0x12_34_5F_00u); + + asm{ + mov EAX, i; + sub AL, 1; + mov i, EAX; + } + + assert(i==0x12_34_5F_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_sub_01_B.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_sub_01_B; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_3F_00_00u; + + assert(i==0x12_3F_00_00u); + + asm{ + mov EAX, i; + sub AX, 1; + mov i, EAX; + } + + assert(i==0x12_3F_FF_FFu); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/a/asm_sub_01_C.d Sat Aug 20 18:24:41 2005 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.a.asm_sub_01_C; + +int main(){ + version(D_InlineAsm){ + uint i = 0x12_23_45_56u; + uint s = 0x0u; + + assert(i==0x12_23_45_56u); + assert(s==0x0u); + + asm{ + mov EAX, s; + sub EAX, 1; + mov i, EAX; + } + + assert(i==0xFF_FF_FF_FFu); + assert(s==0x0u); + + return 0; + }else{ + pragma(msg, "no Inline asm support"); + static assert(0); + } +} \ No newline at end of file