mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 11:29:24 +02:00
+ use the or instruction to compare 32 bit values with 0
git-svn-id: trunk@31862 -
This commit is contained in:
parent
298cde6489
commit
79619df936
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user