|
@@ -215,6 +215,7 @@ implementation
|
|
|
|
|
|
procedure tarmtypeconvnode.second_int_to_bool;
|
|
procedure tarmtypeconvnode.second_int_to_bool;
|
|
var
|
|
var
|
|
|
|
+ hreg1,
|
|
hregister : tregister;
|
|
hregister : tregister;
|
|
href : treference;
|
|
href : treference;
|
|
resflags : tresflags;
|
|
resflags : tresflags;
|
|
@@ -311,10 +312,27 @@ implementation
|
|
end;
|
|
end;
|
|
{ load flags to register }
|
|
{ load flags to register }
|
|
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
|
location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
|
|
- location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
|
|
|
- cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,location.register);
|
|
|
|
|
|
+ hreg1:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
|
|
|
+ cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,hreg1);
|
|
if (is_cbool(resultdef)) then
|
|
if (is_cbool(resultdef)) then
|
|
- cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,location.register,location.register);
|
|
|
|
|
|
+ cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,hreg1,hreg1);
|
|
|
|
+
|
|
|
|
+{$ifndef cpu64bitalu}
|
|
|
|
+ if (location.size in [OS_64,OS_S64]) then
|
|
|
|
+ begin
|
|
|
|
+ location.register64.reglo:=hreg1;
|
|
|
|
+ location.register64.reghi:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
|
|
|
|
+ if (is_cbool(resultdef)) then
|
|
|
|
+ { reglo is either 0 or -1 -> reghi has to become the same }
|
|
|
|
+ cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_32,OS_32,location.register64.reglo,location.register64.reghi)
|
|
|
|
+ else
|
|
|
|
+ { unsigned }
|
|
|
|
+ cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_32,0,location.register64.reghi);
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+{$endif cpu64bitalu}
|
|
|
|
+ location.register:=hreg1;
|
|
|
|
+
|
|
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
|
current_procinfo.CurrTrueLabel:=oldTrueLabel;
|
|
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
|
current_procinfo.CurrFalseLabel:=oldFalseLabel;
|
|
end;
|
|
end;
|