Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
i_cvrt.m
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 /* USMID:  "\n@(#)5.0_pl/macros/i_cvrt.m        5.2     06/10/99 14:15:34\n" */
00037 
00038 /*****************\
00039 |* MISCELLANEOUS *|
00040 \*****************/
00041 
00042 # define NUM_PDG_TYP_WDS        (sizeof(pdg_type_tbl_type)/HOST_BYTES_PER_WORD)
00043 
00044 /*****************************************************************************/
00045 /*  The following are for the frontend use and do not exist in the shared    */
00046 /*  module.                                                                  */
00047 /*****************************************************************************/
00048 
00049 
00050 # define SIGN_EXTEND(VALU)                                                     \
00051     VALU = VALU << 32;                                                         \
00052     VALU = VALU >> 32;                                                         \
00053 
00054 
00055 
00056 # ifdef _DEBUG
00057 
00058 
00059 
00060 # define PDG_DBG_PRINT_START                                                   \
00061 if (dump_flags.pdgcs) {
00062 
00063 
00064 # define PDG_DBG_PRINT_END                                                     \
00065 }
00066 
00067 
00068 # define PDG_DBG_PRINT_C(NAME)                                                 \
00069 fprintf(debug_file, "i_cvrt(%5d): %s()\n", __LINE__, NAME);
00070 
00071 # define PDG_DBG_PRINT_S(STR1, VAR1)                                           \
00072 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30s (string)\n", __LINE__, STR1, VAR1);
00073 
00074 # define PDG_DBG_PRINT_LLD(STR1, VAR1)                                         \
00075 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30lld (decimal)\n", __LINE__, STR1, VAR1);
00076 
00077 # define PDG_DBG_PRINT_LLO(STR1, VAR1)                                         \
00078 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30llo (octal)\n", __LINE__, STR1, VAR1);
00079 
00080 
00081 # if defined(_HOST32) && defined(_TARGET64)
00082 
00083 # define PDG_DBG_PRINT_LVD(STR1, VAR1)                                          \
00084 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30ld (decimal)\n", __LINE__, STR1, VAR1);
00085 
00086 # define PDG_DBG_PRINT_VD(STR1, VAR1)                                          \
00087 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30lld (decimal)\n", __LINE__, STR1, VAR1);
00088 
00089 # define PDG_DBG_PRINT_VO(STR1, VAR1)                                          \
00090 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30llo (octal)\n", __LINE__, STR1, VAR1);
00091 
00092 # else
00093 
00094 # define PDG_DBG_PRINT_LVD(STR1, VAR1)                                          \
00095 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30ld (decimal)\n", __LINE__, STR1, VAR1);
00096 
00097 # define PDG_DBG_PRINT_VD(STR1, VAR1)                                          \
00098 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30d (decimal)\n", __LINE__, STR1, VAR1);
00099 
00100 # define PDG_DBG_PRINT_VO(STR1, VAR1)                                          \
00101 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30o (octal)\n", __LINE__, STR1, VAR1);
00102 
00103 # endif
00104 
00105 
00106 # define PDG_DBG_PRINT_D(STR1, VAR1)                                           \
00107 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30d (decimal)\n", __LINE__, STR1, VAR1);
00108 
00109 # define PDG_DBG_PRINT_LD(STR1, VAR1)                                           \
00110 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30ld (decimal)\n", __LINE__, STR1, VAR1);
00111 
00112 # define PDG_DBG_PRINT_O(STR1, VAR1)                                           \
00113 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30o (octal)\n", __LINE__, STR1, VAR1);
00114 
00115 # define PDG_DBG_PRINT_LO(STR1, VAR1)                                          \
00116 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %-30lo (octal)\n", __LINE__, STR1, VAR1);
00117 
00118 
00119 
00120 
00121 # if (defined(_TARGET_OS_IRIX) || defined(_TARGET_OS_LINUX)) || defined(_TARGET_MONGOOSE)
00122 # define PDG_DBG_PRINT_T(STR1, VAR1)                                           \
00123 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %1o %1o %1o %1o %1o %1o %1o %1o " \
00124                 "%d %d %d %1o %d\n", __LINE__, STR1,                           \
00125                 VAR1.const_flag, VAR1.volatile_flag,                           \
00126                 VAR1.signed_flag, VAR1.automatic, VAR1.restricted,             \
00127                 VAR1.short_flag, VAR1.long_flag, VAR1.bitfield,                \
00128                 VAR1.table_type, VAR1.basic_type, VAR1.aux_info,               \
00129                 VAR1.shrd_pointee, VAR1.table_index);
00130 # else
00131 # define PDG_DBG_PRINT_T(STR1, VAR1)                                           \
00132 fprintf(debug_file, "i_cvrt(%5d):     %-20s= %1o %1o %1o %1o %1o %1o %1o "     \
00133                 "%d %d %d %d\n", __LINE__, STR1,                               \
00134                 VAR1.const_flag, VAR1.volatile_flag,                           \
00135                 VAR1.signed_flag, VAR1.restricted,                             \
00136                 VAR1.short_flag, VAR1.long_flag, VAR1.bitfield,                \
00137                 VAR1.table_type, VAR1.basic_type, VAR1.aux_info,               \
00138                 VAR1.table_index);
00139 # endif
00140 
00141 
00142 
00143 # else
00144 
00145 
00146 
00147 # define PDG_DBG_PRINT_START
00148 # define PDG_DBG_PRINT_END
00149 # define PDG_DBG_PRINT_C(NAME)
00150 # define PDG_DBG_PRINT_S(STR1, VAR1)
00151 # define PDG_DBG_PRINT_D(STR1, VAR1)
00152 # define PDG_DBG_PRINT_LD(STR1, VAR1)
00153 # define PDG_DBG_PRINT_LLD(STR1, VAR1)
00154 # define PDG_DBG_PRINT_T(STR1, VAR1)
00155 # define PDG_DBG_PRINT_O(STR1, VAR1)
00156 # define PDG_DBG_PRINT_LO(STR1, VAR1)
00157 # define PDG_DBG_PRINT_LLO(STR1, VAR1)
00158 # define PDG_DBG_PRINT_VD(STR1, VAR1)
00159 # define PDG_DBG_PRINT_LVD(STR1, VAR1)
00160 # define PDG_DBG_PRINT_VO(STR1, VAR1)
00161 
00162 
00163 # endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines