summaryrefslogtreecommitdiff
path: root/gcc/ada/s-unstyp.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-unstyp.ads')
-rw-r--r--gcc/ada/s-unstyp.ads101
1 files changed, 38 insertions, 63 deletions
diff --git a/gcc/ada/s-unstyp.ads b/gcc/ada/s-unstyp.ads
index 2b813ef4d42..8207469a4d7 100644
--- a/gcc/ada/s-unstyp.ads
+++ b/gcc/ada/s-unstyp.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -63,24 +63,24 @@ package System.Unsigned_Types is
-- for details.
type Packed_Bytes2 is new Packed_Bytes1;
- for Packed_Bytes2'Alignment use 2;
+ for Packed_Bytes2'Alignment use Integer'Min (2, Standard'Maximum_Alignment);
-- This is the type used to implement packed arrays where an alignment
- -- of 2 is helpful for maximum efficiency of the get and set routines
- -- in the corresponding library unit. This is true of all component
- -- sizes that are even but not divisible by 4 (other than 2 for which
- -- we use direct masking operations). In such cases, the clusters can
- -- be assumed to be 2-byte aligned if the array is aligned. See for
+ -- of 2 (is possible) is helpful for maximum efficiency of the get and
+ -- set routines in the corresponding library unit. This is true of all
+ -- component sizes that are even but not divisible by 4 (other than 2 for
+ -- which we use direct masking operations). In such cases, the clusters
+ -- can be assumed to be 2-byte aligned if the array is aligned. See for
-- example System.Pack_10 in file s-pack10).
type Packed_Bytes4 is new Packed_Bytes1;
for Packed_Bytes4'Alignment use Integer'Min (4, Standard'Maximum_Alignment);
-- This is the type used to implement packed arrays where an alignment
- -- of 4 is helpful for maximum efficiency of the get and set routines
- -- in the corresponding library unit. This is true of all component
- -- sizes that are divisible by 4 (other than powers of 2, which are
- -- either handled by direct masking or not packed at all). In such cases
- -- the clusters can be assumed to be 4-byte aligned if the array is
- -- aligned (see System.Pack_12 in file s-pack12 as an example).
+ -- of 4 (if possible) is helpful for maximum efficiency of the get and
+ -- set routines in the corresponding library unit. This is true of all
+ -- component sizes that are divisible by 4 (other than powers of 2, which
+ -- are either handled by direct masking or not packed at all). In such
+ -- cases the clusters can be assumed to be 4-byte aligned if the array
+ -- is aligned (see System.Pack_12 in file s-pack12 as an example).
type Bits_1 is mod 2**1;
type Bits_2 is mod 2**2;
@@ -92,128 +92,103 @@ package System.Unsigned_Types is
function Shift_Left
(Value : Short_Short_Unsigned;
- Amount : Natural)
- return Short_Short_Unsigned;
+ Amount : Natural) return Short_Short_Unsigned;
function Shift_Right
(Value : Short_Short_Unsigned;
- Amount : Natural)
- return Short_Short_Unsigned;
+ Amount : Natural) return Short_Short_Unsigned;
function Shift_Right_Arithmetic
(Value : Short_Short_Unsigned;
- Amount : Natural)
- return Short_Short_Unsigned;
+ Amount : Natural) return Short_Short_Unsigned;
function Rotate_Left
(Value : Short_Short_Unsigned;
- Amount : Natural)
- return Short_Short_Unsigned;
+ Amount : Natural) return Short_Short_Unsigned;
function Rotate_Right
(Value : Short_Short_Unsigned;
- Amount : Natural)
- return Short_Short_Unsigned;
+ Amount : Natural) return Short_Short_Unsigned;
function Shift_Left
(Value : Short_Unsigned;
- Amount : Natural)
- return Short_Unsigned;
+ Amount : Natural) return Short_Unsigned;
function Shift_Right
(Value : Short_Unsigned;
- Amount : Natural)
- return Short_Unsigned;
+ Amount : Natural) return Short_Unsigned;
function Shift_Right_Arithmetic
(Value : Short_Unsigned;
- Amount : Natural)
- return Short_Unsigned;
+ Amount : Natural) return Short_Unsigned;
function Rotate_Left
(Value : Short_Unsigned;
- Amount : Natural)
- return Short_Unsigned;
+ Amount : Natural) return Short_Unsigned;
function Rotate_Right
(Value : Short_Unsigned;
- Amount : Natural)
- return Short_Unsigned;
+ Amount : Natural) return Short_Unsigned;
function Shift_Left
(Value : Unsigned;
- Amount : Natural)
- return Unsigned;
+ Amount : Natural) return Unsigned;
function Shift_Right
(Value : Unsigned;
- Amount : Natural)
- return Unsigned;
+ Amount : Natural) return Unsigned;
function Shift_Right_Arithmetic
(Value : Unsigned;
- Amount : Natural)
- return Unsigned;
+ Amount : Natural) return Unsigned;
function Rotate_Left
(Value : Unsigned;
- Amount : Natural)
- return Unsigned;
+ Amount : Natural) return Unsigned;
function Rotate_Right
(Value : Unsigned;
- Amount : Natural)
- return Unsigned;
+ Amount : Natural) return Unsigned;
function Shift_Left
(Value : Long_Unsigned;
- Amount : Natural)
- return Long_Unsigned;
+ Amount : Natural) return Long_Unsigned;
function Shift_Right
(Value : Long_Unsigned;
- Amount : Natural)
- return Long_Unsigned;
+ Amount : Natural) return Long_Unsigned;
function Shift_Right_Arithmetic
(Value : Long_Unsigned;
- Amount : Natural)
- return Long_Unsigned;
+ Amount : Natural) return Long_Unsigned;
function Rotate_Left
(Value : Long_Unsigned;
- Amount : Natural)
- return Long_Unsigned;
+ Amount : Natural) return Long_Unsigned;
function Rotate_Right
(Value : Long_Unsigned;
- Amount : Natural)
- return Long_Unsigned;
+ Amount : Natural) return Long_Unsigned;
function Shift_Left
(Value : Long_Long_Unsigned;
- Amount : Natural)
- return Long_Long_Unsigned;
+ Amount : Natural) return Long_Long_Unsigned;
function Shift_Right
(Value : Long_Long_Unsigned;
- Amount : Natural)
- return Long_Long_Unsigned;
+ Amount : Natural) return Long_Long_Unsigned;
function Shift_Right_Arithmetic
(Value : Long_Long_Unsigned;
- Amount : Natural)
- return Long_Long_Unsigned;
+ Amount : Natural) return Long_Long_Unsigned;
function Rotate_Left
(Value : Long_Long_Unsigned;
- Amount : Natural)
- return Long_Long_Unsigned;
+ Amount : Natural) return Long_Long_Unsigned;
function Rotate_Right
(Value : Long_Long_Unsigned;
- Amount : Natural)
- return Long_Long_Unsigned;
+ Amount : Natural) return Long_Long_Unsigned;
pragma Import (Intrinsic, Shift_Left);
pragma Import (Intrinsic, Shift_Right);