From c261068ab587207b629708b24440c3f8c9f640e3 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 10 Sep 2006 15:14:03 +0000 Subject: [PATCH] * 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 - --- compiler/powerpc/nppcadd.pas | 36 +--------------------------------- compiler/powerpc64/nppcadd.pas | 36 +--------------------------------- 2 files changed, 2 insertions(+), 70 deletions(-) diff --git a/compiler/powerpc/nppcadd.pas b/compiler/powerpc/nppcadd.pas index 015728735c..295feaed30 100644 --- a/compiler/powerpc/nppcadd.pas +++ b/compiler/powerpc/nppcadd.pas @@ -357,41 +357,7 @@ interface end; end else - begin - // 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; + inherited second_addboolean; end; diff --git a/compiler/powerpc64/nppcadd.pas b/compiler/powerpc64/nppcadd.pas index 27548197c8..7d303e9f23 100644 --- a/compiler/powerpc64/nppcadd.pas +++ b/compiler/powerpc64/nppcadd.pas @@ -359,41 +359,7 @@ begin end; end else - begin - { 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; + inherited second_addboolean; end; {*****************************************************************************