Browse Source

Fix oversized type size constant

Pierre Muller 3 years ago
parent
commit
a730bf2b00
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/llvm/dbgllvm.pas

+ 2 - 2
compiler/llvm/dbgllvm.pas

@@ -1018,7 +1018,7 @@ implementation
             { LLVM internally "only" supports sizes up to 1 shl 61, because they
             { LLVM internally "only" supports sizes up to 1 shl 61, because they
               store all sizes in bits in a qword; the rationale is that there
               store all sizes in bits in a qword; the rationale is that there
               is no hardware supporting a full 64 bit address space either }
               is no hardware supporting a full 64 bit address space either }
-            dinode.addqword('size',qword(1) shl 61)
+            dinode.addqword('size',((qword(1) shl 61) - 1)*8)
           else
           else
 {$endif def cpu64bitalu}
 {$endif def cpu64bitalu}
             dinode.addqword('size',def.size*8)
             dinode.addqword('size',def.size*8)
@@ -1068,7 +1068,7 @@ implementation
           { LLVM internally "only" supports sizes up to 1 shl 61, because they
           { LLVM internally "only" supports sizes up to 1 shl 61, because they
             store all sizes in bits in a qword; the rationale is that there
             store all sizes in bits in a qword; the rationale is that there
             is no hardware supporting a full 64 bit address space either }
             is no hardware supporting a full 64 bit address space either }
-          cappedsize:=qword(1) shl 61
+          cappedsize:=((qword(1) shl 61) - 1)*8
 {$endif def cpu64bitalu}
 {$endif def cpu64bitalu}
         else
         else
           cappedsize:=tabstractrecordsymtable(def.symtable).datasize*8;
           cappedsize:=tabstractrecordsymtable(def.symtable).datasize*8;