1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- S Y S T E M . M A C H I N E _ C O D E --
10 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
23 -- As a special exception, if other files instantiate generics from this --
24 -- unit, or you link this unit with other files to produce an executable, --
25 -- this unit does not by itself cause the resulting executable to be --
26 -- covered by the GNU General Public License. This exception does not --
27 -- however invalidate any other reasons why the executable file might be --
28 -- covered by the GNU Public License. --
30 -- GNAT was originally developed by the GNAT team at New York University. --
31 -- Extensive contributions were provided by Ada Core Technologies Inc. --
33 ------------------------------------------------------------------------------
35 -- This package provides machine code support, both for instrinsic machine
36 -- operations, and also for machine code statements. See GNAT documentation
39 package System
.Machine_Code
is
40 pragma Pure
(Machine_Code
);
42 type Asm_Input_Operand
is private;
43 type Asm_Output_Operand
is private;
44 -- These types are never used directly, they are declared only so that
45 -- the calls to Asm are type correct according to Ada semantic rules.
47 No_Input_Operands
: constant Asm_Input_Operand
;
48 No_Output_Operands
: constant Asm_Output_Operand
;
50 type Asm_Input_Operand_List
is
51 array (Integer range <>) of Asm_Input_Operand
;
53 type Asm_Output_Operand_List
is
54 array (Integer range <>) of Asm_Output_Operand
;
56 type Asm_Insn
is private;
57 -- This type is not used directly. It is declared only so that the
58 -- aggregates used in code statements are type correct by Ada rules.
62 Outputs
: Asm_Output_Operand_List
;
63 Inputs
: Asm_Input_Operand_List
;
64 Clobber
: String := "";
65 Volatile
: Boolean := False);
69 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
70 Inputs
: Asm_Input_Operand_List
;
71 Clobber
: String := "";
72 Volatile
: Boolean := False);
76 Outputs
: Asm_Output_Operand_List
;
77 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
78 Clobber
: String := "";
79 Volatile
: Boolean := False);
83 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
84 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
85 Clobber
: String := "";
86 Volatile
: Boolean := False);
90 Outputs
: Asm_Output_Operand_List
;
91 Inputs
: Asm_Input_Operand_List
;
92 Clobber
: String := "";
93 Volatile
: Boolean := False)
98 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
99 Inputs
: Asm_Input_Operand_List
;
100 Clobber
: String := "";
101 Volatile
: Boolean := False)
106 Outputs
: Asm_Output_Operand_List
;
107 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
108 Clobber
: String := "";
109 Volatile
: Boolean := False)
114 Outputs
: Asm_Output_Operand
:= No_Output_Operands
;
115 Inputs
: Asm_Input_Operand
:= No_Input_Operands
;
116 Clobber
: String := "";
117 Volatile
: Boolean := False)
120 pragma Import
(Intrinsic
, Asm
);
124 type Asm_Input_Operand
is new Integer;
125 type Asm_Output_Operand
is new Integer;
126 type Asm_Insn
is new Integer;
127 -- All three of these types are dummy types, to meet the requirements of
128 -- type consistenty. No values of these types are ever referenced.
130 No_Input_Operands
: constant Asm_Input_Operand
:= 0;
131 No_Output_Operands
: constant Asm_Output_Operand
:= 0;
133 end System
.Machine_Code
;