2003-05-31 Bud Davis <bdavis9659@comcast.net>
[official-gcc.git] / gcc / ada / s-maccod.ads
blob0be10349bf876d04c876717bc5dd1c80cee8a400
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S Y S T E M . M A C H I N E _ C O D E --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 -- This package provides machine code support, both for instrinsic machine
35 -- operations, and also for machine code statements. See GNAT documentation
36 -- for full details.
38 package System.Machine_Code is
39 pragma Pure (Machine_Code);
41 type Asm_Input_Operand is private;
42 type Asm_Output_Operand is private;
43 -- These types are never used directly, they are declared only so that
44 -- the calls to Asm are type correct according to Ada semantic rules.
46 No_Input_Operands : constant Asm_Input_Operand;
47 No_Output_Operands : constant Asm_Output_Operand;
49 type Asm_Input_Operand_List is
50 array (Integer range <>) of Asm_Input_Operand;
52 type Asm_Output_Operand_List is
53 array (Integer range <>) of Asm_Output_Operand;
55 type Asm_Insn is private;
56 -- This type is not used directly. It is declared only so that the
57 -- aggregates used in code statements are type correct by Ada rules.
59 procedure Asm (
60 Template : String;
61 Outputs : Asm_Output_Operand_List;
62 Inputs : Asm_Input_Operand_List;
63 Clobber : String := "";
64 Volatile : Boolean := False);
66 procedure Asm (
67 Template : String;
68 Outputs : Asm_Output_Operand := No_Output_Operands;
69 Inputs : Asm_Input_Operand_List;
70 Clobber : String := "";
71 Volatile : Boolean := False);
73 procedure Asm (
74 Template : String;
75 Outputs : Asm_Output_Operand_List;
76 Inputs : Asm_Input_Operand := No_Input_Operands;
77 Clobber : String := "";
78 Volatile : Boolean := False);
80 procedure Asm (
81 Template : String;
82 Outputs : Asm_Output_Operand := No_Output_Operands;
83 Inputs : Asm_Input_Operand := No_Input_Operands;
84 Clobber : String := "";
85 Volatile : Boolean := False);
87 function Asm (
88 Template : String;
89 Outputs : Asm_Output_Operand_List;
90 Inputs : Asm_Input_Operand_List;
91 Clobber : String := "";
92 Volatile : Boolean := False)
93 return Asm_Insn;
95 function Asm (
96 Template : String;
97 Outputs : Asm_Output_Operand := No_Output_Operands;
98 Inputs : Asm_Input_Operand_List;
99 Clobber : String := "";
100 Volatile : Boolean := False)
101 return Asm_Insn;
103 function Asm (
104 Template : String;
105 Outputs : Asm_Output_Operand_List;
106 Inputs : Asm_Input_Operand := No_Input_Operands;
107 Clobber : String := "";
108 Volatile : Boolean := False)
109 return Asm_Insn;
111 function Asm (
112 Template : String;
113 Outputs : Asm_Output_Operand := No_Output_Operands;
114 Inputs : Asm_Input_Operand := No_Input_Operands;
115 Clobber : String := "";
116 Volatile : Boolean := False)
117 return Asm_Insn;
119 pragma Import (Intrinsic, Asm);
121 private
123 type Asm_Input_Operand is new Integer;
124 type Asm_Output_Operand is new Integer;
125 type Asm_Insn is new Integer;
126 -- All three of these types are dummy types, to meet the requirements of
127 -- type consistenty. No values of these types are ever referenced.
129 No_Input_Operands : constant Asm_Input_Operand := 0;
130 No_Output_Operands : constant Asm_Output_Operand := 0;
132 end System.Machine_Code;