浏览代码

* increase the temp requirements for saving MM registers with the full
size of an OS_VECTOR so that we can do the alignment based on the offset
after the allocation is done. Using the size is not possible because the
temp alignment can be smaller than the OS_VECTOR requirement

git-svn-id: trunk@9428 -

peter 17 年之前
父节点
当前提交
b5e417bd19
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      compiler/cgobj.pas

+ 4 - 2
compiler/cgobj.pas

@@ -3604,8 +3604,10 @@ implementation
         { mm registers }
         { mm registers }
         if uses_registers(R_MMREGISTER) then
         if uses_registers(R_MMREGISTER) then
           begin
           begin
-            if (size mod tcgsize2size[OS_VECTOR])<>0 then
-              inc(size,tcgsize2size[OS_VECTOR]-(size mod tcgsize2size[OS_VECTOR]));
+            { Make sure we reserve enough space to do the alignment based on the offset
+              later on. We can't use the size for this, because the alignment of the start
+              of the temp is smaller than needed for an OS_VECTOR }
+            inc(size,tcgsize2size[OS_VECTOR]);
 
 
             for r:=low(saved_mm_registers) to high(saved_mm_registers) do
             for r:=low(saved_mm_registers) to high(saved_mm_registers) do
               if saved_mm_registers[r] in rg[R_MMREGISTER].used_in_proc then
               if saved_mm_registers[r] in rg[R_MMREGISTER].used_in_proc then