|
@@ -40,7 +40,9 @@ interface
|
|
procedure pass_generate_code;override;
|
|
procedure pass_generate_code;override;
|
|
end;
|
|
end;
|
|
|
|
|
|
- twasmnotnode = class(tcghlnotnode)
|
|
|
|
|
|
+ twasmnotnode = class(tcgnotnode)
|
|
|
|
+ protected
|
|
|
|
+ procedure second_boolean;override;
|
|
end;
|
|
end;
|
|
|
|
|
|
twasmunaryminusnode = class(tcgunaryminusnode)
|
|
twasmunaryminusnode = class(tcgunaryminusnode)
|
|
@@ -185,6 +187,21 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+{*****************************************************************************
|
|
|
|
+ twasmnotnode
|
|
|
|
+*****************************************************************************}
|
|
|
|
+
|
|
|
|
+ procedure twasmnotnode.second_boolean;
|
|
|
|
+ begin
|
|
|
|
+ secondpass(left);
|
|
|
|
+ if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
|
|
|
+ hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false);
|
|
|
|
+ location_reset(location,LOC_REGISTER,left.location.size);
|
|
|
|
+ location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
|
|
|
+ { perform the NOT operation }
|
|
|
|
+ hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,left.resultdef,left.location.register,location.register);
|
|
|
|
+ end;
|
|
|
|
+
|
|
{*****************************************************************************
|
|
{*****************************************************************************
|
|
twasmunaryminustnode
|
|
twasmunaryminustnode
|
|
*****************************************************************************}
|
|
*****************************************************************************}
|