00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 # define NUM_PDG_TYP_WDS (sizeof(pdg_type_tbl_type)/HOST_BYTES_PER_WORD)
00043
00044
00045
00046
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