Assembler ebx,ecx registers do not work?
Posted: Mon May 18, 2015 10:31 am
Following code (while loop) works fine when eax is used, but crashes if any other register is used (in this example ebx). It also crashes if one of mentioned registers is in any way involved in counting loop index.
is this a bug? or am I doing something wrong?
even following code crashes:
it seems to me that "mov" instructions are buggy...
Code: Select all
streamout out;
float F1=1;
push ebx;
mov ebx,32;
loopjmp:
sub ebx,32;
jl finish;
//this code doesn't matter (it only counts loop length)
movaps xmm0,out;
addps xmm0,F1;
movaps out,xmm0;
jmp loopjmp;
finish:
pop ebx;is this a bug? or am I doing something wrong?
even following code crashes:
Code: Select all
streamout out;
float F1=1;
push ebx;
mov eax,32;
mov ebx,eax;
loopjmp:
mov eax,ebx;
sub eax,32;
jl finish;
mov ebx,eax;
//this code doesn't matter (it only counts loop length)
movaps xmm0,out;
addps xmm0,F1;
movaps out,xmm0;
jmp loopjmp;
finish:
pop ebx;
it seems to me that "mov" instructions are buggy...