Browse Source

m68k/n68kcnv.pas, tm68ktypeconvnode.second_int_to_bool:
* remove comments regarding needed LOC_JUMP implementation
* don't call flags2reg if the location is LOC_JUMP as there isn't a register to set the flags to
(this allows fpc_mul_qword and fpc_mul_int64 to be assembled)

git-svn-id: trunk@22731 -

svenbarth 12 years ago
parent
commit
9402a068a5
1 changed files with 9 additions and 8 deletions
  1. 9 8
      compiler/m68k/n68kcnv.pas

+ 9 - 8
compiler/m68k/n68kcnv.pas

@@ -171,8 +171,6 @@ implementation
 
 
          secondpass(left);
          secondpass(left);
 
 
-{ TODO: needs LOC_JUMP support, because called for bool_to_bool from ncgcnv }
-
          { Explicit typecasts from any ordinal type to a boolean type }
          { Explicit typecasts from any ordinal type to a boolean type }
          { must not change the ordinal value                          }
          { must not change the ordinal value                          }
          if (nf_explicit in flags) and
          if (nf_explicit in flags) and
@@ -186,10 +184,8 @@ implementation
                 hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,true)
                 hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,true)
               else
               else
                 location.size:=newsize;
                 location.size:=newsize;
-{   ACTIVATE when loc_jump support is added }
               current_procinfo.CurrTrueLabel:=oldTrueLabel;
               current_procinfo.CurrTrueLabel:=oldTrueLabel;
               current_procinfo.CurrFalseLabel:=oldFalseLabel;
               current_procinfo.CurrFalseLabel:=oldFalseLabel;
-//}
               exit;
               exit;
            end;
            end;
 
 
@@ -248,10 +244,15 @@ implementation
             else
             else
              internalerror(200512182);
              internalerror(200512182);
          end;
          end;
-         cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,hreg1);
-         if (is_cbool(resultdef)) then
-           cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,hreg1,hreg1);
-         location.register := hreg1;
+         if left.location.loc<>LOC_JUMP then
+           begin
+             cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,hreg1);
+             if (is_cbool(resultdef)) then
+               cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,hreg1,hreg1);
+             location.register := hreg1;
+           end;
+         current_procinfo.CurrTrueLabel:=oldTrueLabel;
+         current_procinfo.CurrFalseLabel:=oldFalseLabel;
       end;
       end;
 
 
 {
 {