pragma Debug (Validate_Node_And_Offset (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
return Field_1_Bit (Shift_Right (S, V) and 1);
end Get_1_Bit_Val;
pragma Debug (Validate_Node_And_Offset (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
return Field_2_Bit (Shift_Right (S, V) and 3);
end Get_2_Bit_Val;
pragma Debug (Validate_Node_And_Offset (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
return Field_4_Bit (Shift_Right (S, V) and 15);
end Get_4_Bit_Val;
pragma Debug (Validate_Node_And_Offset (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
return Field_8_Bit (Shift_Right (S, V) and 255);
end Get_8_Bit_Val;
pragma Debug (Validate_Node_And_Offset_Write (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
S := (S and not Shift_Left (1, V)) or Shift_Left (Slot (Val), V);
end Set_1_Bit_Val;
pragma Debug (Validate_Node_And_Offset_Write (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
S := (S and not Shift_Left (3, V)) or Shift_Left (Slot (Val), V);
end Set_2_Bit_Val;
pragma Debug (Validate_Node_And_Offset_Write (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
S := (S and not Shift_Left (15, V)) or Shift_Left (Slot (Val), V);
end Set_4_Bit_Val;
pragma Debug (Validate_Node_And_Offset_Write (N, Offset / L));
S : Slot renames Slots.Table (Node_Offsets.Table (N) + Offset / L);
- V : constant Integer := Integer ((Offset mod L) * (Slot_Size / L));
+ V : constant Natural := Natural ((Offset mod L) * (Slot_Size / L));
begin
S := (S and not Shift_Left (255, V)) or Shift_Left (Slot (Val), V);
end Set_8_Bit_Val;
Slot_Size : constant := 32;
type Slot is mod 2**Slot_Size;
for Slot'Size use Slot_Size;
- pragma Provide_Shift_Operators (Slot);
+
+ function Shift_Left (S : Slot; V : Natural) return Slot;
+ pragma Import (Intrinsic, Shift_Left);
+
+ function Shift_Right (S : Slot; V : Natural) return Slot;
+ pragma Import (Intrinsic, Shift_Right);
type Field_1_Bit is mod 2**1;
type Field_2_Bit is mod 2**2;