Browse Source

* fixes support for cpus with cpunodefaultint for unary minus nodes

git-svn-id: trunk@22838 -
florian 12 years ago
parent
commit
5e1e42ec2b
2 changed files with 6 additions and 0 deletions
  1. 4 0
      compiler/ncgmat.pas
  2. 2 0
      compiler/nmat.pas

+ 4 - 0
compiler/ncgmat.pas

@@ -238,11 +238,15 @@ implementation
         secondpass(left);
         { load left operator in a register }
         location_copy(location,left.location);
+{$ifdef cpunodefaultint}
+        opsize:=left.resultdef;
+{$else cpunodefaultint}
         { in case of a 32 bit system that can natively execute 64 bit operations }
         if (left.resultdef.size<=sinttype.size) then
           opsize:=sinttype
         else
           opsize:=s64inttype;
+{$endif cpunodefaultint}
         hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,opsize,false);
         hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,opsize,location.register,location.register);
 

+ 2 - 0
compiler/nmat.pas

@@ -766,7 +766,9 @@ implementation
 {$endif not cpu64bitaddr}
          else if (left.resultdef.typ=orddef) then
            begin
+{$ifndef cpunodefaultint}
              inserttypeconv(left,sinttype);
+{$endif cpunodefaultint}
              resultdef:=left.resultdef
            end
          else