+ use the or instruction to compare 32 bit values with 0

git-svn-id: trunk@31862 -
This commit is contained in:
florian 2015-09-27 20:50:59 +00:00
parent 298cde6489
commit 79619df936

View File

@ -886,10 +886,18 @@ interface
end;
LOC_CONSTANT :
begin
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value shr 16) and $FFFF),GetNextReg(left.location.register)));
firstjmp32bitcmp;
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint(right.location.value and $FFFF),left.location.register));
secondjmp32bitcmp;
if (right.location.value=0) and (nodetype in [equaln,unequaln]) and (left.location.loc=LOC_REGISTER) then
begin
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_OR,S_W,GetNextReg(left.location.register),left.location.register));
secondjmp32bitcmp;
end
else
begin
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value shr 16) and $FFFF),GetNextReg(left.location.register)));
firstjmp32bitcmp;
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint(right.location.value and $FFFF),left.location.register));
secondjmp32bitcmp;
end;
end;
else
internalerror(200203282);