Selaa lähdekoodia

Merged revisions 7927-7929,7953,7961,7967,7971,7986-7987,7990-7994,7998-8000,8004-8006,8008-8012,8016,8027,8034,8036-8037,8039,8044,8046,8048,8051,8060,8071,8075-8076,8082-8083,8087-8089,8095-8096,8099-8100,8136,8187,8190,8203,8206-8207,8212-8213,8215,8225,8227,8233-8239,8262,8302,8307,8309,8316,8318-8319,8336,8338-8340,8404,8410-8411,8430,8438-8442,8445-8446,8448,8450-8454,8456-8457,8459,8462,8469-8470,8472-8483,8486-8488,8490,8493,8496,8506,8535-8537,8539-8546,8554,8560,8575-8576,8581-8587,8590,8593-8594,8596,8600,8605,8607,8625,8630-8638,8640-8641,8659,8665,8667,8681-8682,8686-8687,8702,8705,8710-8714,8719,8721-8723,8727,8730-8731,8743,8747-8751,8766-8769,8797,8822,8831,8848-8849,8851,8879,8885-8889,8891-8893,8895,8897,8912,8917,8942,8950,8998,9000-9006,9021,9025,9033,9035-9036,9038 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r9036 | yury | 2007-11-01 14:28:08 +0100 (Thu, 01 Nov 2007) | 1 line

* Fixed unreachable code warnings and removed not used variable.
........
r9038 | yury | 2007-11-01 14:42:01 +0100 (Thu, 01 Nov 2007) | 1 line

* Fixed CompareDWord after r8827 (compiler warnings should not be ignored :).
........

git-svn-id: branches/fixes_2_2@9079 -

florian 18 vuotta sitten
vanhempi
commit
30741a0d11
1 muutettua tiedostoa jossa 9 lisäystä ja 8 poistoa
  1. 9 8
      rtl/inc/generic.inc

+ 9 - 8
rtl/inc/generic.inc

@@ -168,8 +168,9 @@ begin
   if Count>4*sizeof(ptruint)-1 then
     begin
       v:=(value shl 16) or value;
-      if sizeof(ptruint)=8 then
-        v:=(v shl 32) or v;
+{$ifdef CPU64}
+      v:=(v shl 32) or v;
+{$endif CPU64}
       { Align on native pointer size }
       aligncount:=(PtrUInt(pdest) and (sizeof(PtrUInt)-1)) shr 1;
       dec(count,aligncount);
@@ -211,8 +212,9 @@ begin
   if Count>4*sizeof(ptruint)-1 then
     begin
       v:=value;
-      if sizeof(ptruint)=8 then
-        v:=(v shl 32) or v;
+{$ifdef CPU64}
+      v:=(v shl 32) or v;
+{$endif CPU64}
       { Align on native pointer size }
       aligncount:=(PtrUInt(pdest) and (sizeof(PtrUInt)-1)) shr 2;
       dec(count,aligncount);
@@ -489,7 +491,7 @@ function CompareDWord(Const buf1,buf2;len:SizeInt):SizeInt;
 var
   aligncount : sizeint;
   psrc,pdest,pend : pdword;
-  b : ptruint;
+  b : ptrint;
 begin
   b:=0;
   psrc:=@buf1;
@@ -541,7 +543,7 @@ begin
   if ((PtrUInt(pdest) and 3) or (PtrUInt(psrc) and 3))<>0 then
     while psrc<pend do
       begin
-        b:=(ptruint(unaligned(psrc^))-ptruint(unaligned(pdest^)));
+        b:=(ptrint(unaligned(psrc^))-ptrint(unaligned(pdest^)));
         if b<>0 then
           begin
             if b<0 then
@@ -556,7 +558,7 @@ begin
 {$endif FPC_REQUIRES_PROPER_ALIGNMENT}
     while psrc<pend do
       begin
-        b:=(ptruint(psrc^)-ptruint(pdest^));
+        b:=(ptrint(psrc^)-ptrint(pdest^));
         if b<>0 then
           begin
             if b<0 then
@@ -617,7 +619,6 @@ end;
 {$ifndef FPC_SYSTEM_HAS_COMPARECHAR0}
 function CompareChar0(Const buf1,buf2;len:SizeInt):SizeInt;
 var
-  aligncount : sizeint;
   psrc,pdest,pend : pbyte;
   b : ptrint;
 begin