瀏覽代碼

* check alignment properly in CompareDWord for 64 bit targets

git-svn-id: trunk@36656 -
florian 8 年之前
父節點
當前提交
16c9a2260d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      rtl/inc/generic.inc

+ 1 - 0
rtl/inc/generic.inc

@@ -603,6 +603,7 @@ begin
   pdest:=@buf2;
   pdest:=@buf2;
   if (len>4*sizeof(ptruint)-11)
   if (len>4*sizeof(ptruint)-11)
 {$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
 {$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
+    and ((PtrUInt(pdest) and (sizeof(PtrUInt)-1))=(PtrUInt(psrc) and (sizeof(PtrUInt)-1)))
     and (((PtrUInt(pdest) and 3) or (PtrUInt(psrc) and 3))=0)
     and (((PtrUInt(pdest) and 3) or (PtrUInt(psrc) and 3))=0)
 {$endif FPC_REQUIRES_PROPER_ALIGNMENT}
 {$endif FPC_REQUIRES_PROPER_ALIGNMENT}
     then
     then