summaryrefslogtreecommitdiff
path: root/gcc/ada/s-unstyp.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:52:32 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:52:32 +0000
commit59ca7bac23b6b53257582966f19a3e84ea0138a2 (patch)
tree162a23fa1dc6b2cfca448b3db6905b462f282b70 /gcc/ada/s-unstyp.ads
parent115a8ff95a7b32496cbaf73f390aaaa335b5501e (diff)
downloadgcc-59ca7bac23b6b53257582966f19a3e84ea0138a2.tar.gz
2007-04-20 Robert Dewar <dewar@adacore.com>
* a-reatim.adb: Documentation addition * g-cgideb.adb: Minor code reorganization * tree_io.adb, treepr.adb, cstand.adb, krunch.adb, par.adb, mdll-utl.adb, par-ch5.adb, par-tchk.adb, s-exctab.ads, s-memory.ads, s-osprim.ads, s-restri.ads, s-soflin.ads: Minor reformatting. * debug.ads, debug.adb (Get_Debug_Flag_K): Remove unused obsolete function. Change name New_Scope to Push_Scope (Get_Debug_Flag_K): Remove unused obsolete function. * exp_ch8.adb, inline.adb, sem_ch8.ads: Change name New_Scope to Push_Scope. * makeusg.adb: Update Copyright notice Add line for switch -aP * makeusg.adb: Fix wording of some usage messages * s-assert.adb (Raise_Assert_Failure): Add call to Debug_Raise_Assert_Failure. * s-unstyp.ads (type Packed_Bytes2): Change alignment to use 'Min (2, Standard'Alignment) for compatibility with AAMP (where alignment is restricted to 1). * s-wchjis.adb: Remove use of System.Pure_Exceptions * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): Set the node location to No_Location when we're not debugging the expanded code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125478 138bc75d-0d04-0410-961f-82ee72b054a4
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);