Remove hardcoded values

This commit is contained in:
Folkert Kevelam 2025-06-28 21:56:48 +02:00
parent 940106f96d
commit c7a7879813

View File

@ -1,10 +1,12 @@
package System.Storage_Elements package System.Storage_Elements
with Pure is with Pure is
type Storage_Offset is range -2**31 .. 2**31 - 1; type Storage_Offset is range
-2 ** (Word_Size - 1) ..
2 ** (Word_Size - 1) - 1;
subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last; subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last;
type Storage_Element is mod 2**8; type Storage_Element is mod 2 ** Storage_Unit;
for Storage_Element'Size use Storage_Unit; for Storage_Element'Size use Storage_Unit;
type Storage_Array is array type Storage_Array is array
@ -20,7 +22,7 @@ package System.Storage_Elements
function "-" (Left : Storage_Offset; Right : Address) return Address function "-" (Left : Storage_Offset; Right : Address) return Address
with Import, Convention => Intrinsic; with Import, Convention => Intrinsic;
type Integer_Address is mod 2**32; type Integer_Address is mod Memory_Size;
function To_Address (Value : Integer_Address) return Address function To_Address (Value : Integer_Address) return Address
with Import, Convention => Intrinsic; with Import, Convention => Intrinsic;
function To_Integer (Value : Address) return Integer_Address function To_Integer (Value : Address) return Integer_Address