Explorar o código

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

git-svn-id: trunk@5821 -
Jonas Maebe %!s(int64=19) %!d(string=hai) anos
pai
achega
85289e80ce
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      compiler/powerpc/cgcpu.pas

+ 2 - 1
compiler/powerpc/cgcpu.pas

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