From be3749301fd3efdd5d5d57e4092b5572e3ac2472 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 29 Dec 2013 12:21:25 +0000 Subject: [PATCH] * fix possible issues due to new behaviour of constant shifting git-svn-id: trunk@26310 - --- rtl/inc/generic.inc | 4 ++-- rtl/inc/int64.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtl/inc/generic.inc b/rtl/inc/generic.inc index d8af3fac1f..dca0c72c0b 100644 --- a/rtl/inc/generic.inc +++ b/rtl/inc/generic.inc @@ -1345,7 +1345,7 @@ end; HandleErrorAddrFrameInd(215,get_pc_addr,get_frame); end; { when bootstrapping, we forget about overflow checking for qword :) } - f1overflowed:=f1overflowed or ((f1 and (1 shl 31))<>0); + f1overflowed:=f1overflowed or ((f1 and (dword(1) shl 31))<>0); f1:=f1 shl 1; bitpos:=bitpos shl 1; end; @@ -1383,7 +1383,7 @@ function fpc_div_dword(n,z : dword) : dword; [public,alias: 'FPC_DIV_DWORD']; co if z>=n then begin z:=z-n; - result:=result+dword(1 shl shift); + result:=result+dword(dword(1) shl shift); end; n:=n shr 1; end; diff --git a/rtl/inc/int64.inc b/rtl/inc/int64.inc index 17c56cf3ea..1d749113b5 100644 --- a/rtl/inc/int64.inc +++ b/rtl/inc/int64.inc @@ -284,7 +284,7 @@ HandleErrorAddrFrameInd(215,get_pc_addr,get_frame); end; { when bootstrapping, we forget about overflow checking for qword :) } - f1overflowed:=f1overflowed or ((f1 and (1 shl 63))<>0); + f1overflowed:=f1overflowed or ((f1 and (qword(1) shl 63))<>0); f1:=f1 shl 1; bitpos:=bitpos shl 1; end;