Browse Source

Fix compilation failure for avr compiler with -dDEBUG_NODE_XML, to fix bug report 38222

git-svn-id: trunk@47783 -
pierre 4 years ago
parent
commit
9a0107a19d
1 changed files with 6 additions and 6 deletions
  1. 6 6
      compiler/verbose.pas

+ 6 - 6
compiler/verbose.pas

@@ -1054,12 +1054,12 @@ implementation
             WritePointer := 'nil';
             WritePointer := 'nil';
           1..$FFFF:
           1..$FFFF:
             WritePointer := '$' + hexstr(PtrUInt(P), 4);
             WritePointer := '$' + hexstr(PtrUInt(P), 4);
+    {$if sizeof(Pointer) > 4}
           $10000..$FFFFFFFF:
           $10000..$FFFFFFFF:
             WritePointer := '$' + hexstr(PtrUInt(P), 8);
             WritePointer := '$' + hexstr(PtrUInt(P), 8);
-    {$ifdef CPU64}
+    {$ifend sizeof(Pointer) > 4}
           else
           else
-            WritePointer := '$' + hexstr(PtrUInt(P), 16);
-    {$endif CPU64}
+            WritePointer := '$' + hexstr(PtrUInt(P), 2*sizeof(Pointer));
         end;
         end;
       end;
       end;
 
 
@@ -1071,12 +1071,12 @@ implementation
             WriteConstPUInt := 'nil';
             WriteConstPUInt := 'nil';
           1..$FFFF:
           1..$FFFF:
             WriteConstPUInt := '$' + hexstr(P, 4);
             WriteConstPUInt := '$' + hexstr(P, 4);
+    {$if sizeof(TConstPtrUInt) > 4}
           $10000..$FFFFFFFF:
           $10000..$FFFFFFFF:
             WriteConstPUInt := '$' + hexstr(P, 8);
             WriteConstPUInt := '$' + hexstr(P, 8);
-    {$ifdef CPU64BITADDR}
+    {$ifend sizeof(TConstPtrUInt) >= 4}
           else
           else
-            WriteConstPUInt := '$' + hexstr(P, 16);
-    {$endif CPU64BITADDR}
+            WriteConstPUInt := '$' + hexstr(P, 2*sizeof(TConstPtrUInt));
         end;
         end;
       end;
       end;