1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- S Y S T E M . M A C H I N E _ C O D E --
9 -- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
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, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
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. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 -- This package provides machine code support, both for intrinsic machine
35 -- operations, and also for machine code statements. See GNAT documentation
38 package System
.Machine_Code
is
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.
61 Outputs
: Asm_Output_Operand_List
;
62 Inputs
: Asm_Input_Operand_List
;
63 Clobber
: String := "";
64 Volatile
: Boolean := False);
68 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
69 Inputs
: Asm_Input_Operand_List
;
70 Clobber
: String := "";
71 Volatile
: Boolean := False);
75 Outputs
: Asm_Output_Operand_List
;
76 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
77 Clobber
: String := "";
78 Volatile
: Boolean := False);
82 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
83 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
84 Clobber
: String := "";
85 Volatile
: Boolean := False);
89 Outputs
: Asm_Output_Operand_List
;
90 Inputs
: Asm_Input_Operand_List
;
91 Clobber
: String := "";
92 Volatile
: Boolean := False)
97 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
98 Inputs
: Asm_Input_Operand_List
;
99 Clobber
: String := "";
100 Volatile
: Boolean := False) return Asm_Insn
;
104 Outputs
: Asm_Output_Operand_List
;
105 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
106 Clobber
: String := "";
107 Volatile
: Boolean := False) return Asm_Insn
;
111 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
112 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
113 Clobber
: String := "";
114 Volatile
: Boolean := False) return Asm_Insn
;
116 pragma Import
(Intrinsic
, Asm
);
120 type Asm_Input_Operand
is new Integer;
121 type Asm_Output_Operand
is new Integer;
122 type Asm_Insn
is new Integer;
123 -- All three of these types are dummy types, to meet the requirements of
124 -- type consistenty. No values of these types are ever referenced.
126 No_Input_Operands
: constant Asm_Input_Operand
:= 0;
127 No_Output_Operands
: constant Asm_Output_Operand
:= 0;
129 end System
.Machine_Code
;