Browse Source

* 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 18 năm trước cách đây
mục cha
commit
b5e417bd19
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      compiler/cgobj.pas

+ 4 - 2
compiler/cgobj.pas

@@ -3604,8 +3604,10 @@ implementation
         { mm registers }
         if uses_registers(R_MMREGISTER) then
           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
               if saved_mm_registers[r] in rg[R_MMREGISTER].used_in_proc then