PageRenderTime 35ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/gcc-3.2.3-20040701/gcc/ada/5asystem.ads

#
Ada | 229 lines | 98 code | 46 blank | 85 comment | 0 complexity | 7edf956b59171517cd887422c96f6b4f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, LGPL-2.0, CC-BY-SA-3.0
  1. ------------------------------------------------------------------------------
  2. -- --
  3. -- GNAT RUN-TIME COMPONENTS --
  4. -- --
  5. -- S Y S T E M --
  6. -- --
  7. -- S p e c --
  8. -- (DEC Unix Version) --
  9. -- --
  10. -- $Revision: 1.1.16.1 $
  11. -- --
  12. -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
  13. -- --
  14. -- This specification is derived from the Ada Reference Manual for use with --
  15. -- GNAT. The copyright notice above, and the license provisions that follow --
  16. -- apply solely to the contents of the part following the private keyword. --
  17. -- --
  18. -- GNAT is free software; you can redistribute it and/or modify it under --
  19. -- terms of the GNU General Public License as published by the Free Soft- --
  20. -- ware Foundation; either version 2, or (at your option) any later ver- --
  21. -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
  22. -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
  23. -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
  24. -- for more details. You should have received a copy of the GNU General --
  25. -- Public License distributed with GNAT; see file COPYING. If not, write --
  26. -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
  27. -- MA 02111-1307, USA. --
  28. -- --
  29. -- As a special exception, if other files instantiate generics from this --
  30. -- unit, or you link this unit with other files to produce an executable, --
  31. -- this unit does not by itself cause the resulting executable to be --
  32. -- covered by the GNU General Public License. This exception does not --
  33. -- however invalidate any other reasons why the executable file might be --
  34. -- covered by the GNU Public License. --
  35. -- --
  36. -- GNAT was originally developed by the GNAT team at New York University. --
  37. -- Extensive contributions were provided by Ada Core Technologies Inc. --
  38. -- --
  39. ------------------------------------------------------------------------------
  40. package System is
  41. pragma Pure (System);
  42. -- Note that we take advantage of the implementation permission to
  43. -- make this unit Pure instead of Preelaborable, see RM 13.7(36)
  44. type Name is (SYSTEM_NAME_GNAT);
  45. System_Name : constant Name := SYSTEM_NAME_GNAT;
  46. -- System-Dependent Named Numbers
  47. Min_Int : constant := Long_Long_Integer'First;
  48. Max_Int : constant := Long_Long_Integer'Last;
  49. Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
  50. Max_Nonbinary_Modulus : constant := Integer'Last;
  51. Max_Base_Digits : constant := Long_Long_Float'Digits;
  52. Max_Digits : constant := Long_Long_Float'Digits;
  53. Max_Mantissa : constant := 63;
  54. Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
  55. Tick : constant := Standard'Tick;
  56. -- Storage-related Declarations
  57. type Address is private;
  58. Null_Address : constant Address;
  59. Storage_Unit : constant := Standard'Storage_Unit;
  60. Word_Size : constant := Standard'Word_Size;
  61. Memory_Size : constant := 2 ** Standard'Address_Size;
  62. -- Address comparison
  63. function "<" (Left, Right : Address) return Boolean;
  64. function "<=" (Left, Right : Address) return Boolean;
  65. function ">" (Left, Right : Address) return Boolean;
  66. function ">=" (Left, Right : Address) return Boolean;
  67. function "=" (Left, Right : Address) return Boolean;
  68. pragma Import (Intrinsic, "<");
  69. pragma Import (Intrinsic, "<=");
  70. pragma Import (Intrinsic, ">");
  71. pragma Import (Intrinsic, ">=");
  72. pragma Import (Intrinsic, "=");
  73. -- Other System-Dependent Declarations
  74. type Bit_Order is (High_Order_First, Low_Order_First);
  75. Default_Bit_Order : constant Bit_Order := Low_Order_First;
  76. -- Priority-related Declarations (RM D.1)
  77. Max_Priority : constant Positive := 30;
  78. Max_Interrupt_Priority : constant Positive := 31;
  79. subtype Any_Priority is Integer
  80. range 0 .. Standard'Max_Interrupt_Priority;
  81. subtype Priority is Any_Priority
  82. range 0 .. Standard'Max_Priority;
  83. -- Functional notation is needed in the following to avoid visibility
  84. -- problems when this package is compiled through rtsfind in the middle
  85. -- of another compilation.
  86. subtype Interrupt_Priority is Any_Priority
  87. range
  88. Standard."+" (Standard'Max_Priority, 1) ..
  89. Standard'Max_Interrupt_Priority;
  90. Default_Priority : constant Priority :=
  91. Standard."/" (Standard."+" (Priority'First, Priority'Last), 2);
  92. private
  93. type Address is mod Memory_Size;
  94. Null_Address : constant Address := 0;
  95. --------------------------------------
  96. -- System Implementation Parameters --
  97. --------------------------------------
  98. -- These parameters provide information about the target that is used
  99. -- by the compiler. They are in the private part of System, where they
  100. -- can be accessed using the special circuitry in the Targparm unit
  101. -- whose source should be consulted for more detailed descriptions
  102. -- of the individual switch values.
  103. AAMP : constant Boolean := False;
  104. Command_Line_Args : constant Boolean := True;
  105. Denorm : constant Boolean := False;
  106. Frontend_Layout : constant Boolean := False;
  107. Functions_Return_By_DSP : constant Boolean := True;
  108. Long_Shifts_Inlined : constant Boolean := True;
  109. High_Integrity_Mode : constant Boolean := False;
  110. Machine_Overflows : constant Boolean := False;
  111. Machine_Rounds : constant Boolean := True;
  112. OpenVMS : constant Boolean := False;
  113. Signed_Zeros : constant Boolean := True;
  114. Stack_Check_Default : constant Boolean := True;
  115. Stack_Check_Probes : constant Boolean := True;
  116. Use_Ada_Main_Program_Name : constant Boolean := False;
  117. ZCX_By_Default : constant Boolean := True;
  118. GCC_ZCX_Support : constant Boolean := False;
  119. Front_End_ZCX_Support : constant Boolean := True;
  120. -- Note: Denorm is False because denormals are only handled properly
  121. -- if the -mieee switch is set, and we do not require this usage.
  122. ---------------------------
  123. -- Underlying Priorities --
  124. ---------------------------
  125. -- Important note: this section of the file must come AFTER the
  126. -- definition of the system implementation parameters to ensure
  127. -- that the value of these parameters is available for analysis
  128. -- of the declarations here (using Rtsfind at compile time).
  129. -- The underlying priorities table provides a generalized mechanism
  130. -- for mapping from Ada priorities to system priorities. In some
  131. -- cases a 1-1 mapping is not the convenient or optimal choice.
  132. -- For Dec Unix 4.0d, we use a default 1-to-1 mapping that provides
  133. -- the full range of 64 priorities available from the operating system.
  134. -- On DU prior to 4.0d, less than 64 priorities are available so there
  135. -- are two possibilities:
  136. -- Limit your range of priorities to the range provided by the
  137. -- OS (e.g 16 .. 32 on 4.0b)
  138. -- Replace the standard table as described below
  139. -- To replace the default values of the Underlying_Priorities mapping,
  140. -- copy this source file into your build directory, edit the file to
  141. -- reflect your desired behavior, and recompile with the command:
  142. -- $ gcc -c -O3 -gnatpgn system.ads
  143. -- then recompile the run-time parts that depend on this package:
  144. -- $ gnatmake -a -gnatn -O3 <your application>
  145. -- then force rebuilding your application if you need different options:
  146. -- $ gnatmake -f <your options> <your application>
  147. type Priorities_Mapping is array (Any_Priority) of Integer;
  148. pragma Suppress_Initialization (Priorities_Mapping);
  149. -- Suppress initialization in case gnat.adc specifies Normalize_Scalars
  150. Underlying_Priorities : constant Priorities_Mapping :=
  151. (Priority'First => 16,
  152. 1 => 17,
  153. 2 => 18,
  154. 3 => 18,
  155. 4 => 18,
  156. 5 => 18,
  157. 6 => 19,
  158. 7 => 19,
  159. 8 => 19,
  160. 9 => 20,
  161. 10 => 20,
  162. 11 => 21,
  163. 12 => 21,
  164. 13 => 22,
  165. 14 => 23,
  166. Default_Priority => 24,
  167. 16 => 25,
  168. 17 => 25,
  169. 18 => 25,
  170. 19 => 26,
  171. 20 => 26,
  172. 21 => 26,
  173. 22 => 27,
  174. 23 => 27,
  175. 24 => 27,
  176. 25 => 28,
  177. 26 => 28,
  178. 27 => 29,
  179. 28 => 29,
  180. 29 => 30,
  181. Priority'Last => 30,
  182. Interrupt_Priority => 31);
  183. end System;