|
@@ -47,7 +47,6 @@ interface
|
|
|
procedure second_cmpordinal;override;
|
|
|
procedure second_cmpsmallset;override;
|
|
|
procedure second_cmp64bit;override;
|
|
|
- procedure second_cmpboolean;override;
|
|
|
public
|
|
|
function pass_1:tnode;override;
|
|
|
end;
|
|
@@ -594,88 +593,6 @@ implementation
|
|
|
right.location.register,left.location.register));
|
|
|
end;
|
|
|
|
|
|
-{*****************************************************************************
|
|
|
- Boolean
|
|
|
-*****************************************************************************}
|
|
|
-
|
|
|
- procedure t68kaddnode.second_cmpboolean;
|
|
|
- var
|
|
|
- cgop : TOpCg;
|
|
|
- cgsize : TCgSize;
|
|
|
- isjump : boolean;
|
|
|
- otl,ofl : tasmlabel;
|
|
|
- begin
|
|
|
-// writeln('second_cmpboolean');
|
|
|
- { ToDo : add support for pasbool64 and bool64bit }
|
|
|
- if (torddef(left.resultdef).ordtype in [pasbool8,bool8bit]) or
|
|
|
- (torddef(right.resultdef).ordtype in [pasbool8,bool8bit]) then
|
|
|
- cgsize:=OS_8
|
|
|
- else
|
|
|
- if (torddef(left.resultdef).ordtype in [pasbool16,bool16bit]) or
|
|
|
- (torddef(right.resultdef).ordtype in [pasbool16,bool16bit]) then
|
|
|
- cgsize:=OS_16
|
|
|
- else
|
|
|
- cgsize:=OS_32;
|
|
|
-
|
|
|
- if (cs_full_boolean_eval in current_settings.localswitches) or
|
|
|
- (nodetype in [unequaln,ltn,lten,gtn,gten,equaln,xorn]) then
|
|
|
- begin
|
|
|
- if left.nodetype in [ordconstn,realconstn] then
|
|
|
- swapleftright;
|
|
|
-
|
|
|
- isjump:=(left.expectloc=LOC_JUMP);
|
|
|
- if isjump then
|
|
|
- begin
|
|
|
- otl:=current_procinfo.CurrTrueLabel;
|
|
|
- current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
|
|
|
- ofl:=current_procinfo.CurrFalseLabel;
|
|
|
- current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
|
|
|
- end;
|
|
|
- secondpass(left);
|
|
|
- if left.location.loc in [LOC_FLAGS,LOC_JUMP] then begin
|
|
|
- hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,cgsize_orddef(cgsize),false);
|
|
|
- end;
|
|
|
- if isjump then
|
|
|
- begin
|
|
|
- current_procinfo.CurrTrueLabel:=otl;
|
|
|
- current_procinfo.CurrFalseLabel:=ofl;
|
|
|
- end;
|
|
|
-
|
|
|
- isjump:=(right.expectloc=LOC_JUMP);
|
|
|
- if isjump then
|
|
|
- begin
|
|
|
- otl:=current_procinfo.CurrTrueLabel;
|
|
|
- current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
|
|
|
- ofl:=current_procinfo.CurrFalseLabel;
|
|
|
- current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
|
|
|
- end;
|
|
|
- secondpass(right);
|
|
|
- if right.location.loc in [LOC_FLAGS,LOC_JUMP] then
|
|
|
- hlcg.location_force_reg(current_asmdata.CurrAsmList,right.location,right.resultdef,cgsize_orddef(cgsize),false);
|
|
|
- if isjump then
|
|
|
- begin
|
|
|
- current_procinfo.CurrTrueLabel:=otl;
|
|
|
- current_procinfo.CurrFalseLabel:=ofl;
|
|
|
- end;
|
|
|
-
|
|
|
- location_reset(location,LOC_FLAGS,OS_NO);
|
|
|
-
|
|
|
- force_reg_left_right(true,false);
|
|
|
-
|
|
|
- if (left.location.loc = LOC_CONSTANT) then
|
|
|
- swapleftright;
|
|
|
-
|
|
|
- if (right.location.loc <> LOC_CONSTANT) then
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,S_L,
|
|
|
- left.location.register,right.location.register))
|
|
|
- else
|
|
|
- current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_L,
|
|
|
- longint(right.location.value),left.location.register));
|
|
|
- location.resflags := getresflags(true);
|
|
|
- end;
|
|
|
-
|
|
|
- //release_reg_left_right;
|
|
|
- end;
|
|
|
|
|
|
function t68kaddnode.pass_1:tnode;
|
|
|
var
|