瀏覽代碼

* threadvars need 4 bytes extra for storing the threadvar index

peter 23 年之前
父節點
當前提交
7489b6629f
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      compiler/symtable.pas

+ 6 - 4
compiler/symtable.pas

@@ -1480,10 +1480,9 @@ implementation
          internalerror(200208252);
          internalerror(200208252);
         storefilepos:=aktfilepos;
         storefilepos:=aktfilepos;
         aktfilepos:=tsym(sym).fileinfo;
         aktfilepos:=tsym(sym).fileinfo;
+        l:=tvarsym(sym).getvaluesize;
         if (vo_is_thread_var in tvarsym(sym).varoptions) then
         if (vo_is_thread_var in tvarsym(sym).varoptions) then
-          l:=pointer_size
-        else
-          l:=tvarsym(sym).getvaluesize;
+          inc(l,pointer_size);
         varalign:=size_2_align(l);
         varalign:=size_2_align(l);
         varalign:=used_align(varalign,aktalignment.varalignmin,aktalignment.varalignmax);
         varalign:=used_align(varalign,aktalignment.varalignmin,aktalignment.varalignmax);
         tvarsym(sym).address:=align(datasize,varalign);
         tvarsym(sym).address:=align(datasize,varalign);
@@ -2321,7 +2320,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.74  2002-10-06 19:41:31  peter
+  Revision 1.75  2002-10-14 19:44:43  peter
+    * threadvars need 4 bytes extra for storing the threadvar index
+
+  Revision 1.74  2002/10/06 19:41:31  peter
     * Add finalization of typed consts
     * Add finalization of typed consts
     * Finalization of globals in the main program
     * Finalization of globals in the main program