Browse Source

* fixed overflow in case of op_const64_reg_reg_reg(sub,low(int64),...)

git-svn-id: trunk@5821 -
Jonas Maebe 18 years ago
parent
commit
85289e80ce
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/powerpc/cgcpu.pas

+ 2 - 1
compiler/powerpc/cgcpu.pas

@@ -2248,7 +2248,8 @@ const
             end;
             end;
           OP_ADD, OP_SUB:
           OP_ADD, OP_SUB:
             begin
             begin
-              if (value < 0) then
+              if (value < 0) and
+                 (value <> low(value)) then
                 begin
                 begin
                   if op = OP_ADD then
                   if op = OP_ADD then
                     op := OP_SUB
                     op := OP_SUB