mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 12:29:19 +02:00
* use generic second_addboolean for short circuit and/or (since that code
is the same as what was in nppcadd) git-svn-id: trunk@4600 -
This commit is contained in:
parent
c8de2d35ee
commit
c261068ab5
@ -357,41 +357,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
inherited second_addboolean;
|
||||||
// just to make sure we free the right registers
|
|
||||||
cmpop := true;
|
|
||||||
case nodetype of
|
|
||||||
andn,
|
|
||||||
orn :
|
|
||||||
begin
|
|
||||||
location_reset(location,LOC_JUMP,OS_NO);
|
|
||||||
case nodetype of
|
|
||||||
andn :
|
|
||||||
begin
|
|
||||||
otl:=current_procinfo.CurrTrueLabel;
|
|
||||||
current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
|
|
||||||
secondpass(left);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
|
|
||||||
cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
|
|
||||||
current_procinfo.CurrTrueLabel:=otl;
|
|
||||||
end;
|
|
||||||
orn :
|
|
||||||
begin
|
|
||||||
ofl:=current_procinfo.CurrFalseLabel;
|
|
||||||
current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
|
|
||||||
secondpass(left);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
|
|
||||||
cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
|
|
||||||
current_procinfo.CurrFalseLabel:=ofl;
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
internalerror(200403181);
|
|
||||||
end;
|
|
||||||
secondpass(right);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList,right,lr_load_regvars);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,41 +359,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
inherited second_addboolean;
|
||||||
{ just to make sure we free the right registers }
|
|
||||||
cmpop := true;
|
|
||||||
case nodetype of
|
|
||||||
andn,
|
|
||||||
orn:
|
|
||||||
begin
|
|
||||||
location_reset(location, LOC_JUMP, OS_NO);
|
|
||||||
case nodetype of
|
|
||||||
andn:
|
|
||||||
begin
|
|
||||||
otl := current_procinfo.CurrTrueLabel;
|
|
||||||
current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
|
|
||||||
secondpass(left);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList, left, lr_load_regvars);
|
|
||||||
cg.a_label(current_asmdata.CurrAsmList, current_procinfo.CurrTrueLabel);
|
|
||||||
current_procinfo.CurrTrueLabel := otl;
|
|
||||||
end;
|
|
||||||
orn:
|
|
||||||
begin
|
|
||||||
ofl := current_procinfo.CurrFalseLabel;
|
|
||||||
current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
|
|
||||||
secondpass(left);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList, left, lr_load_regvars);
|
|
||||||
cg.a_label(current_asmdata.CurrAsmList, current_procinfo.CurrFalseLabel);
|
|
||||||
current_procinfo.CurrFalseLabel := ofl;
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
internalerror(200403181);
|
|
||||||
end;
|
|
||||||
secondpass(right);
|
|
||||||
maketojumpbool(current_asmdata.CurrAsmList, right, lr_load_regvars);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user