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
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 #ifndef ti_bundle_INCLUDED
00142 #define ti_bundle_INCLUDED
00143
00144 #include "topcode.h"
00145
00146 #ifdef __cplusplus
00147 extern "C" {
00148 #endif
00149
00150 #ifdef _KEEP_RCS_ID
00151 static const char ti_bundle_rcs_id[] = "$Source: /proj/osprey/CVS/open64/osprey1.0/common/targ_info/access/ti_bundle.h,v $ $Revision: 1.1.1.1 $";
00152 #endif
00153
00154 #ifndef defs_INCLUDED
00155 #define defs_INCLUDED
00156 typedef signed int INT;
00157 typedef signed int INT32;
00158 typedef signed long long INT64;
00159 typedef signed char mINT8;
00160 typedef signed short mINT16;
00161 typedef signed int mINT32;
00162 typedef signed long long mINT64;
00163 typedef unsigned int UINT;
00164 typedef unsigned int UINT32;
00165 typedef unsigned long long UINT64;
00166 typedef unsigned char mUINT8;
00167 typedef unsigned short mUINT16;
00168 typedef unsigned int mUINT32;
00169 typedef unsigned long long mUINT64;
00170 typedef int BOOL;
00171 typedef unsigned char mBOOL;
00172 #ifndef TRUE
00173 #define TRUE ((BOOL) 1)
00174 #endif
00175 #ifndef FALSE
00176 #define FALSE ((BOOL) 0)
00177 #endif
00178 #if defined(_LANGUAGE_C) && !defined(inline)
00179 #define inline static __inline
00180 #endif
00181 #endif
00182
00183 typedef struct ti_bundle {
00184 ISA_BUNDLE_INFO *bundle_info;
00185 BOOL slot_filled[ISA_MAX_SLOTS];
00186 } TI_BUNDLE;
00187
00188
00189
00190
00191 #define TI_BUNDLE_bundle_info(t) ((t)->bundle_info)
00192 #define TI_BUNDLE_slot_count(t) ((t)->bundle_info->slot_count)
00193 #define TI_BUNDLE_exec_property(t,i) ((t)->bundle_info->slot[i])
00194 #define TI_BUNDLE_stop_bit(t,i) ((t)->bundle_info->stop[i])
00195 #define TI_BUNDLE_slot_filled(t,i) ((t)->slot_filled[i])
00196 #define TI_BUNDLE_slot_mask(t) ((t)->bundle_info->slot_mask)
00197 #define TI_BUNDLE_stop_mask(t) ((t)->bundle_info->stop_mask)
00198 #define TI_BUNDLE_pack_code(t) ((t)->bundle_info->pack_code)
00199
00200 #define Set_TI_BUNDLE_exec_property(t, i, value) ((t)->bundle_info->slot[i] = \
00201 (value))
00202 #define Set_TI_BUNDLE_slot_mask(t, i) ((t)->bundle_info->slot_mask = i)
00203 #define Set_TI_BUNDLE_stop_mask(t, i) ((t)->bundle_info->stop_mask = i)
00204 #define Set_TI_BUNDLE_slot_count(t, i) ((t)->bundle_info->slot_count = i)
00205 #define Set_TI_BUNDLE_stop_bit(t, i, value) ((t)->bundle_info->stop[i] = \
00206 (value))
00207 #define Set_TI_BUNDLE_pack_code(t, value) ((t)->bundle_info->pack_code = \
00208 (value))
00209
00210
00211
00212 #define FOR_ALL_SLOT_MEMBERS(bundle, i) \
00213 for (i = 0; i < TI_BUNDLE_slot_count(bundle); ++i)
00214
00215 inline BOOL
00216 TI_BUNDLE_Stop_Bit_Present(TI_BUNDLE *bundle) {
00217 INT i;
00218 for (i = 0; i < TI_BUNDLE_slot_count(bundle) - 1; ++i) {
00219 if (TI_BUNDLE_stop_bit(bundle, i)) return TRUE;
00220 }
00221 return FALSE;
00222 }
00223
00224 extern BOOL TI_BUNDLE_Has_Property(
00225 TI_BUNDLE *bundle,
00226 ISA_EXEC_UNIT_PROPERTY property,
00227 INT *error
00228 );
00229
00230 extern BOOL TI_BUNDLE_Is_Full(
00231 TI_BUNDLE *bundle,
00232 INT *error
00233 );
00234
00235 extern BOOL TI_BUNDLE_Is_Empty(
00236 TI_BUNDLE *bundle,
00237 INT *error
00238 );
00239
00240 extern INT TI_BUNDLE_Return_Template(
00241 TI_BUNDLE *bundle
00242 );
00243
00244 extern void TI_BUNDLE_Clear(
00245 TI_BUNDLE *bundle
00246 );
00247
00248 extern BOOL TI_BUNDLE_Slot_Available(
00249 TI_BUNDLE *bundle,
00250 ISA_EXEC_UNIT_PROPERTY property,
00251 INT slot
00252 );
00253
00254 extern BOOL TI_BUNDLE_Stop_Bit_Available(
00255 TI_BUNDLE *bundle,
00256 INT slot
00257 );
00258
00259 extern void TI_BUNDLE_Reserve_Slot(
00260 TI_BUNDLE *bundle,
00261 INT slot,
00262 ISA_EXEC_UNIT_PROPERTY property
00263 );
00264
00265 extern void TI_BUNDLE_Reserve_Stop_Bit(
00266 TI_BUNDLE *bundle,
00267 INT slot
00268 );
00269
00270 extern void TI_BUNDLE_Unreserve_Stop_Bit(
00271 TI_BUNDLE *bundle,
00272 INT slot
00273 );
00274
00275 #ifdef __cplusplus
00276 }
00277 #endif
00278 #endif
00279