mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:06:40 +02:00
* fixed "set <=/=> set"
git-svn-id: trunk@21095 -
This commit is contained in:
parent
1a724f3e11
commit
54f3db3141
@ -256,17 +256,38 @@ interface
|
|||||||
|
|
||||||
|
|
||||||
procedure tsparcaddnode.second_cmpsmallset;
|
procedure tsparcaddnode.second_cmpsmallset;
|
||||||
|
var
|
||||||
|
tmpreg : tregister;
|
||||||
begin
|
begin
|
||||||
pass_left_right;
|
pass_left_right;
|
||||||
force_reg_left_right(true,true);
|
|
||||||
|
|
||||||
if right.location.loc = LOC_CONSTANT then
|
|
||||||
tcgsparc(cg).handle_reg_const_reg(current_asmdata.CurrAsmList,A_SUBcc,left.location.register,right.location.value,NR_G0)
|
|
||||||
else
|
|
||||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,NR_G0));
|
|
||||||
|
|
||||||
location_reset(location,LOC_FLAGS,OS_NO);
|
location_reset(location,LOC_FLAGS,OS_NO);
|
||||||
location.resflags:=getresflags(true);
|
|
||||||
|
force_reg_left_right(false,false);
|
||||||
|
|
||||||
|
case nodetype of
|
||||||
|
equaln,
|
||||||
|
unequaln:
|
||||||
|
begin
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_SUBcc,left.location.register,right.location.register,NR_G0));
|
||||||
|
location.resflags:=getresflags(true);
|
||||||
|
end;
|
||||||
|
lten,
|
||||||
|
gten:
|
||||||
|
begin
|
||||||
|
if (not(nf_swapped in flags) and
|
||||||
|
(nodetype = lten)) or
|
||||||
|
((nf_swapped in flags) and
|
||||||
|
(nodetype = gten)) then
|
||||||
|
swapleftright;
|
||||||
|
tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_AND,tmpreg,left.location.register,right.location.register));
|
||||||
|
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_SUBcc,tmpreg,right.location.register,NR_G0));
|
||||||
|
location.resflags:=F_E;
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
internalerror(2012042701);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user