00001
00002
00003
00004 enum c_c_tag { c_arith_dw_TAG = 6, c_arith_none_TAG = 7, c_arith_w_TAG = 5,
00005 c_bbs_dw_TAG = 4, c_bbs_w_TAG = 3, c_cmpb_dw_TAG = 2, c_cmpb_w_TAG = 1, };
00006 typedef struct c_c_instance {
00007 int tag;
00008 union {
00009 struct {
00010 unsigned c3_16:3;
00011 } c_arith_dw;
00012 struct {
00013 char avoid_empty_structures;
00014 } c_arith_none;
00015 struct {
00016 unsigned c3_16:3;
00017 } c_arith_w;
00018 struct {
00019 unsigned c_16:1;
00020 } c_bbs_dw;
00021 struct {
00022 unsigned c_16:1;
00023 } c_bbs_w;
00024 struct {
00025 unsigned c3_16:3;
00026 } c_cmpb_dw;
00027 struct {
00028 unsigned c3_16:3;
00029 } c_cmpb_w;
00030 } u;
00031 } c_c_Instance;
00032 enum c_null_tag { c_br_nnull_TAG = 1, c_br_null_TAG = 2, };
00033 typedef struct c_null_instance {
00034 int tag;
00035 union {
00036 struct {
00037 char avoid_empty_structures;
00038 } c_br_nnull;
00039 struct {
00040 char avoid_empty_structures;
00041 } c_br_null;
00042 } u;
00043 } c_null_Instance;
00044 enum c_wcr_tag { c_mfctl_TAG = 2, c_mfctl_w_TAG = 1, };
00045 typedef struct c_wcr_instance {
00046 int tag;
00047 union {
00048 struct {
00049 unsigned r_06:5;
00050 } c_mfctl;
00051 struct {
00052 char avoid_empty_structures;
00053 } c_mfctl_w;
00054 } u;
00055 } c_wcr_Instance;
00056 enum c_bit_tag { c_bitpos_dw_TAG = 2, c_bitpos_w_TAG = 1, c_bitsar_TAG = 3, };
00057 typedef struct c_bit_instance {
00058 int tag;
00059 union {
00060 struct {
00061 unsigned p_06:5;
00062 } c_bitpos_dw;
00063 struct {
00064 unsigned p_06:5;
00065 } c_bitpos_w;
00066 struct {
00067 char avoid_empty_structures;
00068 } c_bitsar;
00069 } u;
00070 } c_bit_Instance;
00071 enum c_addr_tag { c_addr_m_TAG = 4, c_addr_ma_TAG = 2, c_addr_mb_TAG = 1,
00072 c_addr_s_TAG = 3, c_addr_sm_TAG = 5, };
00073 typedef struct c_addr_instance {
00074 int tag;
00075 union {
00076 struct {
00077 char avoid_empty_structures;
00078 } c_addr_m;
00079 struct {
00080 char avoid_empty_structures;
00081 } c_addr_ma;
00082 struct {
00083 char avoid_empty_structures;
00084 } c_addr_mb;
00085 struct {
00086 char avoid_empty_structures;
00087 } c_addr_s;
00088 struct {
00089 char avoid_empty_structures;
00090 } c_addr_sm;
00091 } u;
00092 } c_addr_Instance;
00093 enum addr_tag { addr_index_TAG = 1, addr_ldo_TAG = 6, addr_lldisp_TAG = 4,
00094 addr_lsdisp_TAG = 2, addr_sldisp_TAG = 5, addr_ssdisp_TAG = 3, };
00095 typedef struct addr_instance {
00096 int tag;
00097 union {
00098 struct {
00099 c_addr_Instance c_addr;
00100 int x;
00101 int ss;
00102 int b;
00103 } addr_index;
00104 struct {
00105 c_addr_Instance c_addr;
00106 int ldisp;
00107 int b;
00108 } addr_ldo;
00109 struct {
00110 c_addr_Instance c_addr;
00111 int ldisp;
00112 int ss;
00113 int b;
00114 } addr_lldisp;
00115 struct {
00116 c_addr_Instance c_addr;
00117 int im5;
00118 int ss;
00119 int b;
00120 } addr_lsdisp;
00121 struct {
00122 c_addr_Instance c_addr;
00123 int ldisp;
00124 int ss;
00125 int b;
00126 } addr_sldisp;
00127 struct {
00128 c_addr_Instance c_addr;
00129 int im5;
00130 int ss;
00131 int b;
00132 } addr_ssdisp;
00133 } u;
00134 } addr_Instance;
00135 enum c_faddr_tag { c_faddrs_TAG = 1, };
00136 typedef struct c_faddr_instance {
00137 int tag;
00138 union {
00139 struct {
00140 char avoid_empty_structures;
00141 } c_faddrs;
00142 } u;
00143 } c_faddr_Instance;
00144 enum faddr_tag { index_faddr_TAG = 1, sdisps_faddr_TAG = 2, };
00145 typedef struct faddr_instance {
00146 int tag;
00147 union {
00148 struct {
00149 int x;
00150 int s;
00151 int b;
00152 } index_faddr;
00153 struct {
00154 int d;
00155 int s;
00156 int b;
00157 } sdisps_faddr;
00158 } u;
00159 } faddr_Instance;
00160 extern c_c_Instance c_cmpb_w(unsigned c3_16);
00161 extern c_c_Instance c_cmpb_dw(unsigned c3_16);
00162 extern c_c_Instance c_bbs_w(unsigned c_16);
00163 extern c_c_Instance c_bbs_dw(unsigned c_16);
00164 extern c_c_Instance c_arith_w(unsigned c3_16);
00165 extern c_c_Instance c_arith_dw(unsigned c3_16);
00166 extern c_c_Instance c_arith_none(void);
00167 extern c_null_Instance c_br_nnull(void);
00168 extern c_null_Instance c_br_null(void);
00169 extern c_wcr_Instance c_mfctl_w(void);
00170 extern c_wcr_Instance c_mfctl(unsigned r_06);
00171 extern c_bit_Instance c_bitpos_w(unsigned p_06);
00172 extern c_bit_Instance c_bitpos_dw(unsigned p_06);
00173 extern c_bit_Instance c_bitsar(void);
00174 extern c_addr_Instance c_addr_mb(void);
00175 extern c_addr_Instance c_addr_ma(void);
00176 extern c_addr_Instance c_addr_s(void);
00177 extern c_addr_Instance c_addr_m(void);
00178 extern c_addr_Instance c_addr_sm(void);
00179 extern addr_Instance addr_index(c_addr_Instance c_addr, int x, int ss, int b);
00180 extern addr_Instance addr_lsdisp(c_addr_Instance c_addr, int im5, int ss, int b);
00181 extern addr_Instance addr_ssdisp(c_addr_Instance c_addr, int im5, int ss, int b);
00182 extern addr_Instance addr_lldisp(c_addr_Instance c_addr, int ldisp, int ss, int b);
00183 extern addr_Instance addr_sldisp(c_addr_Instance c_addr, int ldisp, int ss, int b);
00184 extern addr_Instance addr_ldo(c_addr_Instance c_addr, int ldisp, int b);
00185 extern void NOP(void);
00186 extern void COPY(unsigned r_11, unsigned t_27);
00187 extern void ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00188 extern void ADD_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00189 extern void ADD_c(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00190 extern void ADD_c_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00191 extern void SHL1ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00192 extern void SHL1ADD_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00193 extern void SHL2ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00194 extern void SHL2ADD_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00195 extern void SHL3ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00196 extern void SHL3ADD_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00197 extern void SUB(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00198 extern void SUB_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00199 extern void SUB_t(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00200 extern void SUB_t_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00201 extern void SUB_b(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00202 extern void SUB_b_v(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00203 extern void DS(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00204 extern void ANDCM(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00205 extern void AND(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00206 extern void OR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00207 extern void XOR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00208 extern void UXOR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00209 extern void COMCLR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00210 extern void UADDCM(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00211 extern void UADDCMT(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00212 extern void ADD_l(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00213 extern void SHL1ADD_l(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00214 extern void SHL2ADD_l(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00215 extern void SHL3ADD_l(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00216 extern void DCOR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00217 extern void IDCOR(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00218 extern void HADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00219 extern void HADD_s(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00220 extern void HADD_u(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00221 extern void HSUB(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00222 extern void HSUB_s(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00223 extern void HSUB_u(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00224 extern void HAVG(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00225 extern void HSHL1ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00226 extern void HSHL2ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00227 extern void HSHL3ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00228 extern void HSHR1ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00229 extern void HSHR2ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00230 extern void HSHR3ADD(c_c_Instance c_c, unsigned r_11, unsigned r_06, unsigned t_27);
00231 extern void ADDI(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00232 extern void ADDI_v(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00233 extern void ADDI_t(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00234 extern void ADDI_t_v(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00235 extern void SUBI(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00236 extern void SUBI_v(c_c_Instance c_c, int imm11, unsigned r_06, unsigned t_11);
00237 extern void ADDIL(int imm21, unsigned r_06);
00238 extern void LDBX(addr_Instance addr, unsigned t_27);
00239 extern void LDHX(addr_Instance addr, unsigned t_27);
00240 extern void LDWX(addr_Instance addr, unsigned t_27);
00241 extern void LDWAX(addr_Instance addr, unsigned t_27);
00242 extern void LDCWX(addr_Instance addr, unsigned t_27);
00243 extern void LDBS(addr_Instance addr, unsigned t_27);
00244 extern void LDHS(addr_Instance addr, unsigned t_27);
00245 extern void LDWS(addr_Instance addr, unsigned t_27);
00246 extern void LDWAS(addr_Instance addr, unsigned t_27);
00247 extern void LDCWS(addr_Instance addr, unsigned t_27);
00248 extern void STBS(unsigned r_11, addr_Instance addr);
00249 extern void STHS(unsigned r_11, addr_Instance addr);
00250 extern void STWS(unsigned r_11, addr_Instance addr);
00251 extern void STBYS(unsigned r_11, addr_Instance addr);
00252 extern void STWAS(unsigned r_11, addr_Instance addr);
00253 extern void LDB(addr_Instance addr, unsigned t_11);
00254 extern void LDH(addr_Instance addr, unsigned t_11);
00255 extern void LDW(addr_Instance addr, unsigned t_11);
00256 extern void LDWM(addr_Instance addr, unsigned t_11);
00257 extern void LDO(addr_Instance addr, unsigned t_11);
00258 extern void STB(unsigned r_11, addr_Instance addr);
00259 extern void STH(unsigned r_11, addr_Instance addr);
00260 extern void STW(unsigned r_11, addr_Instance addr);
00261 extern void STWM(unsigned r_11, addr_Instance addr);
00262 extern void LDIL(int imm21, unsigned t_06);
00263 extern void BL(c_null_Instance c_null, int ubr_target, unsigned t_06);
00264 extern void GATE(c_null_Instance c_null, int ubr_target, unsigned t_06);
00265 extern void BL_PUSH(c_null_Instance c_null, int ubr_target, unsigned t_06);
00266 extern void BL_LONG(c_null_Instance c_null, int ubr_target);
00267 extern void BLR(c_null_Instance c_null, unsigned x_11, unsigned t_06);
00268 extern void BV(c_null_Instance c_null, unsigned x_11, unsigned b_06);
00269 extern void BVE(unsigned p_31, c_null_Instance c_null, unsigned b_06);
00270 extern void BVE_l(unsigned p_31, c_null_Instance c_null, unsigned b_06);
00271 extern void BE(c_null_Instance c_null, addr_Instance addr);
00272 extern void BLE(c_null_Instance c_null, addr_Instance addr);
00273 extern void BREAK(unsigned im5_27, unsigned im13_06);
00274 extern void SSM(unsigned im10_06, unsigned t_27);
00275 extern void RSM(unsigned im10_06, unsigned t_27);
00276 extern void RFI(void);
00277 extern void RFI_r(void);
00278 extern void SYNC(void);
00279 extern void SYNCDMA(void);
00280 extern void MTSM(unsigned r_11);
00281 extern void MTSARCM(unsigned r_11);
00282 extern void MFCTL(c_wcr_Instance c_wcr, unsigned t_27);
00283 extern void MFCTL_w(c_wcr_Instance c_wcr, unsigned t_27);
00284 extern void MTCTL(unsigned r_11, unsigned ct_06);
00285 extern void MFIA(unsigned t_27);
00286 extern void LDSID(unsigned s2_16, unsigned b_06, unsigned t_27);
00287 extern void MTSP(unsigned r_11, int sr);
00288 extern void MFSP(int sr, unsigned t_27);
00289 extern void COMBT(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, unsigned r_06, int target);
00290 extern void COMBF(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, unsigned r_06, int target);
00291 extern void CMPBdwt(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, unsigned r_06, int target);
00292 extern void CMPBdwf(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, unsigned r_06, int target);
00293 extern void COMIBT(c_c_Instance c_c, c_null_Instance c_null, unsigned im5_11, unsigned r_06, int target);
00294 extern void COMIBF(c_c_Instance c_c, c_null_Instance c_null, unsigned im5_11, unsigned r_06, int target);
00295 extern void CMPIBdw(c_c_Instance c_c, c_null_Instance c_null, unsigned im5_11, unsigned r_06, int target);
00296 extern void BB(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, c_bit_Instance c_bit, int target);
00297 extern void BVB(c_c_Instance c_c, c_null_Instance c_null, unsigned r_11, c_bit_Instance c_bit, int target);
00298 extern void FID(int fmt, int r, int t);
00299 extern void FCPY(int fmt, int r, int t);
00300 extern void FABS(int fmt, int r, int t);
00301 extern void FSQRT(int fmt, int r, int t);
00302 extern void FRND(int fmt, int r, int t);
00303 extern void FNEG(int fmt, int r, int t);
00304 extern void FNEGABS(int fmt, int r, int t);
00305 extern void FCPY_E(int f, int r, int t);
00306 extern void FABS_E(int f, int r, int t);
00307 extern void FSQRT_E(int f, int r, int t);
00308 extern void FRND_E(int f, int r, int t);
00309 extern void FNEG_E(int f, int r, int t);
00310 extern void FNEGABS_E(int f, int r, int t);
00311 extern void FCNVFF(int sf, int df, int r, int t);
00312 extern void FCNVXF(int sf, int df, int r, int t);
00313 extern void FCNVFX(int sf, int df, int r, int t);
00314 extern void FCNVFXT(int sf, int df, int r, int t);
00315 extern void FCNVFF_E(int sf, int df, int r, int t);
00316 extern void FCNVXF_E(int sf, int df, int r, int t);
00317 extern void FCNVFX_E(int sf, int df, int r, int t);
00318 extern void FCNVFXT_E(int sf, int df, int r, int t);
00319 extern void FCMP(int fmt, int c, int r1, int r2);
00320 extern void FTEST(int fmt, int c, int r1, int r2);
00321 extern void FCMP_E(unsigned f_20, int c, int r1, int r2);
00322 extern void FTEST_E(unsigned f_20, int c, int r1, int r2);
00323 extern void FADD(int fmt, int r1, int r2, int t);
00324 extern void FSUB(int fmt, int r1, int r2, int t);
00325 extern void FMPY(int fmt, int r1, int r2, int t);
00326 extern void FDIV(int fmt, int r1, int r2, int t);
00327 extern void FADD_E(int fmt, int r1, int r2, int t);
00328 extern void FSUB_E(int fmt, int r1, int r2, int t);
00329 extern void FMPY_E(int fmt, int r1, int r2, int t);
00330 extern void FDIV_E(int fmt, int r1, int r2, int t);
00331 extern c_faddr_Instance c_faddrs(void);
00332 extern faddr_Instance index_faddr(int x, int s, int b);
00333 extern faddr_Instance sdisps_faddr(int d, int s, int b);
00334 extern void FLDWX(c_faddr_Instance c_faddr, faddr_Instance faddr, unsigned t_27);
00335 extern void FLDDX(c_faddr_Instance c_faddr, faddr_Instance faddr, unsigned t_27);
00336 extern void FLDWS(c_faddr_Instance c_faddr, faddr_Instance faddr, unsigned t_27);
00337 extern void FLDDS(c_faddr_Instance c_faddr, faddr_Instance faddr, unsigned t_27);
00338 extern void FSTWX(c_faddr_Instance c_faddr, int r, faddr_Instance faddr);
00339 extern void FSTDX(c_faddr_Instance c_faddr, int r, faddr_Instance faddr);
00340 extern void FSTWS(c_faddr_Instance c_faddr, int r, faddr_Instance faddr);
00341 extern void FSTDS(c_faddr_Instance c_faddr, int r, faddr_Instance faddr);