1 DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int) 2 DEF_HELPER_2(raise_exception, noreturn, env, i32) 3 DEF_HELPER_1(raise_exception_debug, noreturn, env) 4 5 #ifdef TARGET_MIPS64 6 DEF_HELPER_4(sdl, void, env, tl, tl, int) 7 DEF_HELPER_4(sdr, void, env, tl, tl, int) 8 #endif 9 DEF_HELPER_4(swl, void, env, tl, tl, int) 10 DEF_HELPER_4(swr, void, env, tl, tl, int) 11 12 #ifndef CONFIG_USER_ONLY 13 DEF_HELPER_3(ll, tl, env, tl, int) 14 #ifdef TARGET_MIPS64 15 DEF_HELPER_3(lld, tl, env, tl, int) 16 #endif 17 #endif 18 19 DEF_HELPER_FLAGS_1(bitswap, TCG_CALL_NO_RWG_SE, tl, tl) 20 #ifdef TARGET_MIPS64 21 DEF_HELPER_FLAGS_1(dbitswap, TCG_CALL_NO_RWG_SE, tl, tl) 22 #endif 23 24 DEF_HELPER_FLAGS_4(rotx, TCG_CALL_NO_RWG_SE, tl, tl, i32, i32, i32) 25 26 /* microMIPS functions */ 27 DEF_HELPER_4(lwm, void, env, tl, tl, i32) 28 DEF_HELPER_4(swm, void, env, tl, tl, i32) 29 #ifdef TARGET_MIPS64 30 DEF_HELPER_4(ldm, void, env, tl, tl, i32) 31 DEF_HELPER_4(sdm, void, env, tl, tl, i32) 32 #endif 33 34 DEF_HELPER_2(fork, void, tl, tl) 35 DEF_HELPER_2(yield, tl, env, tl) 36 37 /* CP1 functions */ 38 DEF_HELPER_2(cfc1, tl, env, i32) 39 DEF_HELPER_4(ctc1, void, env, tl, i32, i32) 40 41 DEF_HELPER_2(float_cvtd_s, i64, env, i32) 42 DEF_HELPER_2(float_cvtd_w, i64, env, i32) 43 DEF_HELPER_2(float_cvtd_l, i64, env, i64) 44 DEF_HELPER_2(float_cvtps_pw, i64, env, i64) 45 DEF_HELPER_2(float_cvtpw_ps, i64, env, i64) 46 DEF_HELPER_2(float_cvts_d, i32, env, i64) 47 DEF_HELPER_2(float_cvts_w, i32, env, i32) 48 DEF_HELPER_2(float_cvts_l, i32, env, i64) 49 DEF_HELPER_2(float_cvts_pl, i32, env, i32) 50 DEF_HELPER_2(float_cvts_pu, i32, env, i32) 51 52 DEF_HELPER_3(float_addr_ps, i64, env, i64, i64) 53 DEF_HELPER_3(float_mulr_ps, i64, env, i64, i64) 54 55 DEF_HELPER_FLAGS_2(float_class_s, TCG_CALL_NO_RWG_SE, i32, env, i32) 56 DEF_HELPER_FLAGS_2(float_class_d, TCG_CALL_NO_RWG_SE, i64, env, i64) 57 58 #define FOP_PROTO(op) \ 59 DEF_HELPER_4(float_ ## op ## _s, i32, env, i32, i32, i32) \ 60 DEF_HELPER_4(float_ ## op ## _d, i64, env, i64, i64, i64) 61 FOP_PROTO(maddf) 62 FOP_PROTO(msubf) 63 #undef FOP_PROTO 64 65 #define FOP_PROTO(op) \ 66 DEF_HELPER_3(float_ ## op ## _s, i32, env, i32, i32) \ 67 DEF_HELPER_3(float_ ## op ## _d, i64, env, i64, i64) 68 FOP_PROTO(max) 69 FOP_PROTO(maxa) 70 FOP_PROTO(min) 71 FOP_PROTO(mina) 72 #undef FOP_PROTO 73 74 #define FOP_PROTO(op) \ 75 DEF_HELPER_2(float_ ## op ## _l_s, i64, env, i32) \ 76 DEF_HELPER_2(float_ ## op ## _l_d, i64, env, i64) \ 77 DEF_HELPER_2(float_ ## op ## _w_s, i32, env, i32) \ 78 DEF_HELPER_2(float_ ## op ## _w_d, i32, env, i64) 79 FOP_PROTO(cvt) 80 FOP_PROTO(round) 81 FOP_PROTO(trunc) 82 FOP_PROTO(ceil) 83 FOP_PROTO(floor) 84 FOP_PROTO(cvt_2008) 85 FOP_PROTO(round_2008) 86 FOP_PROTO(trunc_2008) 87 FOP_PROTO(ceil_2008) 88 FOP_PROTO(floor_2008) 89 #undef FOP_PROTO 90 91 #define FOP_PROTO(op) \ 92 DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \ 93 DEF_HELPER_2(float_ ## op ## _d, i64, env, i64) 94 FOP_PROTO(sqrt) 95 FOP_PROTO(rsqrt) 96 FOP_PROTO(recip) 97 FOP_PROTO(rint) 98 #undef FOP_PROTO 99 100 #define FOP_PROTO(op) \ 101 DEF_HELPER_1(float_ ## op ## _s, i32, i32) \ 102 DEF_HELPER_1(float_ ## op ## _d, i64, i64) \ 103 DEF_HELPER_1(float_ ## op ## _ps, i64, i64) 104 FOP_PROTO(abs) 105 FOP_PROTO(chs) 106 #undef FOP_PROTO 107 108 #define FOP_PROTO(op) \ 109 DEF_HELPER_2(float_ ## op ## _s, i32, env, i32) \ 110 DEF_HELPER_2(float_ ## op ## _d, i64, env, i64) \ 111 DEF_HELPER_2(float_ ## op ## _ps, i64, env, i64) 112 FOP_PROTO(recip1) 113 FOP_PROTO(rsqrt1) 114 #undef FOP_PROTO 115 116 #define FOP_PROTO(op) \ 117 DEF_HELPER_3(float_ ## op ## _s, i32, env, i32, i32) \ 118 DEF_HELPER_3(float_ ## op ## _d, i64, env, i64, i64) \ 119 DEF_HELPER_3(float_ ## op ## _ps, i64, env, i64, i64) 120 FOP_PROTO(add) 121 FOP_PROTO(sub) 122 FOP_PROTO(mul) 123 FOP_PROTO(div) 124 FOP_PROTO(recip2) 125 FOP_PROTO(rsqrt2) 126 #undef FOP_PROTO 127 128 #define FOP_PROTO(op) \ 129 DEF_HELPER_4(float_ ## op ## _s, i32, env, i32, i32, i32) \ 130 DEF_HELPER_4(float_ ## op ## _d, i64, env, i64, i64, i64) \ 131 DEF_HELPER_4(float_ ## op ## _ps, i64, env, i64, i64, i64) 132 FOP_PROTO(madd) 133 FOP_PROTO(msub) 134 FOP_PROTO(nmadd) 135 FOP_PROTO(nmsub) 136 #undef FOP_PROTO 137 138 #define FOP_PROTO(op) \ 139 DEF_HELPER_4(cmp_d_ ## op, void, env, i64, i64, int) \ 140 DEF_HELPER_4(cmpabs_d_ ## op, void, env, i64, i64, int) \ 141 DEF_HELPER_4(cmp_s_ ## op, void, env, i32, i32, int) \ 142 DEF_HELPER_4(cmpabs_s_ ## op, void, env, i32, i32, int) \ 143 DEF_HELPER_4(cmp_ps_ ## op, void, env, i64, i64, int) \ 144 DEF_HELPER_4(cmpabs_ps_ ## op, void, env, i64, i64, int) 145 FOP_PROTO(f) 146 FOP_PROTO(un) 147 FOP_PROTO(eq) 148 FOP_PROTO(ueq) 149 FOP_PROTO(olt) 150 FOP_PROTO(ult) 151 FOP_PROTO(ole) 152 FOP_PROTO(ule) 153 FOP_PROTO(sf) 154 FOP_PROTO(ngle) 155 FOP_PROTO(seq) 156 FOP_PROTO(ngl) 157 FOP_PROTO(lt) 158 FOP_PROTO(nge) 159 FOP_PROTO(le) 160 FOP_PROTO(ngt) 161 #undef FOP_PROTO 162 163 #define FOP_PROTO(op) \ 164 DEF_HELPER_3(r6_cmp_d_ ## op, i64, env, i64, i64) \ 165 DEF_HELPER_3(r6_cmp_s_ ## op, i32, env, i32, i32) 166 FOP_PROTO(af) 167 FOP_PROTO(un) 168 FOP_PROTO(eq) 169 FOP_PROTO(ueq) 170 FOP_PROTO(lt) 171 FOP_PROTO(ult) 172 FOP_PROTO(le) 173 FOP_PROTO(ule) 174 FOP_PROTO(saf) 175 FOP_PROTO(sun) 176 FOP_PROTO(seq) 177 FOP_PROTO(sueq) 178 FOP_PROTO(slt) 179 FOP_PROTO(sult) 180 FOP_PROTO(sle) 181 FOP_PROTO(sule) 182 FOP_PROTO(or) 183 FOP_PROTO(une) 184 FOP_PROTO(ne) 185 FOP_PROTO(sor) 186 FOP_PROTO(sune) 187 FOP_PROTO(sne) 188 #undef FOP_PROTO 189 190 DEF_HELPER_1(rdhwr_cpunum, tl, env) 191 DEF_HELPER_1(rdhwr_synci_step, tl, env) 192 DEF_HELPER_1(rdhwr_cc, tl, env) 193 DEF_HELPER_1(rdhwr_ccres, tl, env) 194 DEF_HELPER_1(rdhwr_performance, tl, env) 195 DEF_HELPER_1(rdhwr_xnp, tl, env) 196 DEF_HELPER_2(pmon, void, env, int) 197 DEF_HELPER_1(wait, void, env) 198 199 #ifdef TARGET_MIPS64 200 DEF_HELPER_FLAGS_2(lcsr_cpucfg, TCG_CALL_NO_RWG_SE, tl, env, tl) 201 #endif 202 203 /* Loongson multimedia functions. */ 204 DEF_HELPER_FLAGS_2(paddsh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 205 DEF_HELPER_FLAGS_2(paddush, TCG_CALL_NO_RWG_SE, i64, i64, i64) 206 DEF_HELPER_FLAGS_2(paddh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 207 DEF_HELPER_FLAGS_2(paddw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 208 DEF_HELPER_FLAGS_2(paddsb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 209 DEF_HELPER_FLAGS_2(paddusb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 210 DEF_HELPER_FLAGS_2(paddb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 211 212 DEF_HELPER_FLAGS_2(psubsh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 213 DEF_HELPER_FLAGS_2(psubush, TCG_CALL_NO_RWG_SE, i64, i64, i64) 214 DEF_HELPER_FLAGS_2(psubh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 215 DEF_HELPER_FLAGS_2(psubw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 216 DEF_HELPER_FLAGS_2(psubsb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 217 DEF_HELPER_FLAGS_2(psubusb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 218 DEF_HELPER_FLAGS_2(psubb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 219 220 DEF_HELPER_FLAGS_2(pshufh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 221 DEF_HELPER_FLAGS_2(packsswh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 222 DEF_HELPER_FLAGS_2(packsshb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 223 DEF_HELPER_FLAGS_2(packushb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 224 225 DEF_HELPER_FLAGS_2(punpcklhw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 226 DEF_HELPER_FLAGS_2(punpckhhw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 227 DEF_HELPER_FLAGS_2(punpcklbh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 228 DEF_HELPER_FLAGS_2(punpckhbh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 229 DEF_HELPER_FLAGS_2(punpcklwd, TCG_CALL_NO_RWG_SE, i64, i64, i64) 230 DEF_HELPER_FLAGS_2(punpckhwd, TCG_CALL_NO_RWG_SE, i64, i64, i64) 231 232 DEF_HELPER_FLAGS_2(pavgh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 233 DEF_HELPER_FLAGS_2(pavgb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 234 DEF_HELPER_FLAGS_2(pmaxsh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 235 DEF_HELPER_FLAGS_2(pminsh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 236 DEF_HELPER_FLAGS_2(pmaxub, TCG_CALL_NO_RWG_SE, i64, i64, i64) 237 DEF_HELPER_FLAGS_2(pminub, TCG_CALL_NO_RWG_SE, i64, i64, i64) 238 239 DEF_HELPER_FLAGS_2(pcmpeqw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 240 DEF_HELPER_FLAGS_2(pcmpgtw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 241 DEF_HELPER_FLAGS_2(pcmpeqh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 242 DEF_HELPER_FLAGS_2(pcmpgth, TCG_CALL_NO_RWG_SE, i64, i64, i64) 243 DEF_HELPER_FLAGS_2(pcmpeqb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 244 DEF_HELPER_FLAGS_2(pcmpgtb, TCG_CALL_NO_RWG_SE, i64, i64, i64) 245 246 DEF_HELPER_FLAGS_2(psllw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 247 DEF_HELPER_FLAGS_2(psllh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 248 DEF_HELPER_FLAGS_2(psrlw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 249 DEF_HELPER_FLAGS_2(psrlh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 250 DEF_HELPER_FLAGS_2(psraw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 251 DEF_HELPER_FLAGS_2(psrah, TCG_CALL_NO_RWG_SE, i64, i64, i64) 252 253 DEF_HELPER_FLAGS_2(pmullh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 254 DEF_HELPER_FLAGS_2(pmulhh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 255 DEF_HELPER_FLAGS_2(pmulhuh, TCG_CALL_NO_RWG_SE, i64, i64, i64) 256 DEF_HELPER_FLAGS_2(pmaddhw, TCG_CALL_NO_RWG_SE, i64, i64, i64) 257 258 DEF_HELPER_FLAGS_2(pasubub, TCG_CALL_NO_RWG_SE, i64, i64, i64) 259 DEF_HELPER_FLAGS_1(biadd, TCG_CALL_NO_RWG_SE, i64, i64) 260 DEF_HELPER_FLAGS_1(pmovmskb, TCG_CALL_NO_RWG_SE, i64, i64) 261 262 /*** MIPS DSP ***/ 263 /* DSP Arithmetic Sub-class insns */ 264 DEF_HELPER_FLAGS_3(addq_ph, 0, tl, tl, tl, env) 265 DEF_HELPER_FLAGS_3(addq_s_ph, 0, tl, tl, tl, env) 266 #if defined(TARGET_MIPS64) 267 DEF_HELPER_FLAGS_3(addq_qh, 0, tl, tl, tl, env) 268 DEF_HELPER_FLAGS_3(addq_s_qh, 0, tl, tl, tl, env) 269 #endif 270 DEF_HELPER_FLAGS_3(addq_s_w, 0, tl, tl, tl, env) 271 #if defined(TARGET_MIPS64) 272 DEF_HELPER_FLAGS_3(addq_pw, 0, tl, tl, tl, env) 273 DEF_HELPER_FLAGS_3(addq_s_pw, 0, tl, tl, tl, env) 274 #endif 275 DEF_HELPER_FLAGS_3(addu_qb, 0, tl, tl, tl, env) 276 DEF_HELPER_FLAGS_3(addu_s_qb, 0, tl, tl, tl, env) 277 DEF_HELPER_FLAGS_2(adduh_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 278 DEF_HELPER_FLAGS_2(adduh_r_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 279 DEF_HELPER_FLAGS_3(addu_ph, 0, tl, tl, tl, env) 280 DEF_HELPER_FLAGS_3(addu_s_ph, 0, tl, tl, tl, env) 281 DEF_HELPER_FLAGS_2(addqh_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 282 DEF_HELPER_FLAGS_2(addqh_r_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 283 DEF_HELPER_FLAGS_2(addqh_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 284 DEF_HELPER_FLAGS_2(addqh_r_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 285 #if defined(TARGET_MIPS64) 286 DEF_HELPER_FLAGS_3(addu_ob, 0, tl, tl, tl, env) 287 DEF_HELPER_FLAGS_3(addu_s_ob, 0, tl, tl, tl, env) 288 DEF_HELPER_FLAGS_2(adduh_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 289 DEF_HELPER_FLAGS_2(adduh_r_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 290 DEF_HELPER_FLAGS_3(addu_qh, 0, tl, tl, tl, env) 291 DEF_HELPER_FLAGS_3(addu_s_qh, 0, tl, tl, tl, env) 292 #endif 293 DEF_HELPER_FLAGS_3(subq_ph, 0, tl, tl, tl, env) 294 DEF_HELPER_FLAGS_3(subq_s_ph, 0, tl, tl, tl, env) 295 #if defined(TARGET_MIPS64) 296 DEF_HELPER_FLAGS_3(subq_qh, 0, tl, tl, tl, env) 297 DEF_HELPER_FLAGS_3(subq_s_qh, 0, tl, tl, tl, env) 298 #endif 299 DEF_HELPER_FLAGS_3(subq_s_w, 0, tl, tl, tl, env) 300 #if defined(TARGET_MIPS64) 301 DEF_HELPER_FLAGS_3(subq_pw, 0, tl, tl, tl, env) 302 DEF_HELPER_FLAGS_3(subq_s_pw, 0, tl, tl, tl, env) 303 #endif 304 DEF_HELPER_FLAGS_3(subu_qb, 0, tl, tl, tl, env) 305 DEF_HELPER_FLAGS_3(subu_s_qb, 0, tl, tl, tl, env) 306 DEF_HELPER_FLAGS_2(subuh_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 307 DEF_HELPER_FLAGS_2(subuh_r_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 308 DEF_HELPER_FLAGS_3(subu_ph, 0, tl, tl, tl, env) 309 DEF_HELPER_FLAGS_3(subu_s_ph, 0, tl, tl, tl, env) 310 DEF_HELPER_FLAGS_2(subqh_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 311 DEF_HELPER_FLAGS_2(subqh_r_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 312 DEF_HELPER_FLAGS_2(subqh_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 313 DEF_HELPER_FLAGS_2(subqh_r_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 314 #if defined(TARGET_MIPS64) 315 DEF_HELPER_FLAGS_3(subu_ob, 0, tl, tl, tl, env) 316 DEF_HELPER_FLAGS_3(subu_s_ob, 0, tl, tl, tl, env) 317 DEF_HELPER_FLAGS_2(subuh_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 318 DEF_HELPER_FLAGS_2(subuh_r_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 319 DEF_HELPER_FLAGS_3(subu_qh, 0, tl, tl, tl, env) 320 DEF_HELPER_FLAGS_3(subu_s_qh, 0, tl, tl, tl, env) 321 #endif 322 DEF_HELPER_FLAGS_3(addsc, 0, tl, tl, tl, env) 323 DEF_HELPER_FLAGS_3(addwc, 0, tl, tl, tl, env) 324 DEF_HELPER_FLAGS_2(modsub, TCG_CALL_NO_RWG_SE, tl, tl, tl) 325 DEF_HELPER_FLAGS_1(raddu_w_qb, TCG_CALL_NO_RWG_SE, tl, tl) 326 #if defined(TARGET_MIPS64) 327 DEF_HELPER_FLAGS_1(raddu_l_ob, TCG_CALL_NO_RWG_SE, tl, tl) 328 #endif 329 DEF_HELPER_FLAGS_2(absq_s_qb, 0, tl, tl, env) 330 DEF_HELPER_FLAGS_2(absq_s_ph, 0, tl, tl, env) 331 DEF_HELPER_FLAGS_2(absq_s_w, 0, tl, tl, env) 332 #if defined(TARGET_MIPS64) 333 DEF_HELPER_FLAGS_2(absq_s_ob, 0, tl, tl, env) 334 DEF_HELPER_FLAGS_2(absq_s_qh, 0, tl, tl, env) 335 DEF_HELPER_FLAGS_2(absq_s_pw, 0, tl, tl, env) 336 #endif 337 DEF_HELPER_FLAGS_2(precr_qb_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 338 DEF_HELPER_FLAGS_2(precrq_qb_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 339 DEF_HELPER_FLAGS_3(precr_sra_ph_w, TCG_CALL_NO_RWG_SE, 340 tl, i32, tl, tl) 341 DEF_HELPER_FLAGS_3(precr_sra_r_ph_w, TCG_CALL_NO_RWG_SE, 342 tl, i32, tl, tl) 343 DEF_HELPER_FLAGS_2(precrq_ph_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 344 DEF_HELPER_FLAGS_3(precrq_rs_ph_w, 0, tl, tl, tl, env) 345 #if defined(TARGET_MIPS64) 346 DEF_HELPER_FLAGS_2(precr_ob_qh, TCG_CALL_NO_RWG_SE, tl, tl, tl) 347 DEF_HELPER_FLAGS_3(precr_sra_qh_pw, 348 TCG_CALL_NO_RWG_SE, tl, tl, tl, i32) 349 DEF_HELPER_FLAGS_3(precr_sra_r_qh_pw, 350 TCG_CALL_NO_RWG_SE, tl, tl, tl, i32) 351 DEF_HELPER_FLAGS_2(precrq_ob_qh, TCG_CALL_NO_RWG_SE, tl, tl, tl) 352 DEF_HELPER_FLAGS_2(precrq_qh_pw, TCG_CALL_NO_RWG_SE, tl, tl, tl) 353 DEF_HELPER_FLAGS_3(precrq_rs_qh_pw, 354 TCG_CALL_NO_RWG_SE, tl, tl, tl, env) 355 DEF_HELPER_FLAGS_2(precrq_pw_l, TCG_CALL_NO_RWG_SE, tl, tl, tl) 356 #endif 357 DEF_HELPER_FLAGS_3(precrqu_s_qb_ph, 0, tl, tl, tl, env) 358 #if defined(TARGET_MIPS64) 359 DEF_HELPER_FLAGS_3(precrqu_s_ob_qh, 360 TCG_CALL_NO_RWG_SE, tl, tl, tl, env) 361 362 DEF_HELPER_FLAGS_1(preceq_pw_qhl, TCG_CALL_NO_RWG_SE, tl, tl) 363 DEF_HELPER_FLAGS_1(preceq_pw_qhr, TCG_CALL_NO_RWG_SE, tl, tl) 364 DEF_HELPER_FLAGS_1(preceq_pw_qhla, TCG_CALL_NO_RWG_SE, tl, tl) 365 DEF_HELPER_FLAGS_1(preceq_pw_qhra, TCG_CALL_NO_RWG_SE, tl, tl) 366 #endif 367 DEF_HELPER_FLAGS_1(precequ_ph_qbl, TCG_CALL_NO_RWG_SE, tl, tl) 368 DEF_HELPER_FLAGS_1(precequ_ph_qbr, TCG_CALL_NO_RWG_SE, tl, tl) 369 DEF_HELPER_FLAGS_1(precequ_ph_qbla, TCG_CALL_NO_RWG_SE, tl, tl) 370 DEF_HELPER_FLAGS_1(precequ_ph_qbra, TCG_CALL_NO_RWG_SE, tl, tl) 371 #if defined(TARGET_MIPS64) 372 DEF_HELPER_FLAGS_1(precequ_qh_obl, TCG_CALL_NO_RWG_SE, tl, tl) 373 DEF_HELPER_FLAGS_1(precequ_qh_obr, TCG_CALL_NO_RWG_SE, tl, tl) 374 DEF_HELPER_FLAGS_1(precequ_qh_obla, TCG_CALL_NO_RWG_SE, tl, tl) 375 DEF_HELPER_FLAGS_1(precequ_qh_obra, TCG_CALL_NO_RWG_SE, tl, tl) 376 #endif 377 DEF_HELPER_FLAGS_1(preceu_ph_qbl, TCG_CALL_NO_RWG_SE, tl, tl) 378 DEF_HELPER_FLAGS_1(preceu_ph_qbr, TCG_CALL_NO_RWG_SE, tl, tl) 379 DEF_HELPER_FLAGS_1(preceu_ph_qbla, TCG_CALL_NO_RWG_SE, tl, tl) 380 DEF_HELPER_FLAGS_1(preceu_ph_qbra, TCG_CALL_NO_RWG_SE, tl, tl) 381 #if defined(TARGET_MIPS64) 382 DEF_HELPER_FLAGS_1(preceu_qh_obl, TCG_CALL_NO_RWG_SE, tl, tl) 383 DEF_HELPER_FLAGS_1(preceu_qh_obr, TCG_CALL_NO_RWG_SE, tl, tl) 384 DEF_HELPER_FLAGS_1(preceu_qh_obla, TCG_CALL_NO_RWG_SE, tl, tl) 385 DEF_HELPER_FLAGS_1(preceu_qh_obra, TCG_CALL_NO_RWG_SE, tl, tl) 386 #endif 387 388 /* DSP GPR-Based Shift Sub-class insns */ 389 DEF_HELPER_FLAGS_3(shll_qb, 0, tl, tl, tl, env) 390 #if defined(TARGET_MIPS64) 391 DEF_HELPER_FLAGS_3(shll_ob, 0, tl, tl, tl, env) 392 #endif 393 DEF_HELPER_FLAGS_3(shll_ph, 0, tl, tl, tl, env) 394 DEF_HELPER_FLAGS_3(shll_s_ph, 0, tl, tl, tl, env) 395 #if defined(TARGET_MIPS64) 396 DEF_HELPER_FLAGS_3(shll_qh, 0, tl, tl, tl, env) 397 DEF_HELPER_FLAGS_3(shll_s_qh, 0, tl, tl, tl, env) 398 #endif 399 DEF_HELPER_FLAGS_3(shll_s_w, 0, tl, tl, tl, env) 400 #if defined(TARGET_MIPS64) 401 DEF_HELPER_FLAGS_3(shll_pw, 0, tl, tl, tl, env) 402 DEF_HELPER_FLAGS_3(shll_s_pw, 0, tl, tl, tl, env) 403 #endif 404 DEF_HELPER_FLAGS_2(shrl_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 405 DEF_HELPER_FLAGS_2(shrl_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 406 #if defined(TARGET_MIPS64) 407 DEF_HELPER_FLAGS_2(shrl_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 408 DEF_HELPER_FLAGS_2(shrl_qh, TCG_CALL_NO_RWG_SE, tl, tl, tl) 409 #endif 410 DEF_HELPER_FLAGS_2(shra_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 411 DEF_HELPER_FLAGS_2(shra_r_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 412 #if defined(TARGET_MIPS64) 413 DEF_HELPER_FLAGS_2(shra_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 414 DEF_HELPER_FLAGS_2(shra_r_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 415 #endif 416 DEF_HELPER_FLAGS_2(shra_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 417 DEF_HELPER_FLAGS_2(shra_r_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 418 DEF_HELPER_FLAGS_2(shra_r_w, TCG_CALL_NO_RWG_SE, tl, tl, tl) 419 #if defined(TARGET_MIPS64) 420 DEF_HELPER_FLAGS_2(shra_qh, TCG_CALL_NO_RWG_SE, tl, tl, tl) 421 DEF_HELPER_FLAGS_2(shra_r_qh, TCG_CALL_NO_RWG_SE, tl, tl, tl) 422 DEF_HELPER_FLAGS_2(shra_pw, TCG_CALL_NO_RWG_SE, tl, tl, tl) 423 DEF_HELPER_FLAGS_2(shra_r_pw, TCG_CALL_NO_RWG_SE, tl, tl, tl) 424 #endif 425 426 /* DSP Multiply Sub-class insns */ 427 DEF_HELPER_FLAGS_3(muleu_s_ph_qbl, 0, tl, tl, tl, env) 428 DEF_HELPER_FLAGS_3(muleu_s_ph_qbr, 0, tl, tl, tl, env) 429 #if defined(TARGET_MIPS64) 430 DEF_HELPER_FLAGS_3(muleu_s_qh_obl, 0, tl, tl, tl, env) 431 DEF_HELPER_FLAGS_3(muleu_s_qh_obr, 0, tl, tl, tl, env) 432 #endif 433 DEF_HELPER_FLAGS_3(mulq_rs_ph, 0, tl, tl, tl, env) 434 #if defined(TARGET_MIPS64) 435 DEF_HELPER_FLAGS_3(mulq_rs_qh, 0, tl, tl, tl, env) 436 #endif 437 DEF_HELPER_FLAGS_3(muleq_s_w_phl, 0, tl, tl, tl, env) 438 DEF_HELPER_FLAGS_3(muleq_s_w_phr, 0, tl, tl, tl, env) 439 #if defined(TARGET_MIPS64) 440 DEF_HELPER_FLAGS_3(muleq_s_pw_qhl, 0, tl, tl, tl, env) 441 DEF_HELPER_FLAGS_3(muleq_s_pw_qhr, 0, tl, tl, tl, env) 442 #endif 443 DEF_HELPER_FLAGS_4(dpau_h_qbl, 0, void, i32, tl, tl, env) 444 DEF_HELPER_FLAGS_4(dpau_h_qbr, 0, void, i32, tl, tl, env) 445 #if defined(TARGET_MIPS64) 446 DEF_HELPER_FLAGS_4(dpau_h_obl, 0, void, tl, tl, i32, env) 447 DEF_HELPER_FLAGS_4(dpau_h_obr, 0, void, tl, tl, i32, env) 448 #endif 449 DEF_HELPER_FLAGS_4(dpsu_h_qbl, 0, void, i32, tl, tl, env) 450 DEF_HELPER_FLAGS_4(dpsu_h_qbr, 0, void, i32, tl, tl, env) 451 #if defined(TARGET_MIPS64) 452 DEF_HELPER_FLAGS_4(dpsu_h_obl, 0, void, tl, tl, i32, env) 453 DEF_HELPER_FLAGS_4(dpsu_h_obr, 0, void, tl, tl, i32, env) 454 #endif 455 DEF_HELPER_FLAGS_4(dpa_w_ph, 0, void, i32, tl, tl, env) 456 #if defined(TARGET_MIPS64) 457 DEF_HELPER_FLAGS_4(dpa_w_qh, 0, void, tl, tl, i32, env) 458 #endif 459 DEF_HELPER_FLAGS_4(dpax_w_ph, 0, void, i32, tl, tl, env) 460 DEF_HELPER_FLAGS_4(dpaq_s_w_ph, 0, void, i32, tl, tl, env) 461 #if defined(TARGET_MIPS64) 462 DEF_HELPER_FLAGS_4(dpaq_s_w_qh, 0, void, tl, tl, i32, env) 463 #endif 464 DEF_HELPER_FLAGS_4(dpaqx_s_w_ph, 0, void, i32, tl, tl, env) 465 DEF_HELPER_FLAGS_4(dpaqx_sa_w_ph, 0, void, i32, tl, tl, env) 466 DEF_HELPER_FLAGS_4(dps_w_ph, 0, void, i32, tl, tl, env) 467 #if defined(TARGET_MIPS64) 468 DEF_HELPER_FLAGS_4(dps_w_qh, 0, void, tl, tl, i32, env) 469 #endif 470 DEF_HELPER_FLAGS_4(dpsx_w_ph, 0, void, i32, tl, tl, env) 471 DEF_HELPER_FLAGS_4(dpsq_s_w_ph, 0, void, i32, tl, tl, env) 472 #if defined(TARGET_MIPS64) 473 DEF_HELPER_FLAGS_4(dpsq_s_w_qh, 0, void, tl, tl, i32, env) 474 #endif 475 DEF_HELPER_FLAGS_4(dpsqx_s_w_ph, 0, void, i32, tl, tl, env) 476 DEF_HELPER_FLAGS_4(dpsqx_sa_w_ph, 0, void, i32, tl, tl, env) 477 DEF_HELPER_FLAGS_4(mulsaq_s_w_ph, 0, void, i32, tl, tl, env) 478 #if defined(TARGET_MIPS64) 479 DEF_HELPER_FLAGS_4(mulsaq_s_w_qh, 0, void, tl, tl, i32, env) 480 #endif 481 DEF_HELPER_FLAGS_4(dpaq_sa_l_w, 0, void, i32, tl, tl, env) 482 #if defined(TARGET_MIPS64) 483 DEF_HELPER_FLAGS_4(dpaq_sa_l_pw, 0, void, tl, tl, i32, env) 484 #endif 485 DEF_HELPER_FLAGS_4(dpsq_sa_l_w, 0, void, i32, tl, tl, env) 486 #if defined(TARGET_MIPS64) 487 DEF_HELPER_FLAGS_4(dpsq_sa_l_pw, 0, void, tl, tl, i32, env) 488 DEF_HELPER_FLAGS_4(mulsaq_s_l_pw, 0, void, tl, tl, i32, env) 489 #endif 490 DEF_HELPER_FLAGS_4(maq_s_w_phl, 0, void, i32, tl, tl, env) 491 DEF_HELPER_FLAGS_4(maq_s_w_phr, 0, void, i32, tl, tl, env) 492 DEF_HELPER_FLAGS_4(maq_sa_w_phl, 0, void, i32, tl, tl, env) 493 DEF_HELPER_FLAGS_4(maq_sa_w_phr, 0, void, i32, tl, tl, env) 494 DEF_HELPER_FLAGS_3(mul_ph, 0, tl, tl, tl, env) 495 DEF_HELPER_FLAGS_3(mul_s_ph, 0, tl, tl, tl, env) 496 DEF_HELPER_FLAGS_3(mulq_s_ph, 0, tl, tl, tl, env) 497 DEF_HELPER_FLAGS_3(mulq_s_w, 0, tl, tl, tl, env) 498 DEF_HELPER_FLAGS_3(mulq_rs_w, 0, tl, tl, tl, env) 499 DEF_HELPER_FLAGS_4(mulsa_w_ph, 0, void, i32, tl, tl, env) 500 #if defined(TARGET_MIPS64) 501 DEF_HELPER_FLAGS_4(maq_s_w_qhll, 0, void, tl, tl, i32, env) 502 DEF_HELPER_FLAGS_4(maq_s_w_qhlr, 0, void, tl, tl, i32, env) 503 DEF_HELPER_FLAGS_4(maq_s_w_qhrl, 0, void, tl, tl, i32, env) 504 DEF_HELPER_FLAGS_4(maq_s_w_qhrr, 0, void, tl, tl, i32, env) 505 DEF_HELPER_FLAGS_4(maq_sa_w_qhll, 0, void, tl, tl, i32, env) 506 DEF_HELPER_FLAGS_4(maq_sa_w_qhlr, 0, void, tl, tl, i32, env) 507 DEF_HELPER_FLAGS_4(maq_sa_w_qhrl, 0, void, tl, tl, i32, env) 508 DEF_HELPER_FLAGS_4(maq_sa_w_qhrr, 0, void, tl, tl, i32, env) 509 DEF_HELPER_FLAGS_4(maq_s_l_pwl, 0, void, tl, tl, i32, env) 510 DEF_HELPER_FLAGS_4(maq_s_l_pwr, 0, void, tl, tl, i32, env) 511 DEF_HELPER_FLAGS_4(dmadd, 0, void, tl, tl, i32, env) 512 DEF_HELPER_FLAGS_4(dmaddu, 0, void, tl, tl, i32, env) 513 DEF_HELPER_FLAGS_4(dmsub, 0, void, tl, tl, i32, env) 514 DEF_HELPER_FLAGS_4(dmsubu, 0, void, tl, tl, i32, env) 515 #endif 516 517 /* DSP Bit/Manipulation Sub-class insns */ 518 DEF_HELPER_FLAGS_1(bitrev, TCG_CALL_NO_RWG_SE, tl, tl) 519 DEF_HELPER_FLAGS_3(insv, 0, tl, env, tl, tl) 520 #if defined(TARGET_MIPS64) 521 DEF_HELPER_FLAGS_3(dinsv, 0, tl, env, tl, tl) 522 #endif 523 524 /* DSP Compare-Pick Sub-class insns */ 525 DEF_HELPER_FLAGS_3(cmpu_eq_qb, 0, void, tl, tl, env) 526 DEF_HELPER_FLAGS_3(cmpu_lt_qb, 0, void, tl, tl, env) 527 DEF_HELPER_FLAGS_3(cmpu_le_qb, 0, void, tl, tl, env) 528 DEF_HELPER_FLAGS_2(cmpgu_eq_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 529 DEF_HELPER_FLAGS_2(cmpgu_lt_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 530 DEF_HELPER_FLAGS_2(cmpgu_le_qb, TCG_CALL_NO_RWG_SE, tl, tl, tl) 531 DEF_HELPER_FLAGS_3(cmp_eq_ph, 0, void, tl, tl, env) 532 DEF_HELPER_FLAGS_3(cmp_lt_ph, 0, void, tl, tl, env) 533 DEF_HELPER_FLAGS_3(cmp_le_ph, 0, void, tl, tl, env) 534 #if defined(TARGET_MIPS64) 535 DEF_HELPER_FLAGS_3(cmpu_eq_ob, 0, void, tl, tl, env) 536 DEF_HELPER_FLAGS_3(cmpu_lt_ob, 0, void, tl, tl, env) 537 DEF_HELPER_FLAGS_3(cmpu_le_ob, 0, void, tl, tl, env) 538 DEF_HELPER_FLAGS_3(cmpgdu_eq_ob, 0, tl, tl, tl, env) 539 DEF_HELPER_FLAGS_3(cmpgdu_lt_ob, 0, tl, tl, tl, env) 540 DEF_HELPER_FLAGS_3(cmpgdu_le_ob, 0, tl, tl, tl, env) 541 DEF_HELPER_FLAGS_2(cmpgu_eq_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 542 DEF_HELPER_FLAGS_2(cmpgu_lt_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 543 DEF_HELPER_FLAGS_2(cmpgu_le_ob, TCG_CALL_NO_RWG_SE, tl, tl, tl) 544 DEF_HELPER_FLAGS_3(cmp_eq_qh, 0, void, tl, tl, env) 545 DEF_HELPER_FLAGS_3(cmp_lt_qh, 0, void, tl, tl, env) 546 DEF_HELPER_FLAGS_3(cmp_le_qh, 0, void, tl, tl, env) 547 DEF_HELPER_FLAGS_3(cmp_eq_pw, 0, void, tl, tl, env) 548 DEF_HELPER_FLAGS_3(cmp_lt_pw, 0, void, tl, tl, env) 549 DEF_HELPER_FLAGS_3(cmp_le_pw, 0, void, tl, tl, env) 550 #endif 551 DEF_HELPER_FLAGS_3(pick_qb, 0, tl, tl, tl, env) 552 DEF_HELPER_FLAGS_3(pick_ph, 0, tl, tl, tl, env) 553 #if defined(TARGET_MIPS64) 554 DEF_HELPER_FLAGS_3(pick_ob, 0, tl, tl, tl, env) 555 DEF_HELPER_FLAGS_3(pick_qh, 0, tl, tl, tl, env) 556 DEF_HELPER_FLAGS_3(pick_pw, 0, tl, tl, tl, env) 557 #endif 558 DEF_HELPER_FLAGS_2(packrl_ph, TCG_CALL_NO_RWG_SE, tl, tl, tl) 559 #if defined(TARGET_MIPS64) 560 DEF_HELPER_FLAGS_2(packrl_pw, TCG_CALL_NO_RWG_SE, tl, tl, tl) 561 #endif 562 563 /* DSP Accumulator and DSPControl Access Sub-class insns */ 564 DEF_HELPER_FLAGS_3(extr_w, 0, tl, tl, tl, env) 565 DEF_HELPER_FLAGS_3(extr_r_w, 0, tl, tl, tl, env) 566 DEF_HELPER_FLAGS_3(extr_rs_w, 0, tl, tl, tl, env) 567 #if defined(TARGET_MIPS64) 568 DEF_HELPER_FLAGS_3(dextr_w, 0, tl, tl, tl, env) 569 DEF_HELPER_FLAGS_3(dextr_r_w, 0, tl, tl, tl, env) 570 DEF_HELPER_FLAGS_3(dextr_rs_w, 0, tl, tl, tl, env) 571 DEF_HELPER_FLAGS_3(dextr_l, 0, tl, tl, tl, env) 572 DEF_HELPER_FLAGS_3(dextr_r_l, 0, tl, tl, tl, env) 573 DEF_HELPER_FLAGS_3(dextr_rs_l, 0, tl, tl, tl, env) 574 #endif 575 DEF_HELPER_FLAGS_3(extr_s_h, 0, tl, tl, tl, env) 576 #if defined(TARGET_MIPS64) 577 DEF_HELPER_FLAGS_3(dextr_s_h, 0, tl, tl, tl, env) 578 #endif 579 DEF_HELPER_FLAGS_3(extp, 0, tl, tl, tl, env) 580 DEF_HELPER_FLAGS_3(extpdp, 0, tl, tl, tl, env) 581 #if defined(TARGET_MIPS64) 582 DEF_HELPER_FLAGS_3(dextp, 0, tl, tl, tl, env) 583 DEF_HELPER_FLAGS_3(dextpdp, 0, tl, tl, tl, env) 584 #endif 585 DEF_HELPER_FLAGS_3(shilo, 0, void, tl, tl, env) 586 #if defined(TARGET_MIPS64) 587 DEF_HELPER_FLAGS_3(dshilo, 0, void, tl, tl, env) 588 #endif 589 DEF_HELPER_FLAGS_3(mthlip, 0, void, tl, tl, env) 590 #if defined(TARGET_MIPS64) 591 DEF_HELPER_FLAGS_3(dmthlip, 0, void, tl, tl, env) 592 #endif 593 DEF_HELPER_FLAGS_3(wrdsp, 0, void, tl, tl, env) 594 DEF_HELPER_FLAGS_2(rddsp, 0, tl, tl, env) 595 596 #ifndef CONFIG_USER_ONLY 597 #include "tcg/sysemu_helper.h.inc" 598 #endif /* !CONFIG_USER_ONLY */ 599 600 #include "tcg/msa_helper.h.inc" 601 602 /* Vendor extensions */ 603 #include "tcg/vr54xx_helper.h.inc" 604