Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
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_pseudo_gen.h 00038 // 00039 // Interface for pseudo instructions. 00040 // 00041 // void ISA_Pseudo_Begin(const char* archname) 00042 // Initialize to generate pseudo instruction translation information 00043 // for the architecture with the given <archname>. The information 00044 // will be written to the files targ_isa_pseudo.[ch]. 00045 // 00046 // void ISA_Pseudo_End(void) 00047 // Complete processing of pseudo translation information. 00048 // 00049 // void Machine_To_Pseudo(TOP pseudo, TOP machine) 00050 // Starts the definition of a machine-instruction to pseudo- 00051 // instruction translation. These definitions are used 00052 // during disassembly. 00053 // 00054 // <pseudo> and <machine> specify the topcodes for the pseudo 00055 // and machine instructions. 00056 // 00057 // Following the Machine_To_Pseudo() call may be a number of Require() 00058 // calls to constrain the operands of this particular translation 00059 // (there can be multiple Machine_To_Pseudo() calls with the same 00060 // <machine> operand provided the operand constraints are unique). 00061 // 00062 // Also following the Machine_To_Pseudo() call may be a number of 00063 // Map_Arg() calls are used to specify how the instruction operands 00064 // are handled when a translation occurs. 00065 // 00066 // void Pseudo_To_Machine(TOP machine, TOP pseudo) 00067 // Starts the definition of a pseudo-instruction to machine- 00068 // instruction translation. These definitions are used during 00069 // lowering before final code emission. 00070 // 00071 // <pseudo> and <machine> specify the topcodes for the pseudo 00072 // and machine instructions. 00073 // 00074 // Following the Machine_To_Pseudo() call may be a number of 00075 // Map_Arg() calls are used to specify how the instruction operands 00076 // are handled when a translation occurs. 00077 // 00078 // void Require(const char *bool_expr) 00079 // Adds a requirement on the operands/results of the machine instruction 00080 // in a machine-to-pseudo translation. 00081 // 00082 // <bool_expr> is a C expression, specified as a string, that 00083 // results in a boolean value. This expression will be evaluated 00084 // at run-time and must be true for the machine instruction to be 00085 // translated to the current pseudo instruction. Multiple requirements 00086 // for a given machine instruction can be specified by making multiple 00087 // Require() calls. The tests will be performed in the order they appear 00088 // in the specification. 00089 // 00090 // As noted, the C expression must result in a boolean value. 00091 // In addition to using numeric constants and builtin operators, 00092 // the macros OPND(int n) and RESULT(int n) may be used to 00093 // refer to the actual operand and result values at run time. 00094 // 00095 // void Map_Arg(const char *lvalue, const char *expr) 00096 // If a machine-to-pseudo or pseudo-to-machine translation will 00097 // occur, then the information supplied by this function 00098 // is used to map the results/operands of the input instruction to 00099 // the output instruction. The effect of Map_Arg is to perform 00100 // the assignment: <lvalue> = <expr>. 00101 // 00102 // <lvalue> is a C l-value, specified as a string, that identifies 00103 // the result/operand of the output instruction. The OPND(int n) 00104 // and RESULT(int n) macro in this context identify operands and 00105 // results of the input OP. 00106 // 00107 // <expr> is a C expression, specified as a string, that will become 00108 // the value of the result/operand specified by <lvalue>. The 00109 // OPND(int n) and RESULT(int n) macro in this context identify 00110 // operands and results of the input instruction. 00111 // 00113 00114 00115 #ifndef isa_pseudo_gen_INCLUDED 00116 #define isa_pseudo_gen_INCLUDED 00117 00118 #ifdef _KEEP_RCS_ID 00119 #endif /* _KEEP_RCS_ID */ 00120 00121 #ifdef __cplusplus 00122 extern "C" { 00123 #endif 00124 00125 extern void ISA_Pseudo_Begin(const char* archname); 00126 extern void Machine_To_Pseudo(TOP pseudo, TOP machine); 00127 extern void Pseudo_To_Machine(TOP machine, TOP pseudo); 00128 extern void Require(const char *bool_expr); 00129 extern void Map_Arg(const char *lvalue, const char *expr); 00130 extern void ISA_Pseudo_End(void); 00131 00132 #ifdef __cplusplus 00133 } 00134 #endif 00135 #endif /* isa_pseudo_gen_INCLUDED */