mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 12:26:58 +02:00
* SPARC, tsparcaddnode.second_cmp64bit: don't copy LOC_CREGISTER locations, and handle comparison with constants without loading them into register (if possible).
git-svn-id: trunk@26309 -
This commit is contained in:
parent
739166f3e7
commit
34cde7a07a
@ -359,17 +359,27 @@ interface
|
||||
|
||||
begin
|
||||
pass_left_right;
|
||||
force_reg_left_right(false,false);
|
||||
force_reg_left_right(true,true);
|
||||
|
||||
unsigned:=not(is_signed(left.resultdef)) or
|
||||
not(is_signed(right.resultdef));
|
||||
|
||||
location_reset(location,LOC_JUMP,OS_NO);
|
||||
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reghi,right.location.register64.reghi));
|
||||
firstjmp64bitcmp;
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reglo,right.location.register64.reglo));
|
||||
secondjmp64bitcmp;
|
||||
if (right.location.loc<>LOC_CONSTANT) then
|
||||
begin
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reghi,right.location.register64.reghi));
|
||||
firstjmp64bitcmp;
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register64.reglo,right.location.register64.reglo));
|
||||
secondjmp64bitcmp;
|
||||
end
|
||||
else
|
||||
begin
|
||||
tcgsparc(cg).handle_reg_const_reg(current_asmdata.CurrAsmList,A_SUBcc,left.location.register64.reghi,hi(right.location.value64),NR_G0);
|
||||
firstjmp64bitcmp;
|
||||
tcgsparc(cg).handle_reg_const_reg(current_asmdata.CurrAsmList,A_SUBcc,left.location.register64.reglo,lo(right.location.value64),NR_G0);
|
||||
secondjmp64bitcmp;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user