-- --
-- S p e c --
-- --
--- --
--- Copyright (C) 1996 Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package Exp_Code is
procedure Expand_Asm_Call (N : Node_Id);
- -- Expands a call to Asm or Asm_Volatile into an equivalent
- -- N_Code_Statement node.
+ -- Expands a call to Asm into an equivalent N_Code_Statement node
-- The following routines provide an abstract interface to analyze
-- code statements, for use by Gigi processing for code statements.
-- to expand tables that are frozen on entry to Gigi.
function Is_Asm_Volatile (N : Node_Id) return Boolean;
- -- Given an N_Code_Statement node N, return True in the Asm_Volatile
- -- case and False in the Asm case.
+ -- Given an N_Code_Statement node N, return True if Volatile=True is
+ -- specified, and False if Volatile=False is specified (or set by default).
function Asm_Template (N : Node_Id) return Node_Id;
-- Given an N_Code_Statement node N, returns string literal node for
-- Called within a loop initialized by Setup_Asm_Inputs and controlled
-- by Next_Asm_Input as described above. Returns the expression node for
-- the value component of the current Asm_Input parameter, or Empty if
- -- there are no more Asm_Input parameters.
+ -- there are no more Asm_Input parameters, or Error if an error was
+ -- previously detected in the input parameters (note that the backend
+ -- need not worry about this case, since it won't be called if there
+ -- were any such serious errors detected).
procedure Next_Asm_Input;
-- Step to next Asm_Input parameter. It is an error to call this procedure
-- arguments. The protocol is to construct a loop as follows:
--
-- Setup_Asm_Outputs (N);
- -- while Present (Asm_Output_Value)
+ -- while Present (Asm_Output_Variable)
-- body
-- Next_Asm_Output;
-- end loop;
-- Empty if there are no more Asm_Output parameters.
function Asm_Output_Variable return Node_Id;
- -- Called within a loop initialized by Setup_Asm_Outputs and controlled
- -- by Next_Asm_Output as described above. Returns the expression node for
- -- the output variable component of the current Asm_Output parameter, or
- -- Empty if there are no more Asm_Output parameters.
+ -- Called within a loop initialized by Setup_Asm_Outputs and controlled by
+ -- Next_Asm_Output as described above. Returns the expression node for the
+ -- output variable component of the current Asm_Output parameter, or Empty
+ -- if there are no more Asm_Output parameters, or Error if an error was
+ -- previously detected in the input parameters (note that the backend need
+ -- not worry about this case, since it won't be called if there were any
+ -- such serious errors detected).
procedure Next_Asm_Output;
-- Step to next Asm_Output parameter. It is an error to call this procedure