* throw an internal error if code generation depends on expectloc but expectloc and real loc do not match

git-svn-id: trunk@22073 -
This commit is contained in:
florian 2012-08-13 15:02:55 +00:00
parent dd18d0bd4d
commit d2aa35e9de
6 changed files with 26 additions and 2 deletions

View File

@ -285,6 +285,10 @@ implementation
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
current_procinfo.CurrFalseLabel:=hl;
secondpass(left);
if left.location.loc<>LOC_JUMP then
internalerror(2012081305);
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
hl:=current_procinfo.CurrTrueLabel;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
@ -307,7 +311,7 @@ implementation
current_asmdata.CurrAsmList.concat(taicpu.op_reg_const(A_CMP,left.location.register,0));
location_reset(location,LOC_FLAGS,OS_NO);
location.resflags:=F_EQ;
end;
end;
else
internalerror(2003042401);
end;

View File

@ -223,6 +223,10 @@ implementation
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
current_procinfo.CurrFalseLabel:=hl;
secondpass(left);
if left.location.loc<>LOC_JUMP then
internalerror(2012081304);
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
hl:=current_procinfo.CurrTrueLabel;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;

View File

@ -114,7 +114,11 @@ interface
begin
current_procinfo.CurrTrueLabel:=otl;
current_procinfo.CurrFalseLabel:=ofl;
end;
end
else
if left.location.loc=LOC_JUMP then
internalerror(2012081302);
{$ifdef x86}
{ are too few registers free? }

View File

@ -653,6 +653,10 @@ end;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
current_procinfo.CurrFalseLabel:=hl;
secondpass(left);
if left.location.loc<>LOC_JUMP then
internalerror(2012081303);
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
hl:=current_procinfo.CurrTrueLabel;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;

View File

@ -293,6 +293,10 @@ implementation
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
current_procinfo.CurrFalseLabel:=hl;
secondpass(left);
if left.location.loc<>LOC_JUMP then
internalerror(2012081306);
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
hl:=current_procinfo.CurrTrueLabel;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;

View File

@ -229,6 +229,10 @@ interface
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;
current_procinfo.CurrFalseLabel:=hl;
secondpass(left);
if left.location.loc<>LOC_JUMP then
internalerror(2012081307);
maketojumpbool(current_asmdata.CurrAsmList,left,lr_load_regvars);
hl:=current_procinfo.CurrTrueLabel;
current_procinfo.CurrTrueLabel:=current_procinfo.CurrFalseLabel;