Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
isa_print_gen.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 // isa_print_gen.h
00038 //
00039 //  Interface for printing the instructions in an ISA.
00040 //
00041 //  void ISA_Print_Begin( const char* archname )
00042 //      Initialize to generate information to print the instructions for 
00043 //      the architecture with the given <archname>.  The information will 
00044 //      be written to the files targ_isa_print.[ch].  
00045 //
00046 //  TYPE ISA_PRINT_TYPE
00047 //      An abstract type that describes different types of printing formats.
00048 //
00049 //  ISA_PRINT_TYPE ISA_Print_Type_Create( const char* name, 
00050 //                                        const char* format_string )
00051 //      Used to create a new ISA_PRINT_TYPE.  <name> is the name of the 
00052 //      print type. The <format_string> specifies the string to be used to 
00053 //      print instructions of this type. The order in which the results
00054 //      and operands are printed is specified using a sequence of the 
00055 //      following two routines.
00056 //
00057 //  void Name (void)
00058 //      Print the instruction's name next.
00059 //
00060 //  void Operand (int operand_index)
00061 //      Print the <operand_index>'th operand next.
00062 //
00063 //  void Result (int result_index)
00064 //      Print the <operand_index>'th result next.
00065 //
00066 //  void Instruction_Print_Group (ISA_PRINT_TYPE print_type, TOP top, ...., 
00067 //                              TOP_UNDEFINED)
00068 //      List all the instructions that use <print_type> for printing. All
00069 //      the instructions are enumerated in a list terminated by TOP_UNDEFINED.
00070 //
00071 //  void Set_AsmName_Func(char *(*asmname_func)(TOP topcode))
00072 //      Specifies a function which returns the assembly language name
00073 //      to be used for the given topcode. If no function is specified,
00074 //      the assembly language name is the same as TOP_Name.
00075 //
00076 //  void ISA_Print_End(void)
00077 //      Complete processing of operands/results.
00078 //
00079 //
00081 
00082 
00083 
00084 #ifndef isa_print_gen_INCLUDED
00085 #define isa_print_gen_INCLUDED
00086 
00087 #include "gen_util_gen.h"
00088 
00089 #ifdef _KEEP_RCS_ID
00090 #endif /* _KEEP_RCS_ID */
00091 
00092 #ifdef __cplusplus
00093 extern "C" {
00094 #endif
00095 
00096 typedef struct isa_print_type *ISA_PRINT_TYPE;
00097 
00098 extern void ISA_Print_Begin ( const char* archname );
00099 extern ISA_PRINT_TYPE ISA_Print_Type_Create ( const char* name, 
00100                                               const char *format_string );
00101 extern void Name (void);
00102 extern void Operand (int operand_index);
00103 extern void Result (int result_index);
00104 extern void Instruction_Print_Group ( ISA_PRINT_TYPE print_type, TOP top, ... );
00105 extern void ISA_Print_End(void);
00106 extern void Set_AsmName_Func(const char *(*asmname_func)(TOP topcode));
00107 
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111 #endif /* isa_print_gen_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines