OSDN Git Service

2007-04-20 Eric Botcazou <ebotcazou@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-auxdec-vms_64.ads
index daf4b46..0911dd6 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1996-2004 Free Software Foundation, Inc.          --
+--          Copyright (C) 1996-2007, 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- --
@@ -16,8 +16,8 @@
 -- or FITNESS For A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
 --  These definitions can be used directly by withing this package, or merged
 --  with System using pragma Extend_System (Aux_DEC)
 
---  This is the IPF VMS 64 bit version.
+--  This is the VMS 64 bit version
 
-with Unchecked_Conversion;
+with Ada.Unchecked_Conversion;
 
 package System.Aux_DEC is
-pragma Elaborate_Body (Aux_DEC);
+   pragma Preelaborate;
 
-   subtype Short_Address is Address
+   type Short_Integer_Address is
      range -2 ** (32 - 1) .. +2 ** (32 - 1) - 1;
+   --  Integer literals cannot appear naked in an address context, as a
+   --  result the bounds of Short_Address cannot be given simply as 2^32 etc.
+
+   subtype Short_Address is Address
+     range Address (Short_Integer_Address'First) ..
+           Address (Short_Integer_Address'Last);
    for Short_Address'Object_Size use 32;
    --  This subtype allows addresses to be converted from 64 bits to 32 bits
    --  with an appropriate range check. Note that since this is a subtype of
@@ -54,7 +60,7 @@ pragma Elaborate_Body (Aux_DEC);
    --  not available.
 
    Short_Memory_Size : constant := 2 ** 32;
-   --  Defined for convenience of porting.
+   --  Defined for convenience of porting
 
    type Integer_8  is range -2 **  (8 - 1) .. +2 **  (8 - 1) - 1;
    for Integer_8'Size  use  8;
@@ -70,7 +76,7 @@ pragma Elaborate_Body (Aux_DEC);
 
    type Largest_Integer is range Min_Int .. Max_Int;
 
-   type AST_Handler is limited private;
+   type AST_Handler is private;
 
    No_AST_Handler : constant AST_Handler;
 
@@ -292,17 +298,17 @@ pragma Elaborate_Body (Aux_DEC);
    procedure Clear_Interlocked
      (Bit          : in out Boolean;
       Old_Value    : out Boolean;
-      Retry_Count  : in Natural;
+      Retry_Count  : Natural;
       Success_Flag : out Boolean);
 
    procedure Set_Interlocked
      (Bit          : in out Boolean;
       Old_Value    : out Boolean;
-      Retry_Count  : in Natural;
+      Retry_Count  : Natural;
       Success_Flag : out Boolean);
 
    procedure Add_Interlocked
-     (Addend       : in Short_Integer;
+     (Addend       : Short_Integer;
       Augend       : in out Aligned_Word;
       Sign         : out Integer);
 
@@ -326,67 +332,67 @@ pragma Elaborate_Body (Aux_DEC);
 
    procedure Add_Atomic
      (To           : in out Aligned_Integer;
-      Amount       : in Integer);
+      Amount       : Integer);
 
    procedure Add_Atomic
      (To           : in out Aligned_Integer;
-      Amount       : in Integer;
-      Retry_Count  : in Natural;
+      Amount       : Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Integer;
       Success_Flag : out Boolean);
 
    procedure Add_Atomic
      (To           : in out Aligned_Long_Integer;
-      Amount       : in Long_Integer);
+      Amount       : Long_Integer);
 
    procedure Add_Atomic
      (To           : in out Aligned_Long_Integer;
-      Amount       : in Long_Integer;
-      Retry_Count  : in Natural;
+      Amount       : Long_Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Long_Integer;
       Success_Flag : out Boolean);
 
    procedure And_Atomic
      (To           : in out Aligned_Integer;
-      From         : in Integer);
+      From         : Integer);
 
    procedure And_Atomic
      (To           : in out Aligned_Integer;
-      From         : in Integer;
-      Retry_Count  : in Natural;
+      From         : Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Integer;
       Success_Flag : out Boolean);
 
    procedure And_Atomic
      (To           : in out Aligned_Long_Integer;
-      From         : in Long_Integer);
+      From         : Long_Integer);
 
    procedure And_Atomic
      (To           : in out Aligned_Long_Integer;
-      From         : in Long_Integer;
-      Retry_Count  : in Natural;
+      From         : Long_Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Long_Integer;
       Success_Flag : out Boolean);
 
    procedure Or_Atomic
      (To           : in out Aligned_Integer;
-      From         : in Integer);
+      From         : Integer);
 
    procedure Or_Atomic
      (To           : in out Aligned_Integer;
-      From         : in Integer;
-      Retry_Count  : in Natural;
+      From         : Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Integer;
       Success_Flag : out Boolean);
 
    procedure Or_Atomic
      (To           : in out Aligned_Long_Integer;
-      From         : in Long_Integer);
+      From         : Long_Integer);
 
    procedure Or_Atomic
      (To           : in out Aligned_Long_Integer;
-      From         : in Long_Integer;
-      Retry_Count  : in Natural;
+      From         : Long_Integer;
+      Retry_Count  : Natural;
       Old_Value    : out Long_Integer;
       Success_Flag : out Boolean);
 
@@ -411,22 +417,22 @@ pragma Elaborate_Body (Aux_DEC);
       OK_Empty       => +2);
 
    procedure Insqhi
-     (Item   : in  Address;
-      Header : in  Address;
+     (Item   : Address;
+      Header : Address;
       Status : out Insq_Status);
 
    procedure Remqhi
-     (Header : in  Address;
+     (Header : Address;
       Item   : out Address;
       Status : out Remq_Status);
 
    procedure Insqti
-     (Item   : in  Address;
-      Header : in  Address;
+     (Item   : Address;
+      Header : Address;
       Status : out Insq_Status);
 
    procedure Remqti
-     (Header : in  Address;
+     (Header : Address;
       Item   : out Address;
       Status : out Remq_Status);
 
@@ -463,7 +469,7 @@ private
    --  convention C so that the critical parameters are passed by reference.
    --  Without this, the parameters are passed by copy, creating load/store
    --  race conditions. We also inline them, since this seems more in the
-   --  spirit of the original (hardware instrinsic) routines.
+   --  spirit of the original (hardware intrinsic) routines.
 
    pragma Convention (C, Clear_Interlocked);
    pragma Inline_Always (Clear_Interlocked);
@@ -489,61 +495,61 @@ private
    --  detectable by a program)
 
    function To_Unsigned_Byte_A is new
-     Unchecked_Conversion (Bit_Array_8, Unsigned_Byte);
+     Ada.Unchecked_Conversion (Bit_Array_8, Unsigned_Byte);
 
    function To_Unsigned_Byte (X : Bit_Array_8) return Unsigned_Byte
      renames To_Unsigned_Byte_A;
 
    function To_Bit_Array_8_A is new
-     Unchecked_Conversion (Unsigned_Byte, Bit_Array_8);
+     Ada.Unchecked_Conversion (Unsigned_Byte, Bit_Array_8);
 
    function To_Bit_Array_8 (X : Unsigned_Byte) return Bit_Array_8
      renames To_Bit_Array_8_A;
 
    function To_Unsigned_Word_A is new
-     Unchecked_Conversion (Bit_Array_16, Unsigned_Word);
+     Ada.Unchecked_Conversion (Bit_Array_16, Unsigned_Word);
 
    function To_Unsigned_Word (X : Bit_Array_16) return Unsigned_Word
      renames To_Unsigned_Word_A;
 
    function To_Bit_Array_16_A is new
-     Unchecked_Conversion (Unsigned_Word, Bit_Array_16);
+     Ada.Unchecked_Conversion (Unsigned_Word, Bit_Array_16);
 
    function To_Bit_Array_16 (X : Unsigned_Word) return Bit_Array_16
      renames To_Bit_Array_16_A;
 
    function To_Unsigned_Longword_A is new
-     Unchecked_Conversion (Bit_Array_32, Unsigned_Longword);
+     Ada.Unchecked_Conversion (Bit_Array_32, Unsigned_Longword);
 
    function To_Unsigned_Longword (X : Bit_Array_32) return Unsigned_Longword
      renames To_Unsigned_Longword_A;
 
    function To_Bit_Array_32_A is new
-     Unchecked_Conversion (Unsigned_Longword, Bit_Array_32);
+     Ada.Unchecked_Conversion (Unsigned_Longword, Bit_Array_32);
 
    function To_Bit_Array_32 (X : Unsigned_Longword) return Bit_Array_32
      renames To_Bit_Array_32_A;
 
    function To_Unsigned_32_A is new
-     Unchecked_Conversion (Bit_Array_32, Unsigned_32);
+     Ada.Unchecked_Conversion (Bit_Array_32, Unsigned_32);
 
    function To_Unsigned_32 (X : Bit_Array_32) return Unsigned_32
      renames To_Unsigned_32_A;
 
    function To_Bit_Array_32_A is new
-     Unchecked_Conversion (Unsigned_32, Bit_Array_32);
+     Ada.Unchecked_Conversion (Unsigned_32, Bit_Array_32);
 
    function To_Bit_Array_32 (X : Unsigned_32) return Bit_Array_32
      renames To_Bit_Array_32_A;
 
    function To_Unsigned_Quadword_A is new
-     Unchecked_Conversion (Bit_Array_64, Unsigned_Quadword);
+     Ada.Unchecked_Conversion (Bit_Array_64, Unsigned_Quadword);
 
    function To_Unsigned_Quadword (X : Bit_Array_64) return Unsigned_Quadword
      renames To_Unsigned_Quadword_A;
 
    function To_Bit_Array_64_A is new
-     Unchecked_Conversion (Unsigned_Quadword, Bit_Array_64);
+     Ada.Unchecked_Conversion (Unsigned_Quadword, Bit_Array_64);
 
    function To_Bit_Array_64 (X : Unsigned_Quadword) return Bit_Array_64
      renames To_Bit_Array_64_A;
@@ -554,7 +560,7 @@ private
    --  want warnings when we compile on such systems.
 
    function To_Address_A is new
-     Unchecked_Conversion (Integer, Address);
+     Ada.Unchecked_Conversion (Integer, Address);
    pragma Pure_Function (To_Address_A);
 
    function To_Address (X : Integer) return Address
@@ -562,7 +568,7 @@ private
    pragma Pure_Function (To_Address);
 
    function To_Address_Long_A is new
-     Unchecked_Conversion (Unsigned_Longword, Address);
+     Ada.Unchecked_Conversion (Unsigned_Longword, Address);
    pragma Pure_Function (To_Address_Long_A);
 
    function To_Address_Long (X : Unsigned_Longword) return Address
@@ -570,19 +576,19 @@ private
    pragma Pure_Function (To_Address_Long);
 
    function To_Integer_A is new
-     Unchecked_Conversion (Address, Integer);
+     Ada.Unchecked_Conversion (Address, Integer);
 
    function To_Integer (X : Address) return Integer
      renames To_Integer_A;
 
    function To_Unsigned_Longword_A is new
-     Unchecked_Conversion (Address, Unsigned_Longword);
+     Ada.Unchecked_Conversion (Address, Unsigned_Longword);
 
    function To_Unsigned_Longword (X : Address) return Unsigned_Longword
      renames To_Unsigned_Longword_A;
 
    function To_Unsigned_Longword_A is new
-     Unchecked_Conversion (AST_Handler, Unsigned_Longword);
+     Ada.Unchecked_Conversion (AST_Handler, Unsigned_Longword);
 
    function To_Unsigned_Longword (X : AST_Handler) return Unsigned_Longword
      renames To_Unsigned_Longword_A;