]>
Commit | Line | Data |
---|---|---|
cacbc350 RK |
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 | -- -- | |
fbf5a39b | 9 | -- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- |
cacbc350 RK |
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. -- | |
71ff80dc | 30 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- |
cacbc350 RK |
31 | -- -- |
32 | ------------------------------------------------------------------------------ | |
33 | ||
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. | |
37 | ||
38 | package System.Machine_Code is | |
39 | pragma Pure (Machine_Code); | |
40 | ||
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. | |
45 | ||
46 | No_Input_Operands : constant Asm_Input_Operand; | |
47 | No_Output_Operands : constant Asm_Output_Operand; | |
48 | ||
49 | type Asm_Input_Operand_List is | |
50 | array (Integer range <>) of Asm_Input_Operand; | |
51 | ||
52 | type Asm_Output_Operand_List is | |
53 | array (Integer range <>) of Asm_Output_Operand; | |
54 | ||
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. | |
58 | ||
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); | |
65 | ||
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); | |
72 | ||
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); | |
79 | ||
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); | |
86 | ||
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; | |
94 | ||
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; | |
102 | ||
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; | |
110 | ||
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; | |
118 | ||
119 | pragma Import (Intrinsic, Asm); | |
120 | ||
121 | private | |
122 | ||
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. | |
128 | ||
129 | No_Input_Operands : constant Asm_Input_Operand := 0; | |
130 | No_Output_Operands : constant Asm_Output_Operand := 0; | |
131 | ||
132 | end System.Machine_Code; |