QEMU MIPS ASE DSP support
Re: [Qemu-devel] [PATCH v11 08/14] target-mips: Add ASE DSP multiply instructions
In reply to Jia LiuQuoted 1,202 lines · Jia Liu
Add MIPS ASE DSP Multiply instructions.
Signed-off-by Jia Liu <[email protected]>--- target-mips/dsp_helper.c | 938 ++++++++++++++++++++++++++++++++++++++++++++++ target-mips/helper.h | 91 +++++ target-mips/translate.c | 548 +++++++++++++++++++++++++++ 3 files changed, 1577 insertions(+)target-mips/dsp_helper.c +938
-0@@ -2210,6 +2210,944 @@ SHIFT_PH(shra_r, rnd16_rashift);#undef SHIFT_PH +/** DSP Multiply Sub-class insns **/ +/* Return value made up by two 16bits value. +* FIXME give the macro a better name. +*/ +#define MUL_RETURN32_16_PH (name, func, \ + rsmov1, rsmov2, rsfilter, \ + rtmov1, rtmov2, rtfilter) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint16_t rsB, rsA, rtB, rtA; \ + \ + rsB = (rs >> rsmov1) & rsfilter; \ + rsA = (rs >> rsmov2) & rsfilter; \ + rtB = (rt >> rtmov1) & rtfilter; \ + rtA = (rt >> rtmov2) & rtfilter; \ + \ + rsB = mipsdsp_##func(rsB, rtB, env); \ + rsA = mipsdsp_##func(rsA, rtA, env); \ + \ + return MIPSDSP_RETURN32_16(rsB, rsA); \ +} + +MUL_RETURN32_16_PH (muleu_s_ph_qbl, mul_u8_u16, \ +24 ,16 ,MIPSDSP_Q0 , \ +16 ,0 ,MIPSDSP_LO ); +MUL_RETURN32_16_PH (muleu_s_ph_qbr, mul_u8_u16, \ +8 ,0 ,MIPSDSP_Q0 , \ +16 ,0 ,MIPSDSP_LO ); +MUL_RETURN32_16_PH (mulq_rs_ph, rndq15_mul_q15_q15, \ +16 ,0 ,MIPSDSP_LO , \ +16 ,0 ,MIPSDSP_LO ); +MUL_RETURN32_16_PH (mul_ph, mul_i16_i16, \ +16 ,0 ,MIPSDSP_LO , \ +16 ,0 ,MIPSDSP_LO ); +MUL_RETURN32_16_PH (mul_s_ph, sat16_mul_i16_i16, \ +16 ,0 ,MIPSDSP_LO , \ +16 ,0 ,MIPSDSP_LO ); +MUL_RETURN32_16_PH (mulq_s_ph, sat16_mul_q15_q15, \ +16 ,0 ,MIPSDSP_LO , \ +16 ,0 ,MIPSDSP_LO ); + +#undef MUL_RETURN32_16_PH + +#define MUL_RETURN32_32_ph (name, func, movbits) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsh, rth; \ + int32_t temp; \ + \ + rsh = (rs >> movbits) & MIPSDSP_LO; \ + rth = (rt >> movbits) & MIPSDSP_LO; \ + temp = mipsdsp_##func(rsh, rth, env); \ + \ + return (target_long)(int32_t)temp; \ +} + +MUL_RETURN32_32_ph (muleq_s_w_phl, mul_q15_q15_overflowflag21,16 ); +MUL_RETURN32_32_ph (muleq_s_w_phr, mul_q15_q15_overflowflag21,0 ); + +#undef MUL_RETURN32_32_ph + +#define MUL_VOID_PH (name, use_ac_env) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsh, rsl, rth, rtl; \ + int32_t tempB, tempA; \ + int64_t acc, dotp; \ + \ + MIPSDSP_SPLIT32_16(rs, rsh, rsl); \ + MIPSDSP_SPLIT32_16(rt, rth, rtl); \ + \ + if (use_ac_env == 1) { \ + tempB = mipsdsp_mul_q15_q15(ac, rsh, rth, env); \ + tempA = mipsdsp_mul_q15_q15(ac, rsl, rtl, env); \ + } else { \ + tempB = mipsdsp_mul_u16_u16(rsh, rth); \ + tempA = mipsdsp_mul_u16_u16(rsl, rtl); \ + } \ + \ + dotp = (int64_t)tempB - (int64_t)tempA; \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + dotp = dotp + acc; \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((dotp & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t)(dotp & MIPSDSP_LLO); \ +} + +MUL_VOID_PH (mulsaq_s_w_ph,1 ); +MUL_VOID_PH (mulsa_w_ph,0 ); + +#undef MUL_VOID_PH + +#if defined(TARGET_MIPS64 ) +#define MUL_RETURN64_16_QH (name, func, \ + rsmov1, rsmov2, rsmov3, rsmov4, rsfilter, \ + rtmov1, rtmov2, rtmov3, rtmov4, rtfilter) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint16_t rs3, rs2, rs1, rs0; \ + uint16_t rt3, rt2, rt1, rt0; \ + uint16_t tempD, tempC, tempB, tempA; \ + \ + rs3 = (rs >> rsmov1) & rsfilter; \ + rs2 = (rs >> rsmov2) & rsfilter; \ + rs1 = (rs >> rsmov3) & rsfilter; \ + rs0 = (rs >> rsmov4) & rsfilter; \ + rt3 = (rt >> rtmov1) & rtfilter; \ + rt2 = (rt >> rtmov2) & rtfilter; \ + rt1 = (rt >> rtmov3) & rtfilter; \ + rt0 = (rt >> rtmov4) & rtfilter; \ + \ + tempD = mipsdsp_##func(rs3, rt3, env); \ + tempC = mipsdsp_##func(rs2, rt2, env); \ + tempB = mipsdsp_##func(rs1, rt1, env); \ + tempA = mipsdsp_##func(rs0, rt0, env); \ + \ + return MIPSDSP_RETURN64_16(tempD, tempC, tempB, tempA); \ +} + +MUL_RETURN64_16_QH (muleu_s_qh_obl, mul_u8_u16, \ +56 ,48 ,40 ,32 ,MIPSDSP_Q0 , \ +48 ,32 ,16 ,0 ,MIPSDSP_LO ); +MUL_RETURN64_16_QH (muleu_s_qh_obr, mul_u8_u16, \ +24 ,16 ,8 ,0 ,MIPSDSP_Q0 , \ +48 ,32 ,16 ,0 ,MIPSDSP_LO ); +MUL_RETURN64_16_QH (mulq_rs_qh, rndq15_mul_q15_q15, \ +48 ,32 ,16 ,0 ,MIPSDSP_LO , \ +48 ,32 ,16 ,0 ,MIPSDSP_LO ); + +#undef MUL_RETURN64_16_QH + +#define MUL_RETURN64_32_QH (name, \ + rsmov1, rsmov2, \ + rtmov1, rtmov2) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint16_t rsB, rsA; \ + uint16_t rtB, rtA; \ + uint32_t tempB, tempA; \ + \ + rsB = (rs >> rsmov1) & MIPSDSP_LO; \ + rsA = (rs >> rsmov2) & MIPSDSP_LO; \ + rtB = (rt >> rtmov1) & MIPSDSP_LO; \ + rtA = (rt >> rtmov2) & MIPSDSP_LO; \ + \ + tempB = mipsdsp_mul_q15_q15(5, rsB, rtB, env); \ + tempA = mipsdsp_mul_q15_q15(5, rsA, rtA, env); \ + \ + return ((uint64_t)tempB << 32) | (uint64_t)tempA; \ +} + +MUL_RETURN64_32_QH (muleq_s_pw_qhl,48 ,32 ,48 ,32 ); +MUL_RETURN64_32_QH (muleq_s_pw_qhr,16 ,0 ,16 ,0 ); + +#undef MUL_RETURN64_32_QH + +void helper_mulsaq_s_w_qh (target_ulong rs,target_ulong rt,uint32_t ac, +CPUMIPSState *env) +{ +int16_t rs3, rs2, rs1, rs0; +int16_t rt3, rt2, rt1, rt0; +int32_t tempD, tempC, tempB, tempA; +int64_t acc[2 ]; +int64_t temp[2 ]; +int64_t temp_sum; + +MIPSDSP_SPLIT64_16 (rs, rs3, rs2, rs1, rs0); +MIPSDSP_SPLIT64_16 (rt, rt3, rt2, rt1, rt0); + + tempD =mipsdsp_mul_q15_q15 (ac, rs3, rt3, env); + tempC =mipsdsp_mul_q15_q15 (ac, rs2, rt2, env); + tempB =mipsdsp_mul_q15_q15 (ac, rs1, rt1, env); + tempA =mipsdsp_mul_q15_q15 (ac, rs0, rt0, env); + + temp[0 ] = ((int32_t )tempD - (int32_t )tempC) + + ((int32_t )tempB - (int32_t )tempA); + temp[0 ] = (int64_t )(temp[0 ] <<30 ) >>30 ; +if (((temp[0 ] >>33 ) &0x01 ) ==0 ) { + temp[1 ] =0x00 ; + }else { + temp[1 ] = ~0ull ; + } + + acc[0 ] = env->active_tc.LO[ac]; + acc[1 ] = env->active_tc.HI[ac]; + + temp_sum = acc[0 ] + temp[0 ]; +if (((uint64_t )temp_sum < (uint64_t )acc[0 ]) && + ((uint64_t )temp_sum < (uint64_t )temp[0 ])) { + acc[1 ] +=1 ; + } + acc[0 ] = temp_sum; + acc[1 ] += temp[1 ]; + + env->active_tc.HI[ac] = acc[1 ]; + env->active_tc.LO[ac] = acc[0 ]; +} +#endif + +#define DP_QB (name, func, is_add, rsmov1, rsmov2, rtmov1, rtmov2) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint8_t rs3, rs2; \ + uint8_t rt3, rt2; \ + uint16_t tempB, tempA; \ + uint64_t tempC, dotp; \ + \ + rs3 = (rs >> rsmov1) & MIPSDSP_Q0; \ + rs2 = (rs >> rsmov2) & MIPSDSP_Q0; \ + rt3 = (rt >> rtmov1) & MIPSDSP_Q0; \ + rt2 = (rt >> rtmov2) & MIPSDSP_Q0; \ + tempB = mipsdsp_##func(rs3, rt3); \ + tempA = mipsdsp_##func(rs2, rt2); \ + dotp = (int64_t)tempB + (int64_t)tempA; \ + if (is_add) { \ + tempC = (((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO)) \ + + dotp; \ + } else { \ + tempC = (((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO)) \ + - dotp; \ + } \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((tempC & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t)(tempC & MIPSDSP_LLO); \ +} + +DP_QB (dpau_h_qbl, mul_u8_u8,1 ,24 ,16 ,24 ,16 ); +DP_QB (dpau_h_qbr, mul_u8_u8,1 ,8 ,0 ,8 ,0 ); +DP_QB (dpsu_h_qbl, mul_u8_u8,0 ,24 ,16 ,24 ,16 ); +DP_QB (dpsu_h_qbr, mul_u8_u8,0 ,8 ,0 ,8 ,0 ); + +#undef DP_QB + +#if defined(TARGET_MIPS64 ) +#define DP_OB (name, add_sub, \ + rsmov1, rsmov2, rsmov3, rsmov4, \ + rtmov1, rtmov2, rtmov3, rtmov4) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + uint8_t rsD, rsC, rsB, rsA; \ + uint8_t rtD, rtC, rtB, rtA; \ + uint16_t tempD, tempC, tempB, tempA; \ + uint64_t temp[2]; \ + uint64_t acc[2]; \ + uint64_t temp_sum; \ + \ + temp[0] = 0; \ + temp[1] = 0; \ + \ + rsD = (rs >> rsmov1) & MIPSDSP_Q0; \ + rsC = (rs >> rsmov2) & MIPSDSP_Q0; \ + rsB = (rs >> rsmov3) & MIPSDSP_Q0; \ + rsA = (rs >> rsmov4) & MIPSDSP_Q0; \ + rtD = (rt >> rtmov1) & MIPSDSP_Q0; \ + rtC = (rt >> rtmov2) & MIPSDSP_Q0; \ + rtB = (rt >> rtmov3) & MIPSDSP_Q0; \ + rtA = (rt >> rtmov4) & MIPSDSP_Q0; \ + \ + tempD = mipsdsp_mul_u8_u8(rsD, rtD); \ + tempC = mipsdsp_mul_u8_u8(rsC, rtC); \ + tempB = mipsdsp_mul_u8_u8(rsB, rtB); \ + tempA = mipsdsp_mul_u8_u8(rsA, rtA); \ + \ + temp[0] = (uint64_t)tempD + (uint64_t)tempC + \ + (uint64_t)tempB + (uint64_t)tempA; \ + \ + acc[0] = env->active_tc.LO[ac]; \ + acc[1] = env->active_tc.HI[ac]; \ + \ + if (add_sub) { \ + temp_sum = acc[0] + temp[0]; \ + acc[1] = acc[1] + MIPSDSP_OVERFLOW(acc[0], temp[0], temp_sum, \ + 0x8000000000000000ull); \ + temp[0] = temp_sum; \ + temp[1] = acc[1] + temp[1]; \ + } else { \ + temp_sum = acc[0] - temp[0]; \ + acc[1] = acc[1] + MIPSDSP_OVERFLOW(acc[0], -temp[0], temp_sum, \ + 0x8000000000000000ull); \ + temp[0] = temp_sum; \ + temp[1] = acc[1] - temp[1]; \ + } \ + \ + env->active_tc.HI[ac] = temp[1]; \ + env->active_tc.LO[ac] = temp[0]; \ +} + +DP_OB (dpau_h_obl,1 ,56 ,48 ,40 ,32 ,56 ,48 ,40 ,32 ); +DP_OB (dpau_h_obr,1 ,24 ,16 ,8 ,0 ,24 ,16 ,8 ,0 ); +DP_OB (dpsu_h_obl,0 ,56 ,48 ,40 ,32 ,56 ,48 ,40 ,32 ); +DP_OB (dpsu_h_obr,0 ,24 ,16 ,8 ,0 ,24 ,16 ,8 ,0 ); + +#undef DP_OB +#endif + +#define DP_NOFUNC_PH (name, is_add, rsmov1, rsmov2, rtmov1, rtmov2) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint16_t rsB, rsA, rtB, rtA; \ + int32_t tempA, tempB; \ + int64_t acc; \ + \ + rsB = (rs >> rsmov1) & MIPSDSP_LO; \ + rsA = (rs >> rsmov2) & MIPSDSP_LO; \ + rtB = (rt >> rtmov1) & MIPSDSP_LO; \ + rtA = (rt >> rtmov2) & MIPSDSP_LO; \ + \ + tempB = (int32_t)rsB * (int32_t)rtB; \ + tempA = (int32_t)rsA * (int32_t)rtA; \ + \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + \ + if (is_add) { \ + acc = acc + ((int64_t)tempB + (int64_t)tempA); \ + } else { \ + acc = acc - ((int64_t)tempB + (int64_t)tempA); \ + } \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t)((acc & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t)(acc & MIPSDSP_LLO); \ +} + +DP_NOFUNC_PH (dpa_w_ph,1 ,16 ,0 ,16 ,0 ); +DP_NOFUNC_PH (dpax_w_ph,1 ,16 ,0 ,0 ,16 ); +DP_NOFUNC_PH (dps_w_ph,0 ,16 ,0 ,16 ,0 ); +DP_NOFUNC_PH (dpsx_w_ph,0 ,16 ,0 ,0 ,16 ); +#undef DP_NOFUNC_PH + +#define DP_HASFUNC_PH (name, is_add, rsmov1, rsmov2, rtmov1, rtmov2) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsB, rsA, rtB, rtA; \ + int32_t tempB, tempA; \ + int64_t acc, dotp; \ + \ + rsB = (rs >> rsmov1) & MIPSDSP_LO; \ + rsA = (rs >> rsmov2) & MIPSDSP_LO; \ + rtB = (rt >> rtmov1) & MIPSDSP_LO; \ + rtA = (rt >> rtmov2) & MIPSDSP_LO; \ + \ + tempB = mipsdsp_mul_q15_q15(ac, rsB, rtB, env); \ + tempA = mipsdsp_mul_q15_q15(ac, rsA, rtA, env); \ + \ + dotp = (int64_t)tempB + (int64_t)tempA; \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + \ + if (is_add) { \ + acc = acc + dotp; \ + } else { \ + acc = acc - dotp; \ + } \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((acc & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t) \ + (acc & MIPSDSP_LLO); \ +} + +DP_HASFUNC_PH (dpaq_s_w_ph,1 ,16 ,0 ,16 ,0 ); +DP_HASFUNC_PH (dpaqx_s_w_ph,1 ,16 ,0 ,0 ,16 ); +DP_HASFUNC_PH (dpsq_s_w_ph,0 ,16 ,0 ,16 ,0 ); +DP_HASFUNC_PH (dpsqx_s_w_ph,0 ,16 ,0 ,0 ,16 ); + +#undef DP_HASFUNC_PH + +#define DP_128OPERATION_PH (name, is_add) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsh, rsl, rth, rtl; \ + int32_t tempB, tempA, tempC62_31, tempC63; \ + int64_t acc, dotp, tempC; \ + \ + MIPSDSP_SPLIT32_16(rs, rsh, rsl); \ + MIPSDSP_SPLIT32_16(rt, rth, rtl); \ + \ + tempB = mipsdsp_mul_q15_q15(ac, rsh, rtl, env); \ + tempA = mipsdsp_mul_q15_q15(ac, rsl, rth, env); \ + \ + dotp = (int64_t)tempB + (int64_t)tempA; \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + if (is_add) { \ + tempC = acc + dotp; \ + } else { \ + tempC = acc - dotp; \ + } \ + tempC63 = (tempC >> 63) & 0x01; \ + tempC62_31 = (tempC >> 31) & 0xFFFFFFFF; \ + \ + if ((tempC63 == 0) && (tempC62_31 != 0x00000000)) { \ + tempC = 0x7FFFFFFF; \ + set_DSPControl_overflow_flag(1, 16 + ac, env); \ + } \ + \ + if ((tempC63 == 1) && (tempC62_31 != 0xFFFFFFFF)) { \ + tempC = 0xFFFFFFFF80000000ull; \ + set_DSPControl_overflow_flag(1, 16 + ac, env); \ + } \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((tempC & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t) \ + (tempC & MIPSDSP_LLO); \ +} + +DP_128OPERATION_PH (dpaqx_sa_w_ph,1 ); +DP_128OPERATION_PH (dpsqx_sa_w_ph,0 ); + +#undef DP_128OPERATION_HP + +#if defined(TARGET_MIPS64 ) +#define DP_QH (name, is_add, use_ac_env) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int32_t rs3, rs2, rs1, rs0; \ + int32_t rt3, rt2, rt1, rt0; \ + int32_t tempD, tempC, tempB, tempA; \ + int64_t acc[2]; \ + int64_t temp[2]; \ + int64_t temp_sum; \ + \ + MIPSDSP_SPLIT64_16(rs, rs3, rs2, rs1, rs0); \ + MIPSDSP_SPLIT64_16(rt, rt3, rt2, rt1, rt0); \ + \ + if (use_ac_env) { \ + tempD = mipsdsp_mul_q15_q15(ac, rs3, rt3, env); \ + tempC = mipsdsp_mul_q15_q15(ac, rs2, rt2, env); \ + tempB = mipsdsp_mul_q15_q15(ac, rs1, rt1, env); \ + tempA = mipsdsp_mul_q15_q15(ac, rs0, rt0, env); \ + } else { \ + tempD = mipsdsp_mul_u16_u16(rs3, rt3); \ + tempC = mipsdsp_mul_u16_u16(rs2, rt2); \ + tempB = mipsdsp_mul_u16_u16(rs1, rt1); \ + tempA = mipsdsp_mul_u16_u16(rs0, rt0); \ + } \ + \ + temp[0] = (int64_t)tempD + (int64_t)tempC + \ + (int64_t)tempB + (int64_t)tempA; \ + temp[0] = (int64_t)(temp[0] << 31) >> 31; \ + \ + if (temp[0] >= 0) { \ + temp[1] = 0; \ + } else { \ + temp[1] = ~0ull; \ + } \ + \ + acc[1] = env->active_tc.HI[ac]; \ + acc[0] = env->active_tc.LO[ac]; \ + \ + if (is_add) { \ + temp_sum = acc[0] + temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] = acc[1] + 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] = acc[1] + temp[1]; \ + } else { \ + temp_sum = acc[0] - temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], -temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] = acc[1] - 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] = acc[1] - temp[1]; \ + } \ + \ + env->active_tc.HI[ac] = temp[1]; \ + env->active_tc.LO[ac] = temp[0]; \ +} + +DP_QH (dpa_w_qh,1 ,0 ); +DP_QH (dpaq_s_w_qh,1 ,1 ); +DP_QH (dps_w_qh,0 ,0 ); +DP_QH (dpsq_s_w_qh,0 ,1 ); + +#undef DP_QH + +#endif + +#define DP_L_W (name, is_add) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int32_t temp64, temp63, tempacc63, tempdotp63, tempDL63; \ + int64_t dotp, acc; \ + int64_t tempDL[2]; \ + uint64_t temp; \ + \ + dotp = mipsdsp_mul_q31_q31(ac, rs, rt, env); \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + if (is_add) { \ + tempDL[0] = acc + dotp; \ + } else { \ + tempDL[0] = acc - dotp; \ + } \ + \ + tempacc63 = (acc >> 63) & 0x01; \ + tempdotp63 = (dotp >> 63) & 0x01; \ + tempDL63 = (tempDL[0] >> 63) & 0x01; \ + \ + if (((tempacc63 == 1) && (tempdotp63 == 1)) | \ + (((tempacc63 == 1) || (tempdotp63 == 1)) && tempDL63 == 0)) { \ + tempDL[1] = 1; \ + } else { \ + tempDL[1] = 0; \ + } \ + \ + temp = tempDL[0]; \ + temp64 = tempDL[1] & 0x01; \ + temp63 = (tempDL[0] >> 63) & 0x01; \ + \ + if (temp64 != temp63) { \ + if (temp64 == 1) { \ + temp = 0x8000000000000000ull; \ + } else { \ + temp = 0x7FFFFFFFFFFFFFFFull; \ + } \ + \ + set_DSPControl_overflow_flag(1, 16 + ac, env); \ + } \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((temp & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t) \ + (temp & MIPSDSP_LLO); \ +} + +DP_L_W (dpaq_sa_l_w,1 ); +DP_L_W (dpsq_sa_l_w,0 ); + +#undef DP_L_W + +#if defined(TARGET_MIPS64 ) +#define DP_L_PW (name, func) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int32_t rs1, rs0; \ + int32_t rt1, rt0; \ + int64_t tempB[2], tempA[2]; \ + int64_t temp[2]; \ + int64_t acc[2]; \ + int64_t temp_sum; \ + \ + temp[0] = 0; \ + temp[1] = 0; \ + \ + MIPSDSP_SPLIT64_32(rs, rs1, rs0); \ + MIPSDSP_SPLIT64_32(rt, rt1, rt0); \ + \ + tempB[0] = mipsdsp_mul_q31_q31(ac, rs1, rt1, env); \ + tempA[0] = mipsdsp_mul_q31_q31(ac, rs0, rt0, env); \ + \ + if (tempB[0] >= 0) { \ + tempB[1] = 0x00; \ + } else { \ + tempB[1] = ~0ull; \ + } \ + \ + if (tempA[0] >= 0) { \ + tempA[1] = 0x00; \ + } else { \ + tempA[1] = ~0ull; \ + } \ + \ + temp_sum = tempB[0] + tempA[0]; \ + if (MIPSDSP_OVERFLOW(tempB[0], tempA[0], temp_sum, \ + 0x8000000000000000ull)) { \ + temp[1] += 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] += tempB[1] + tempA[1]; \ + \ + mipsdsp_##func(acc, ac, temp, env); \ + \ + env->active_tc.HI[ac] = acc[1]; \ + env->active_tc.LO[ac] = acc[0]; \ +} + +DP_L_PW (dpaq_sa_l_pw, sat64_acc_add_q63); +DP_L_PW (dpsq_sa_l_pw, sat64_acc_sub_q63); + +#undef DP_L_PW + +void helper_mulsaq_s_l_pw (target_ulong rs,target_ulong rt,uint32_t ac, +CPUMIPSState *env) +{ +int32_t rs1, rs0; +int32_t rt1, rt0; +int64_t tempB[2 ], tempA[2 ]; +int64_t temp[2 ]; +int64_t acc[2 ]; +int64_t temp_sum; + + rs1 = (rs >>32 ) &MIPSDSP_LLO ; + rs0 = rs &MIPSDSP_LLO ; + rt1 = (rt >>32 ) &MIPSDSP_LLO ; + rt0 = rt &MIPSDSP_LLO ; + + tempB[0 ] =mipsdsp_mul_q31_q31 (ac, rs1, rt1, env); + tempA[0 ] =mipsdsp_mul_q31_q31 (ac, rs0, rt0, env); + +if (tempB[0 ] >=0 ) { + tempB[1 ] =0x00 ; + }else { + tempB[1 ] = ~0ull ; + } + +if (tempA[0 ] >=0 ) { + tempA[1 ] =0x00 ; + }else { + tempA[1 ] = ~0ull ; + } + + acc[0 ] = env->active_tc.LO[ac]; + acc[1 ] = env->active_tc.HI[ac]; + + temp_sum = tempB[0 ] - tempA[0 ]; +if ((uint64_t )temp_sum > (uint64_t )tempB[0 ]) { + tempB[1 ] -=1 ; + } + temp[0 ] = temp_sum; + temp[1 ] = tempB[1 ] - tempA[1 ]; + +if ((temp[1 ] &0x01 ) ==0 ) { + temp[1 ] =0x00 ; + }else { + temp[1 ] = ~0ull ; + } + + temp_sum = acc[0 ] + temp[0 ]; +if (((uint64_t )temp_sum < (uint64_t )acc[0 ]) && + ((uint64_t )temp_sum < (uint64_t )temp[0 ])) { + acc[1 ] +=1 ; + } + acc[0 ] = temp_sum; + acc[1 ] += temp[1 ]; + + env->active_tc.HI[ac] = acc[1 ]; + env->active_tc.LO[ac] = acc[0 ]; +} +#endif + +#define MAQ_S_W (name, mov) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsh, rth; \ + int32_t tempA; \ + int64_t tempL, acc; \ + \ + rsh = (rs >> mov) & MIPSDSP_LO; \ + rth = (rt >> mov) & MIPSDSP_LO; \ + tempA = mipsdsp_mul_q15_q15(ac, rsh, rth, env); \ + acc = ((uint64_t)env->active_tc.HI[ac] << 32) | \ + ((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO); \ + tempL = (int64_t)tempA + acc; \ + env->active_tc.HI[ac] = (target_long)(int32_t) \ + ((tempL & MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t) \ + (tempL & MIPSDSP_LLO); \ +} + +MAQ_S_W (maq_s_w_phl,16 ); +MAQ_S_W (maq_s_w_phr,0 ); + +#undef MAQ_S_W + +#define MAQ_SA_W (name, mov) \ +void helper_##name(uint32_t ac, target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int16_t rsh, rth; \ + int32_t tempA; \ + \ + rsh = (rs >> mov) & MIPSDSP_LO; \ + rth = (rt >> mov) & MIPSDSP_LO; \ + tempA = mipsdsp_mul_q15_q15(ac, rsh, rth, env); \ + tempA = mipsdsp_sat32_acc_q31(ac, tempA, env); \ + \ + env->active_tc.HI[ac] = (target_long)(int32_t)(((int64_t)tempA & \ + MIPSDSP_LHI) >> 32); \ + env->active_tc.LO[ac] = (target_long)(int32_t)((int64_t)tempA & \ + MIPSDSP_LLO); \ +} + +MAQ_SA_W (maq_sa_w_phl,16 ); +MAQ_SA_W (maq_sa_w_phr,0 ); + +#undef MAQ_SA_W + +#define MULQ_W (name, addvar) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint32_t rs_t, rt_t; \ + int32_t tempI; \ + int64_t tempL; \ + \ + rs_t = rs & MIPSDSP_LLO; \ + rt_t = rt & MIPSDSP_LLO; \ + \ + if ((rs_t == 0x80000000) && (rt_t == 0x80000000)) { \ + tempL = 0x7FFFFFFF00000000ull; \ + set_DSPControl_overflow_flag(1, 21, env); \ + } else { \ + tempL = ((int64_t)rs_t * (int64_t)rt_t) << 1; \ + tempL += addvar; \ + } \ + tempI = (tempL & MIPSDSP_LHI) >> 32; \ + \ + return (target_long)(int32_t)tempI; \ +} + +MULQ_W (mulq_s_w,0 ); +MULQ_W (mulq_rs_w,0x80000000ull ); + +#undef MULQ_W + +#if defined(TARGET_MIPS64 ) + +#define MAQ_S_W_QH (name, mov) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int16_t rs_t, rt_t; \ + int32_t temp_mul; \ + int64_t temp[2]; \ + int64_t acc[2]; \ + int64_t temp_sum; \ + \ + temp[0] = 0; \ + temp[1] = 0; \ + \ + rs_t = (rs >> mov) & MIPSDSP_LO; \ + rt_t = (rt >> mov) & MIPSDSP_LO; \ + temp_mul = mipsdsp_mul_q15_q15(ac, rs_t, rt_t, env); \ + \ + temp[0] = (int64_t)temp_mul; \ + if (temp[0] >= 0) { \ + temp[1] = 0x00; \ + } else { \ + temp[1] = ~0ull; \ + } \ + \ + acc[0] = env->active_tc.LO[ac]; \ + acc[1] = env->active_tc.HI[ac]; \ + \ + temp_sum = acc[0] + temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] += 1; \ + } \ + acc[0] = temp_sum; \ + acc[1] += temp[1]; \ + \ + env->active_tc.HI[ac] = acc[1]; \ + env->active_tc.LO[ac] = acc[0]; \ +} + +MAQ_S_W_QH (maq_s_w_qhll,48 ); +MAQ_S_W_QH (maq_s_w_qhlr,32 ); +MAQ_S_W_QH (maq_s_w_qhrl,16 ); +MAQ_S_W_QH (maq_s_w_qhrr,0 ); + +#undef MAQ_S_W_QH + +#define MAQ_SA_W (name, mov) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int16_t rs_t, rt_t; \ + int32_t temp; \ + int64_t acc[2]; \ + \ + rs_t = (rs >> mov) & MIPSDSP_LO; \ + rt_t = (rt >> mov) & MIPSDSP_LO; \ + temp = mipsdsp_mul_q15_q15(ac, rs_t, rt_t, env); \ + temp = mipsdsp_sat32_acc_q31(ac, temp, env); \ + \ + acc[0] = (int64_t)(int32_t)temp; \ + if (acc[0] >= 0) { \ + acc[1] = 0x00; \ + } else { \ + acc[1] = ~0ull; \ + } \ + \ + env->active_tc.HI[ac] = acc[1]; \ + env->active_tc.LO[ac] = acc[0]; \ +} + +MAQ_SA_W (maq_sa_w_qhll,48 ); +MAQ_SA_W (maq_sa_w_qhlr,32 ); +MAQ_SA_W (maq_sa_w_qhrl,16 ); +MAQ_SA_W (maq_sa_w_qhrr,0 ); + +#undef MAQ_SA_W + +#define MAQ_S_L_PW (name, mov) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int32_t rs_t, rt_t; \ + int64_t temp[2]; \ + int64_t acc[2]; \ + int64_t temp_sum; \ + \ + temp[0] = 0; \ + temp[1] = 0; \ + \ + rs_t = (rs >> mov) & MIPSDSP_LLO; \ + rt_t = (rt >> mov) & MIPSDSP_LLO; \ + \ + temp[0] = mipsdsp_mul_q31_q31(ac, rs_t, rt_t, env); \ + if (temp[0] >= 0) { \ + temp[1] = 0x00; \ + } else { \ + temp[1] = ~0ull; \ + } \ + \ + acc[0] = env->active_tc.LO[ac]; \ + acc[1] = env->active_tc.HI[ac]; \ + \ + temp_sum = acc[0] + temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] += 1; \ + } \ + acc[0] = temp_sum; \ + acc[1] += temp[1]; \ + \ + env->active_tc.HI[ac] = acc[1]; \ + env->active_tc.LO[ac] = acc[0]; \ +} + +MAQ_S_L_PW (maq_s_l_pwl,32 ); +MAQ_S_L_PW (maq_s_l_pwr,0 ); + +#undef MAQ_S_L_PW + +#define DM_OPERATE (name, func, is_add, sigext) \ +void helper_##name(target_ulong rs, target_ulong rt, uint32_t ac, \ + CPUMIPSState *env) \ +{ \ + int32_t rs1, rs0; \ + int32_t rt1, rt0; \ + int64_t tempBL[2], tempAL[2]; \ + int64_t acc[2]; \ + int64_t temp[2]; \ + int64_t temp_sum; \ + \ + temp[0] = 0x00; \ + temp[1] = 0x00; \ + \ + MIPSDSP_SPLIT64_32(rs, rs1, rs0); \ + MIPSDSP_SPLIT64_32(rt, rt1, rt0); \ + \ + if (sigext) { \ + tempBL[0] = (int64_t)mipsdsp_##func(rs1, rt1); \ + tempAL[0] = (int64_t)mipsdsp_##func(rs0, rt0); \ + \ + if (tempBL[0] >= 0) { \ + tempBL[1] = 0x0; \ + } else { \ + tempBL[1] = ~0ull; \ + } \ + \ + if (tempAL[0] >= 0) { \ + tempAL[1] = 0x0; \ + } else { \ + tempAL[1] = ~0ull; \ + } \ + } else { \ + tempBL[0] = mipsdsp_##func(rs1, rt1); \ + tempAL[0] = mipsdsp_##func(rs0, rt0); \ + tempBL[1] = 0; \ + tempAL[1] = 0; \ + } \ + \ + acc[1] = env->active_tc.HI[ac]; \ + acc[0] = env->active_tc.LO[ac]; \ + \ + temp_sum = tempBL[0] + tempAL[0]; \ + if (MIPSDSP_OVERFLOW(tempBL[0], tempAL[0], temp_sum, \ + 0x8000000000000000ull)) { \ + temp[1] += 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] += tempBL[1] + tempAL[1]; \ + \ + if (is_add) { \ + temp_sum = acc[0] + temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] = acc[1] + 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] = acc[1] + temp[1]; \ + } else { \ + temp_sum = acc[0] - temp[0]; \ + if (MIPSDSP_OVERFLOW(acc[0], -temp[0], temp_sum, \ + 0x8000000000000000ull)) { \ + acc[1] = acc[1] - 1; \ + } \ + temp[0] = temp_sum; \ + temp[1] = acc[1] - temp[1]; \ + } \ + \ + env->active_tc.HI[ac] = temp[1]; \ + env->active_tc.LO[ac] = temp[0]; \ +} + +DM_OPERATE (dmadd, mul_i32_i32,1 ,1 ); +DM_OPERATE (dmaddu, mul_u32_u32,1 ,0 ); +DM_OPERATE (dmsub, mul_i32_i32,0 ,1 ); +DM_OPERATE (dmsubu, mul_u32_u32,0 ,0 ); +#undef DM_OPERATE +#endif +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HItarget-mips/helper.h +91
-0@@ -526,4 +526,95 @@ DEF_HELPER_FLAGS_2(shra_pw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) DEF_HELPER_FLAGS_2(shra_r_pw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl)#endif +/* DSP Multiply Sub-class insns */ +DEF_HELPER_FLAGS_3(muleu_s_ph_qbl, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(muleu_s_ph_qbr, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(muleu_s_qh_obl, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(muleu_s_qh_obr, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(mulq_rs_ph, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(mulq_rs_qh, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(muleq_s_w_phl, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(muleq_s_w_phr, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(muleq_s_pw_qhl, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(muleq_s_pw_qhr, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_4(dpau_h_qbl, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpau_h_qbr, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpau_h_obl, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dpau_h_obr, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpsu_h_qbl, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpsu_h_qbr, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpsu_h_obl, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dpsu_h_obr, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpa_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpa_w_qh, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpax_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpaq_s_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpaq_s_w_qh, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpaqx_s_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpaqx_sa_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dps_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dps_w_qh, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpsx_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpsq_s_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpsq_s_w_qh, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpsqx_s_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(dpsqx_sa_w_ph, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(mulsaq_s_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(mulsaq_s_w_qh, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpaq_sa_l_w, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpaq_sa_l_pw, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(dpsq_sa_l_w, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(dpsq_sa_l_pw, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(mulsaq_s_l_pw, 0, void, tl, tl, i32, env) +#endif +DEF_HELPER_FLAGS_4(maq_s_w_phl, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(maq_s_w_phr, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(maq_sa_w_phl, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_4(maq_sa_w_phr, 0, void, i32, tl, tl, env) +DEF_HELPER_FLAGS_3(mul_ph, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(mul_s_ph, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(mulq_s_ph, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(mulq_s_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(mulq_rs_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_4(mulsa_w_ph, 0, void, i32, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_4(maq_s_w_qhll, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_s_w_qhlr, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_s_w_qhrl, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_s_w_qhrr, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_sa_w_qhll, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_sa_w_qhlr, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_sa_w_qhrl, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_sa_w_qhrr, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_s_l_pwl, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(maq_s_l_pwr, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dmadd, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dmaddu, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dmsub, 0, void, tl, tl, i32, env) +DEF_HELPER_FLAGS_4(dmsubu, 0, void, tl, tl, i32, env) +#endif +#include "def-helper.h" target-mips/translate.c +94
-0@@ -402,6 +402,13 @@ enum {OPC_ADDWC = (0x11 <<6 ) |OPC_ADDU_QB_DSP ,OPC_MODSUB = (0x12 <<6 ) |OPC_ADDU_QB_DSP ,OPC_RADDU_W_QB = (0x14 <<6 ) |OPC_ADDU_QB_DSP , +/* MIPS DSP Multiply Sub-class insns */ +OPC_MULEU_S_PH_QBL = (0x06 <<6 ) |OPC_ADDU_QB_DSP , +OPC_MULEU_S_PH_QBR = (0x07 <<6 ) |OPC_ADDU_QB_DSP , +OPC_MULQ_RS_PH = (0x1F <<6 ) |OPC_ADDU_QB_DSP , +OPC_MULEQ_S_W_PHL = (0x1C <<6 ) |OPC_ADDU_QB_DSP , +OPC_MULEQ_S_W_PHR = (0x1D <<6 ) |OPC_ADDU_QB_DSP , + OPC_MULQ_S_PH = (0x1E << 6) | OPC_ADDU_QB_DSP, };#define OPC_ADDUH_QB_DSP OPC_MULT_G_2E@@ -420,6 +427,11 @@ enum {OPC_SUBQH_R_PH = (0x0B <<6 ) |OPC_ADDUH_QB_DSP ,OPC_SUBQH_W = (0x11 <<6 ) |OPC_ADDUH_QB_DSP ,OPC_SUBQH_R_W = (0x13 <<6 ) |OPC_ADDUH_QB_DSP , +/* MIPS DSP Multiply Sub-class insns */ +OPC_MUL_PH = (0x0C <<6 ) |OPC_ADDUH_QB_DSP , +OPC_MUL_S_PH = (0x0E <<6 ) |OPC_ADDUH_QB_DSP , +OPC_MULQ_S_W = (0x16 <<6 ) |OPC_ADDUH_QB_DSP , + OPC_MULQ_RS_W = (0x17 << 6) | OPC_ADDUH_QB_DSP, };#define MASK_ABSQ_S_PH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))@@ -451,6 +463,7 @@ enum {OPC_PRECRQ_RS_PH_W = (0x15 <<6 ) |OPC_CMPU_EQ_QB_DSP , OPC_PRECRQU_S_QB_PH = (0x0F << 6) | OPC_CMPU_EQ_QB_DSP, }; +#define MASK_SHLL_QB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* MIPS DSP GPR-Based Shift Sub-class */@@ -478,6 +491,33 @@ enum { OPC_SHRAV_R_W = (0x17 << 6) | OPC_SHLL_QB_DSP, }; +#define MASK_DPA_W_PH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* MIPS DSP Multiply Sub-class insns */ +OPC_DPAU_H_QBL = (0x03 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAU_H_QBR = (0x07 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSU_H_QBL = (0x0B <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSU_H_QBR = (0x0F <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPA_W_PH = (0x00 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAX_W_PH = (0x08 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAQ_S_W_PH = (0x04 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAQX_S_W_PH = (0x18 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAQX_SA_W_PH = (0x1A <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPS_W_PH = (0x01 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSX_W_PH = (0x09 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSQ_S_W_PH = (0x05 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSQX_S_W_PH = (0x19 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSQX_SA_W_PH = (0x1B <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MULSAQ_S_W_PH = (0x06 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPAQ_SA_L_W = (0x0C <<6 ) |OPC_DPA_W_PH_DSP , +OPC_DPSQ_SA_L_W = (0x0D <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MAQ_S_W_PHL = (0x14 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MAQ_S_W_PHR = (0x16 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MAQ_SA_W_PHL = (0x10 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MAQ_SA_W_PHR = (0x12 <<6 ) |OPC_DPA_W_PH_DSP , +OPC_MULSA_W_PH = (0x02 <<6 ) |OPC_DPA_W_PH_DSP , +}; +#if defined(TARGET_MIPS64 )#define MASK_ABSQ_S_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) enum {@@ -505,6 +545,12 @@ enum {#if defined(TARGET_MIPS64 )#define MASK_ADDU_OB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { +/* MIPS DSP Multiply Sub-class insns */ +OPC_MULEQ_S_PW_QHL = (0x1C <<6 ) |OPC_ADDU_OB_DSP , +OPC_MULEQ_S_PW_QHR = (0x1D <<6 ) |OPC_ADDU_OB_DSP , +OPC_MULEU_S_QH_OBL = (0x06 <<6 ) |OPC_ADDU_OB_DSP , +OPC_MULEU_S_QH_OBR = (0x07 <<6 ) |OPC_ADDU_OB_DSP , +OPC_MULQ_RS_QH = (0x1F <<6 ) |OPC_ADDU_OB_DSP ,/* MIPS DSP Arithmetic Sub-class */ OPC_RADDU_L_OB = (0x14 <<6 ) |OPC_ADDU_OB_DSP , OPC_SUBQ_PW = (0x13 << 6) | OPC_ADDU_OB_DSP,@@ -546,6 +592,39 @@ enum {#endif #if defined(TARGET_MIPS64 ) +#define MASK_DPAQ_W_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* MIPS DSP Multiply Sub-class insns */ +OPC_DMADD = (0x19 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DMADDU = (0x1D <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DMSUB = (0x1B <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DMSUBU = (0x1F <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPA_W_QH = (0x00 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPAQ_S_W_QH = (0x04 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPAQ_SA_L_PW = (0x0C <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPAU_H_OBL = (0x03 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPAU_H_OBR = (0x07 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPS_W_QH = (0x01 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPSQ_S_W_QH = (0x05 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPSQ_SA_L_PW = (0x0D <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPSU_H_OBL = (0x0B <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_DPSU_H_OBR = (0x0F <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_L_PWL = (0x1C <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_L_PWR = (0x1E <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_W_QHLL = (0x14 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_SA_W_QHLL = (0x10 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_W_QHLR = (0x15 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_SA_W_QHLR = (0x11 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_W_QHRL = (0x16 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_SA_W_QHRL = (0x12 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_S_W_QHRR = (0x17 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MAQ_SA_W_QHRR = (0x13 <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MULSAQ_S_L_PW = (0x0E <<6 ) |OPC_DPAQ_W_QH_DSP , +OPC_MULSAQ_S_W_QH = (0x06 <<6 ) |OPC_DPAQ_W_QH_DSP , +}; +#endif + +#if defined(TARGET_MIPS64 )#define MASK_SHLL_OB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* MIPS DSP GPR-Based Shift Sub-class */@@ -13264,6 +13343,382 @@ static void gen_mipsdsp_shift(DisasContext *ctx, uint32_t opc,MIPS_DEBUG ("%s" , opn); } +static void gen_mipsdsp_multiply (DisasContext *ctx,uint32_t op1,uint32_t op2, +int ret,int v1,int v2,int check_ret) +{ +const char *opn ="mipsdsp multiply" ; +TCGv_i32 t0 =tcg_const_i32 (ret); +TCGv v1_t =tcg_temp_new (); +TCGv v2_t =tcg_temp_new (); + +if ((ret ==0 ) && (check_ret ==1 )) { +/* Treat as NOP. */ +MIPS_DEBUG ("NOP" ); +return ; + } + +if (v1 ==0 ) {
target-mips/translate.c static void gen_mipsdsp_shift(DisasContext *ctx, uint32_t opc, · line 13370
Quoted 10 lines
target-mips/translate.c +10
-0+tcg_gen_movi_tl (v1_t,0 ); + }else { +gen_load_gpr (v1_t, v1); + } + +if (v2 ==0 ) { +tcg_gen_movi_tl (v2_t,0 ); + }else { +gen_load_gpr (v2_t, v2); + }
The same comments as the previous patches.
Quoted 126 lines
target-mips/translate.c +126
-0+switch (op1) { +/* OPC_MULT_G_2E, OPC_ADDUH_QB_DSP, OPC_MUL_PH_DSP have +* the same mask and op1. */ +case OPC_MULT_G_2E : +switch (op2) { +case OPC_MUL_PH : +gen_helper_mul_ph (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MUL_S_PH : +gen_helper_mul_s_ph (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULQ_S_W : +gen_helper_mulq_s_w (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULQ_RS_W : +gen_helper_mulq_rs_w (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; + } +break ; +case OPC_DPA_W_PH_DSP : +switch (op2) { +case OPC_DPAU_H_QBL : +check_dsp (ctx); +gen_helper_dpau_h_qbl (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAU_H_QBR : +check_dsp (ctx); +gen_helper_dpau_h_qbr (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSU_H_QBL : +check_dsp (ctx); +gen_helper_dpsu_h_qbl (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSU_H_QBR : +check_dsp (ctx); +gen_helper_dpsu_h_qbr (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPA_W_PH : +check_dspr2 (ctx); +gen_helper_dpa_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAX_W_PH : +check_dspr2 (ctx); +gen_helper_dpax_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAQ_S_W_PH : +check_dsp (ctx); +gen_helper_dpaq_s_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAQX_S_W_PH : +check_dspr2 (ctx); +gen_helper_dpaqx_s_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAQX_SA_W_PH : +check_dspr2 (ctx); +gen_helper_dpaqx_sa_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPS_W_PH : +check_dspr2 (ctx); +gen_helper_dps_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSX_W_PH : +check_dspr2 (ctx); +gen_helper_dpsx_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSQ_S_W_PH : +check_dsp (ctx); +gen_helper_dpsq_s_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSQX_S_W_PH : +check_dspr2 (ctx); +gen_helper_dpsqx_s_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSQX_SA_W_PH : +check_dspr2 (ctx); + { +gen_helper_dpsqx_sa_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; + } +case OPC_MULSAQ_S_W_PH : +check_dsp (ctx); +gen_helper_mulsaq_s_w_ph (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPAQ_SA_L_W : +check_dsp (ctx); +gen_helper_dpaq_sa_l_w (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_DPSQ_SA_L_W : +check_dsp (ctx); +gen_helper_dpsq_sa_l_w (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_MAQ_S_W_PHL : +check_dsp (ctx); +gen_helper_maq_s_w_phl (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_MAQ_S_W_PHR : +check_dsp (ctx); +gen_helper_maq_s_w_phr (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_MAQ_SA_W_PHL : +check_dsp (ctx); +gen_helper_maq_sa_w_phl (t0, v1_t, + v2_t, cpu_env);
target-mips/translate.c static void gen_mipsdsp_shift(DisasContext *ctx, uint32_t opc, · line 13507
Quoted 10 lines
target-mips/translate.c +10
-0+break ; +case OPC_MAQ_SA_W_PHR : +check_dsp (ctx); +gen_helper_maq_sa_w_phr (t0, v1_t, + v2_t, cpu_env); +break ; +case OPC_MULSA_W_PH : +check_dspr2 (ctx); +gen_helper_mulsa_w_ph (t0, v1_t, + v2_t, cpu_env);
There also the call to the above helper can be on a single line.
Quoted 125 lines
target-mips/translate.c +125
-0+break ; + } +#ifdef TARGET_MIPS64 +case OPC_DPAQ_W_QH_DSP : + { +int ac = ret &0x03 ; +tcg_gen_movi_i32 (t0, ac); + +switch (op2) { +case OPC_DMADD : +check_dsp (ctx); +gen_helper_dmadd (v1_t, v2_t, t0, cpu_env); +break ; +case OPC_DMADDU : +check_dsp (ctx); +gen_helper_dmaddu (v1_t, v2_t, t0, cpu_env); +break ; +case OPC_DMSUB : +check_dsp (ctx); +gen_helper_dmsub (v1_t, v2_t, t0, cpu_env); +break ; +case OPC_DMSUBU : +check_dsp (ctx); +gen_helper_dmsubu (v1_t, v2_t, t0, cpu_env); +break ; +case OPC_DPA_W_QH : +check_dspr2 (ctx); +gen_helper_dpa_w_qh (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPAQ_S_W_QH : +check_dsp (ctx); +gen_helper_dpaq_s_w_qh (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPAQ_SA_L_PW : +check_dsp (ctx); +gen_helper_dpaq_sa_l_pw (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPAU_H_OBL : +check_dsp (ctx); +gen_helper_dpau_h_obl (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPAU_H_OBR : +check_dsp (ctx); +gen_helper_dpau_h_obr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPS_W_QH : +check_dspr2 (ctx); +gen_helper_dps_w_qh (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPSQ_S_W_QH : +check_dsp (ctx); +gen_helper_dpsq_s_w_qh (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPSQ_SA_L_PW : +check_dsp (ctx); +gen_helper_dpsq_sa_l_pw (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPSU_H_OBL : +check_dsp (ctx); +gen_helper_dpsu_h_obl (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_DPSU_H_OBR : +check_dsp (ctx); +gen_helper_dpsu_h_obr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_L_PWL : +check_dsp (ctx); +gen_helper_maq_s_l_pwl (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_L_PWR : +check_dsp (ctx); +gen_helper_maq_s_l_pwr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_W_QHLL : +check_dsp (ctx); +gen_helper_maq_s_w_qhll (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_SA_W_QHLL : +check_dsp (ctx); +gen_helper_maq_sa_w_qhll (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_W_QHLR : +check_dsp (ctx); +gen_helper_maq_s_w_qhlr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_SA_W_QHLR : +check_dsp (ctx); +gen_helper_maq_sa_w_qhlr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_W_QHRL : +check_dsp (ctx); +gen_helper_maq_s_w_qhrl (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_SA_W_QHRL : +check_dsp (ctx); +gen_helper_maq_sa_w_qhrl (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_S_W_QHRR : +check_dsp (ctx); +gen_helper_maq_s_w_qhrr (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MAQ_SA_W_QHRR : +check_dsp (ctx); +gen_helper_maq_sa_w_qhrr (v1_t, v2_t, + t0, cpu_env); +break ;
target-mips/translate.c static void gen_mipsdsp_shift(DisasContext *ctx, uint32_t opc, · line 13642
Quoted 10 lines
target-mips/translate.c +10
-0+case OPC_MULSAQ_S_L_PW : +check_dsp (ctx); +gen_helper_mulsaq_s_l_pw (v1_t, v2_t, + t0, cpu_env); +break ; +case OPC_MULSAQ_S_W_QH : +check_dsp (ctx); +gen_helper_mulsaq_s_w_qh (v1_t, v2_t, + t0, cpu_env); +break ;
There too. And later on.
Quoted 214 lines
target-mips/translate.c +172
-0+ } + } +break ; +#endif +case OPC_ADDU_QB_DSP : +switch (op2) { +case OPC_MULEU_S_PH_QBL : +check_dsp (ctx); +gen_helper_muleu_s_ph_qbl (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEU_S_PH_QBR : +check_dsp (ctx); +gen_helper_muleu_s_ph_qbr (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULQ_RS_PH : +check_dsp (ctx); +gen_helper_mulq_rs_ph (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEQ_S_W_PHL : +check_dsp (ctx); +gen_helper_muleq_s_w_phl (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEQ_S_W_PHR : +check_dsp (ctx); +gen_helper_muleq_s_w_phr (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULQ_S_PH : +check_dspr2 (ctx); +gen_helper_mulq_s_ph (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; + } +#ifdef TARGET_MIPS64 +case OPC_ADDU_OB_DSP : +switch (op2) { +case OPC_MULEQ_S_PW_QHL : +check_dsp (ctx); +gen_helper_muleq_s_pw_qhl (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEQ_S_PW_QHR : +check_dsp (ctx); +gen_helper_muleq_s_pw_qhr (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEU_S_QH_OBL : +check_dsp (ctx); +gen_helper_muleu_s_qh_obl (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULEU_S_QH_OBR : +check_dsp (ctx); +gen_helper_muleu_s_qh_obr (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_MULQ_RS_QH : +check_dsp (ctx); +gen_helper_mulq_rs_qh (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; + } +#endif +break ; + } + +tcg_temp_free_i32 (t0); +tcg_temp_free (v1_t); +tcg_temp_free (v2_t); + + (void )opn;/* avoid a compiler warning */ +MIPS_DEBUG ("%s" , opn); + +} +/* End MIPSDSP functions. */ static void decode_opc (CPUMIPSState *env,DisasContext *ctx,int *is_branch)@@ -13638,6 +14093,12 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_SUBQH_R_W :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_MUL_PH : +case OPC_MUL_S_PH : +case OPC_MULQ_S_W : +case OPC_MULQ_RS_W : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,1 ); +break ;default :MIPS_INVAL ("MASK ADDUH.QB" );generate_exception (ctx,EXCP_RI );@@ -13713,6 +14174,14 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_RADDU_W_QB :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_MULEU_S_PH_QBL : +case OPC_MULEU_S_PH_QBR : +case OPC_MULQ_RS_PH : +case OPC_MULEQ_S_W_PHL : +case OPC_MULEQ_S_W_PHR : +case OPC_MULQ_S_PH : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,1 ); +break ;default :/* Invalid */ MIPS_INVAL ("MASK ADDU.QB" );generate_exception (ctx,EXCP_RI );@@ -13743,6 +14212,39 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_SHLL_QB_DSP :gen_mipsdsp_shift (ctx, op1, rd, rs, rt);break ; +case OPC_DPA_W_PH_DSP : + op2 =MASK_DPA_W_PH (ctx->opcode); +switch (op2) { +case OPC_DPAU_H_QBL : +case OPC_DPAU_H_QBR : +case OPC_DPSU_H_QBL : +case OPC_DPSU_H_QBR : +case OPC_DPA_W_PH : +case OPC_DPAX_W_PH : +case OPC_DPAQ_S_W_PH : +case OPC_DPAQX_S_W_PH : +case OPC_DPAQX_SA_W_PH : +case OPC_DPS_W_PH : +case OPC_DPSX_W_PH : +case OPC_DPSQ_S_W_PH : +case OPC_DPSQX_S_W_PH : +case OPC_DPSQX_SA_W_PH : +case OPC_MULSAQ_S_W_PH : +case OPC_DPAQ_SA_L_W : +case OPC_DPSQ_SA_L_W : +case OPC_MAQ_S_W_PHL : +case OPC_MAQ_S_W_PHR : +case OPC_MAQ_SA_W_PHL : +case OPC_MAQ_SA_W_PHR : +case OPC_MULSA_W_PH : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,0 ); +break ; +default :/* Invalid */ +MIPS_INVAL ("MASK DPAW.PH" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;#if defined(TARGET_MIPS64 ) case OPC_DEXTM ... OPC_DEXT: case OPC_DINSM ... OPC_DINS:@@ -13816,6 +14318,13 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_ADDUH_R_OB :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_MULEQ_S_PW_QHL : +case OPC_MULEQ_S_PW_QHR : +case OPC_MULEU_S_QH_OBL : +case OPC_MULEU_S_QH_OBR : +case OPC_MULQ_RS_QH : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,1 ); +break ;default :/* Invalid */ MIPS_INVAL ("MASK ADDU.OB" );generate_exception (ctx,EXCP_RI );@@ -13844,6 +14353,45 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_DPAQ_W_QH_DSP : + op2 =MASK_DPAQ_W_QH (ctx->opcode); +switch (op2) { +case OPC_DPAU_H_OBL : +case OPC_DPAU_H_OBR : +case OPC_DPSU_H_OBL : +case OPC_DPSU_H_OBR : +case OPC_DPA_W_QH : +case OPC_DPAQ_S_W_QH : +case OPC_DPS_W_QH : +case OPC_DPSQ_S_W_QH : +case OPC_MULSAQ_S_W_QH : +case OPC_DPAQ_SA_L_PW : +case OPC_DPSQ_SA_L_PW : +case OPC_MULSAQ_S_L_PW : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,0 ); +break ; +case OPC_MAQ_S_W_QHLL : +case OPC_MAQ_S_W_QHLR : +case OPC_MAQ_S_W_QHRL : +case OPC_MAQ_S_W_QHRR : +case OPC_MAQ_SA_W_QHLL : +case OPC_MAQ_SA_W_QHLR : +case OPC_MAQ_SA_W_QHRL : +case OPC_MAQ_SA_W_QHRR : +case OPC_MAQ_S_L_PWL : +case OPC_MAQ_S_L_PWR : +case OPC_DMADD : +case OPC_DMADDU : +case OPC_DMSUB : +case OPC_DMSUBU : +gen_mipsdsp_multiply (ctx, op1, op2, rd, rs, rt,0 ); +break ; +default :/* Invalid */ +MIPS_INVAL ("MASK DPAQ.W.QH" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;case OPC_SHLL_OB_DSP :gen_mipsdsp_shift (ctx, op1, rd, rs, rt);break ;Signature · 1 line
1.7.10.2 (Apple Git-33)
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH v11 9/14 target-mips: Add ASE DSP bit/manipulation instructions
In reply to Jia LiuAdd MIPS ASE DSP Bit/Manipulation instructions.
--- target-mips/dsp_helper.c | 55 +++++++++++ target-mips/helper.h | 7 ++ target-mips/translate.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+)
target-mips/dsp_helper.c +55 -0
@@ -3148,6 +3148,61 @@ DM_OPERATE(dmsubu, mul_u32_u32, 0, 0);#undef DM_OPERATE#endif +/** DSP Bit/Manipulation Sub-class insns **/ +target_ulong helper_bitrev (target_ulong rt) +{ +int32_t temp; +uint32_t rd; +int i; + + temp = rt &MIPSDSP_LO ; + rd =0 ; +for (i =0 ; i <16 ; i++) { + rd = (rd <<1 ) | (temp &1 ); + temp = temp >>1 ; + } + +return (target_ulong )rd; +} + +#define BIT_INSV (name, posfilter, sizefilter, ret_type) \ +target_ulong helper_##name(CPUMIPSState *env, target_ulong rs, \ + target_ulong rt) \ +{ \ + uint32_t pos, size, msb, lsb; \ + target_ulong filter; \ + target_ulong temp, temprs, temprt; \ + target_ulong dspc; \ + \ + dspc = env->active_tc.DSPControl; \ + \ + pos = dspc & posfilter; \ + size = (dspc >> 7) & sizefilter; \ + \ + msb = pos + size - 1; \ + lsb = pos; \ + \ + if (lsb > msb || (msb > TARGET_LONG_BITS)) { \ + return rt; \ + } \ + \ + filter = ((int32_t)0x01 << size) - 1; \ + filter = filter << pos; \ + temprs = rs & filter; \ + temprt = rt & ~filter; \ + temp = temprs | temprt; \ + \ + return (target_long)(ret_type)temp; \ +} + +BIT_INSV (insv,0x1F ,0x1F , int32_t); +#ifdef TARGET_MIPS64 +BIT_INSV (dinsv,0x7F ,0x3F , target_long); +#endif + +#undef BIT_INSV + +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HI
target-mips/helper.h +7 -0
@@ -617,4 +617,11 @@ DEF_HELPER_FLAGS_4(dmsub, 0, void, tl, tl, i32, env) DEF_HELPER_FLAGS_4(dmsubu, 0, void, tl, tl, i32, env)#endif +/* DSP Bit/Manipulation Sub-class insns */ +DEF_HELPER_FLAGS_1(bitrev, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl) +DEF_HELPER_FLAGS_3(insv, 0, tl, env, tl, tl) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3 (dinsv,0 , tl, env, tl, tl); +#endif +#include "def-helper.h"
target-mips/translate.c +231 -0
291 lines not on this page · raw message
Signature · 1 line
1.7.10.2 (Apple Git-33)
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Quoted 177 lines · Jia Liu
Add MIPS ASE DSP Bit/Manipulation instructions.
Signed-off-by Jia Liu <[email protected]>--- target-mips/dsp_helper.c | 55 +++++++++++ target-mips/helper.h | 7 ++ target-mips/translate.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+)target-mips/dsp_helper.c +55
-0@@ -3148,6 +3148,61 @@ DM_OPERATE(dmsubu, mul_u32_u32, 0, 0);#undef DM_OPERATE#endif +/** DSP Bit/Manipulation Sub-class insns **/ +target_ulong helper_bitrev (target_ulong rt) +{ +int32_t temp; +uint32_t rd; +int i; + + temp = rt &MIPSDSP_LO ; + rd =0 ; +for (i =0 ; i <16 ; i++) { + rd = (rd <<1 ) | (temp &1 ); + temp = temp >>1 ; + } + +return (target_ulong )rd; +} + +#define BIT_INSV (name, posfilter, sizefilter, ret_type) \ +target_ulong helper_##name(CPUMIPSState *env, target_ulong rs, \ + target_ulong rt) \ +{ \ + uint32_t pos, size, msb, lsb; \ + target_ulong filter; \ + target_ulong temp, temprs, temprt; \ + target_ulong dspc; \ + \ + dspc = env->active_tc.DSPControl; \ + \ + pos = dspc & posfilter; \ + size = (dspc >> 7) & sizefilter; \ + \ + msb = pos + size - 1; \ + lsb = pos; \ + \ + if (lsb > msb || (msb > TARGET_LONG_BITS)) { \ + return rt; \ + } \ + \ + filter = ((int32_t)0x01 << size) - 1; \ + filter = filter << pos; \ + temprs = rs & filter; \ + temprt = rt & ~filter; \ + temp = temprs | temprt; \ + \ + return (target_long)(ret_type)temp; \ +} + +BIT_INSV (insv,0x1F ,0x1F , int32_t); +#ifdef TARGET_MIPS64 +BIT_INSV (dinsv,0x7F ,0x3F , target_long); +#endif + +#undef BIT_INSV + +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HItarget-mips/helper.h +7
-0@@ -617,4 +617,11 @@ DEF_HELPER_FLAGS_4(dmsub, 0, void, tl, tl, i32, env) DEF_HELPER_FLAGS_4(dmsubu, 0, void, tl, tl, i32, env)#endif +/* DSP Bit/Manipulation Sub-class insns */ +DEF_HELPER_FLAGS_1(bitrev, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl) +DEF_HELPER_FLAGS_3(insv, 0, tl, env, tl, tl) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3 (dinsv,0 , tl, env, tl, tl); +#endif +#include "def-helper.h" target-mips/translate.c +43
-0@@ -343,6 +343,11 @@ enum {#if defined(TARGET_MIPS64 ) OPC_DPAQ_W_QH_DSP = 0x34 | OPC_SPECIAL3, #endif + /* DSP Bit/Manipulation Sub-class */ + OPC_INSV_DSP = 0x0C | OPC_SPECIAL3, +#if defined(TARGET_MIPS64) + OPC_DINSV_DSP = 0x0D | OPC_SPECIAL3, +#endif };/* BSHFL opcodes */ @@ -450,6 +455,12 @@ enum {OPC_PRECEU_PH_QBR = (0x1D <<6 ) |OPC_ABSQ_S_PH_DSP ,OPC_PRECEU_PH_QBLA = (0x1E <<6 ) |OPC_ABSQ_S_PH_DSP ,OPC_PRECEU_PH_QBRA = (0x1F <<6 ) |OPC_ABSQ_S_PH_DSP , +/* DSP Bit/Manipulation Sub-class */ +OPC_BITREV = (0x1B <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPL_QB = (0x02 <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPLV_QB = (0x03 <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPL_PH = (0x0A <<6 ) |OPC_ABSQ_S_PH_DSP , + OPC_REPLV_PH = (0x0B << 6) | OPC_ABSQ_S_PH_DSP, };#define MASK_CMPU_EQ_QB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))@@ -518,6 +529,12 @@ enum { OPC_MULSA_W_PH = (0x02 << 6) | OPC_DPA_W_PH_DSP, }; +#define MASK_INSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* DSP Bit/Manipulation Sub-class */ +OPC_INSV = (0x00 <<6 ) |OPC_INSV_DSP , +}; +#if defined(TARGET_MIPS64 )#define MASK_ABSQ_S_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) enum {@@ -539,6 +556,13 @@ enum {OPC_ABSQ_S_OB = (0x01 <<6 ) |OPC_ABSQ_S_QH_DSP ,OPC_ABSQ_S_PW = (0x11 <<6 ) |OPC_ABSQ_S_QH_DSP ,OPC_ABSQ_S_QH = (0x09 <<6 ) |OPC_ABSQ_S_QH_DSP , +/* DSP Bit/Manipulation Sub-class */ +OPC_REPL_OB = (0x02 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPL_PW = (0x12 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPL_QH = (0x0A <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPLV_OB = (0x03 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPLV_PW = (0x13 <<6 ) |OPC_ABSQ_S_QH_DSP , + OPC_REPLV_QH = (0x0B << 6) | OPC_ABSQ_S_QH_DSP, };#endif @@ -592,6 +616,14 @@ enum {#endif #if defined(TARGET_MIPS64 ) +#define MASK_DINSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* DSP Bit/Manipulation Sub-class */ +OPC_DINSV = (0x00 <<6 ) |OPC_DINSV_DSP , +}; +#endif + +#if defined(TARGET_MIPS64 )#define MASK_DPAQ_W_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* MIPS DSP Multiply Sub-class insns */@@ -13719,6 +13751,152 @@ static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, } +static void gen_mipsdsp_bitinsn (CPUMIPSState *env,DisasContext *ctx, +uint32_t op1,uint32_t op2, +int ret,int val) +{ +const char *opn ="mipsdsp Bit/ Manipulation" ; +TCGv t0 =tcg_temp_new (); +TCGv val_t =tcg_temp_new (); +int16_t imm; + +if (ret ==0 ) { +/* Treat as NOP. */
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13774
Quoted 10 lines
target-mips/translate.c +10
-0+MIPS_DEBUG ("NOP" ); +return ; + } + +if (val ==0 ) { +tcg_gen_movi_tl (val_t,0 ); + }else { +gen_load_gpr (val_t, val); + } +
Same comments as for the previous patches.
Quoted 5 lines
target-mips/translate.c +5
-0+switch (op1) { +case OPC_ABSQ_S_PH_DSP : +switch (op2) { +case OPC_BITREV : +check_dsp (ctx);
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13789
Quoted 10 lines
target-mips/translate.c +10
-0+gen_helper_bitrev (cpu_gpr[ret], val_t); +break ; +case OPC_REPL_QB : +check_dsp (ctx); + { +target_long result; + imm = (ctx->opcode >>16 ) &0xFF ; + result = (uint32_t )imm <<24 | \ + (uint32_t )imm <<16 | \ + (uint32_t)imm << 8 | \
It's C, you don't need \ at the end of the line.
Quoted 38 lines
target-mips/translate.c +38
-0+ (uint32_t )imm; + result = (int32_t )result; +tcg_gen_movi_tl (cpu_gpr[ret], result); + } +break ; +case OPC_REPLV_QB : +check_dsp (ctx); +tcg_gen_ext8u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],8 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_ext32s_tl (cpu_gpr[ret], cpu_gpr[ret]); +break ; +case OPC_REPL_PH : +check_dsp (ctx); + { + imm = (ctx->opcode >>16 ) &0x03FF ; +tcg_gen_movi_tl (cpu_gpr[ret], \ + (target_long)((int32_t )imm <<16 | \ + (uint32_t )(uint16_t )imm)); + } +break ; +case OPC_REPLV_PH : +check_dsp (ctx); +tcg_gen_ext16u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_ext32s_tl (cpu_gpr[ret], cpu_gpr[ret]); +break ; + } +break ; +#ifdef TARGET_MIPS64 +case OPC_ABSQ_S_QH_DSP : +switch (op2) { +case OPC_REPL_OB : +check_dsp (ctx); + {
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13837
Quoted 10 lines
target-mips/translate.c +10
-0+target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm; + temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }
This hasn't been fixed, and thus is still wrong.
Quoted 13 lines
target-mips/translate.c +13
-0+case OPC_REPL_PW : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0x03FF ; + imm = (int16_t )(imm <<6 ) >>6 ; + temp = ((target_long )imm <<32 ) \ + | ((target_long )imm &0xFFFFFFFF ); +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + } +case OPC_REPL_QH :
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13860
Quoted 10 lines
target-mips/translate.c +10
-0+check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0x03FF ; + imm = (int16_t )(imm <<6 ) >>6 ; + + temp = ((uint64_t )(uint16_t )imm <<48 ) | \ + ((uint64_t )(uint16_t )imm <<32 ) | \ + ((uint64_t)(uint16_t)imm << 16) | \
Same here.
Quoted 63 lines
target-mips/translate.c +49
-0+ (uint64_t )(uint16_t )imm; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + } +case OPC_REPLV_OB : +check_dsp (ctx); +tcg_gen_ext8u_tl (cpu_gpr[ret], cpu_gpr[ret]); +tcg_gen_shli_tl (t0, cpu_gpr[ret],8 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; +case OPC_REPLV_PW : +check_dsp (ctx); +tcg_gen_ext32u_i64 (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_and_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; +case OPC_REPLV_QH : +check_dsp (ctx); +tcg_gen_ext16u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; + } +break ; +#endif + } +tcg_temp_free (t0); +tcg_temp_free (val_t); + + (void )opn;/* avoid a compiler warning */ +MIPS_DEBUG ("%s" , opn); +} +/* End MIPSDSP functions. */ static void decode_opc (CPUMIPSState *env,DisasContext *ctx,int *is_branch)@@ -14145,6 +14323,13 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_PRECEU_PH_QBRA :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_BITREV : +case OPC_REPL_QB : +case OPC_REPLV_QB : +case OPC_REPL_PH : +case OPC_REPLV_PH : +gen_mipsdsp_bitinsn (env, ctx, op1, op2, rd, rt); +break ;default :MIPS_INVAL ("MASK ABSQ_S.PH" );generate_exception (ctx,EXCP_RI );@@ -14245,6 +14430,26 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_INSV_DSP : + op2 =MASK_INSV (ctx->opcode); +switch (op2) {
target-mips/translate.c static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) · line 14445
Quoted 10 lines
target-mips/translate.c +10
-0+case OPC_INSV : +check_dsp (ctx); + { +if (rt ==0 ) { +MIPS_DEBUG ("NOP" ); +break ; + } +gen_helper_insv (cpu_gpr[rt], cpu_env, + cpu_gpr[rs], cpu_gpr[rt]); +break ;
This won't work if rs or rt are 0.
Quoted 30 lines
target-mips/translate.c +16
-0+ } +default :/* Invalid */ +MIPS_INVAL ("MASK INSV" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;#if defined(TARGET_MIPS64 ) case OPC_DEXTM ... OPC_DEXT: case OPC_DINSM ... OPC_DINS:@@ -14286,6 +14491,14 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_ABSQ_S_QH :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_REPL_OB : +case OPC_REPL_PW : +case OPC_REPL_QH : +case OPC_REPLV_OB : +case OPC_REPLV_PW : +case OPC_REPLV_QH : +gen_mipsdsp_bitinsn (env, ctx, op1, op2, rd, rt); +break ;default :/* Invalid */ MIPS_INVAL ("MASK ABSQ_S.QH" );generate_exception (ctx,EXCP_RI );@@ -14392,6 +14605,24 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_DINSV_DSP :
target-mips/translate.c static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) · line 14618
Quoted 10 lines
target-mips/translate.c +10
-0+ op2 =MASK_INSV (ctx->opcode); +switch (op2) { +case OPC_DINSV : +check_dsp (ctx); +if (rt ==0 ) { +MIPS_DEBUG ("NOP" ); +break ; + } +gen_helper_dinsv (cpu_gpr[rt], cpu_env, + cpu_gpr[rs], cpu_gpr[rt]);
This won't work if rs or rt are 0.
Quoted 14 lines
target-mips/translate.c +7
-0+break ; +default :/* Invalid */ +MIPS_INVAL ("MASK DINSV" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;case OPC_SHLL_OB_DSP :gen_mipsdsp_shift (ctx, op1, rd, rs, rt);break ;Signature · 1 line
1.7.10.2 (Apple Git-33)
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Hi Aurelien,
Quoted 251 lines · Aurelien Jarno
Quoted 177 lines · Jia Liu
Add MIPS ASE DSP Bit/Manipulation instructions.
Signed-off-by Jia Liu <[email protected]>--- target-mips/dsp_helper.c | 55 +++++++++++ target-mips/helper.h | 7 ++ target-mips/translate.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 293 insertions(+)target-mips/dsp_helper.c +55
-0@@ -3148,6 +3148,61 @@ DM_OPERATE(dmsubu, mul_u32_u32, 0, 0);#undef DM_OPERATE#endif +/** DSP Bit/Manipulation Sub-class insns **/ +target_ulong helper_bitrev (target_ulong rt) +{ +int32_t temp; +uint32_t rd; +int i; + + temp = rt &MIPSDSP_LO ; + rd =0 ; +for (i =0 ; i <16 ; i++) { + rd = (rd <<1 ) | (temp &1 ); + temp = temp >>1 ; + } + +return (target_ulong )rd; +} + +#define BIT_INSV (name, posfilter, sizefilter, ret_type) \ +target_ulong helper_##name(CPUMIPSState *env, target_ulong rs, \ + target_ulong rt) \ +{ \ + uint32_t pos, size, msb, lsb; \ + target_ulong filter; \ + target_ulong temp, temprs, temprt; \ + target_ulong dspc; \ + \ + dspc = env->active_tc.DSPControl; \ + \ + pos = dspc & posfilter; \ + size = (dspc >> 7) & sizefilter; \ + \ + msb = pos + size - 1; \ + lsb = pos; \ + \ + if (lsb > msb || (msb > TARGET_LONG_BITS)) { \ + return rt; \ + } \ + \ + filter = ((int32_t)0x01 << size) - 1; \ + filter = filter << pos; \ + temprs = rs & filter; \ + temprt = rt & ~filter; \ + temp = temprs | temprt; \ + \ + return (target_long)(ret_type)temp; \ +} + +BIT_INSV (insv,0x1F ,0x1F , int32_t); +#ifdef TARGET_MIPS64 +BIT_INSV (dinsv,0x7F ,0x3F , target_long); +#endif + +#undef BIT_INSV + +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HItarget-mips/helper.h +7
-0@@ -617,4 +617,11 @@ DEF_HELPER_FLAGS_4(dmsub, 0, void, tl, tl, i32, env) DEF_HELPER_FLAGS_4(dmsubu, 0, void, tl, tl, i32, env)#endif +/* DSP Bit/Manipulation Sub-class insns */ +DEF_HELPER_FLAGS_1(bitrev, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl) +DEF_HELPER_FLAGS_3(insv, 0, tl, env, tl, tl) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3 (dinsv,0 , tl, env, tl, tl); +#endif +#include "def-helper.h" target-mips/translate.c +43
-0@@ -343,6 +343,11 @@ enum {#if defined(TARGET_MIPS64 ) OPC_DPAQ_W_QH_DSP = 0x34 | OPC_SPECIAL3, #endif + /* DSP Bit/Manipulation Sub-class */ + OPC_INSV_DSP = 0x0C | OPC_SPECIAL3, +#if defined(TARGET_MIPS64) + OPC_DINSV_DSP = 0x0D | OPC_SPECIAL3, +#endif };/* BSHFL opcodes */ @@ -450,6 +455,12 @@ enum {OPC_PRECEU_PH_QBR = (0x1D <<6 ) |OPC_ABSQ_S_PH_DSP ,OPC_PRECEU_PH_QBLA = (0x1E <<6 ) |OPC_ABSQ_S_PH_DSP ,OPC_PRECEU_PH_QBRA = (0x1F <<6 ) |OPC_ABSQ_S_PH_DSP , +/* DSP Bit/Manipulation Sub-class */ +OPC_BITREV = (0x1B <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPL_QB = (0x02 <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPLV_QB = (0x03 <<6 ) |OPC_ABSQ_S_PH_DSP , +OPC_REPL_PH = (0x0A <<6 ) |OPC_ABSQ_S_PH_DSP , + OPC_REPLV_PH = (0x0B << 6) | OPC_ABSQ_S_PH_DSP, };#define MASK_CMPU_EQ_QB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))@@ -518,6 +529,12 @@ enum { OPC_MULSA_W_PH = (0x02 << 6) | OPC_DPA_W_PH_DSP, }; +#define MASK_INSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* DSP Bit/Manipulation Sub-class */ +OPC_INSV = (0x00 <<6 ) |OPC_INSV_DSP , +}; +#if defined(TARGET_MIPS64 )#define MASK_ABSQ_S_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) enum {@@ -539,6 +556,13 @@ enum {OPC_ABSQ_S_OB = (0x01 <<6 ) |OPC_ABSQ_S_QH_DSP ,OPC_ABSQ_S_PW = (0x11 <<6 ) |OPC_ABSQ_S_QH_DSP ,OPC_ABSQ_S_QH = (0x09 <<6 ) |OPC_ABSQ_S_QH_DSP , +/* DSP Bit/Manipulation Sub-class */ +OPC_REPL_OB = (0x02 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPL_PW = (0x12 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPL_QH = (0x0A <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPLV_OB = (0x03 <<6 ) |OPC_ABSQ_S_QH_DSP , +OPC_REPLV_PW = (0x13 <<6 ) |OPC_ABSQ_S_QH_DSP , + OPC_REPLV_QH = (0x0B << 6) | OPC_ABSQ_S_QH_DSP, };#endif @@ -592,6 +616,14 @@ enum {#endif #if defined(TARGET_MIPS64 ) +#define MASK_DINSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* DSP Bit/Manipulation Sub-class */ +OPC_DINSV = (0x00 <<6 ) |OPC_DINSV_DSP , +}; +#endif + +#if defined(TARGET_MIPS64 )#define MASK_DPAQ_W_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* MIPS DSP Multiply Sub-class insns */@@ -13719,6 +13751,152 @@ static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, } +static void gen_mipsdsp_bitinsn (CPUMIPSState *env,DisasContext *ctx, +uint32_t op1,uint32_t op2, +int ret,int val) +{ +const char *opn ="mipsdsp Bit/ Manipulation" ; +TCGv t0 =tcg_temp_new (); +TCGv val_t =tcg_temp_new (); +int16_t imm; + +if (ret ==0 ) { +/* Treat as NOP. */ target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13774
Quoted 10 lines
target-mips/translate.c +10
-0+MIPS_DEBUG ("NOP" ); +return ; + } + +if (val ==0 ) { +tcg_gen_movi_tl (val_t,0 ); + }else { +gen_load_gpr (val_t, val); + } +Same comments as for the previous patches.
Quoted 5 lines
target-mips/translate.c +5
-0+switch (op1) { +case OPC_ABSQ_S_PH_DSP : +switch (op2) { +case OPC_BITREV : +check_dsp (ctx);target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13789
Quoted 10 lines
target-mips/translate.c +10
-0+gen_helper_bitrev (cpu_gpr[ret], val_t); +break ; +case OPC_REPL_QB : +check_dsp (ctx); + { +target_long result; + imm = (ctx->opcode >>16 ) &0xFF ; + result = (uint32_t )imm <<24 | \ + (uint32_t )imm <<16 | \ + (uint32_t)imm << 8 | \It's C, you don't need \ at the end of the line.
Quoted 42 lines
target-mips/translate.c +42
-0+ (uint32_t )imm; + result = (int32_t )result; +tcg_gen_movi_tl (cpu_gpr[ret], result); + } +break ; +case OPC_REPLV_QB : +check_dsp (ctx); +tcg_gen_ext8u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],8 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_ext32s_tl (cpu_gpr[ret], cpu_gpr[ret]); +break ; +case OPC_REPL_PH : +check_dsp (ctx); + { + imm = (ctx->opcode >>16 ) &0x03FF ; +tcg_gen_movi_tl (cpu_gpr[ret], \ + (target_long)((int32_t )imm <<16 | \ + (uint32_t )(uint16_t )imm)); + } +break ; +case OPC_REPLV_PH : +check_dsp (ctx); +tcg_gen_ext16u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_ext32s_tl (cpu_gpr[ret], cpu_gpr[ret]); +break ; + } +break ; +#ifdef TARGET_MIPS64 +case OPC_ABSQ_S_QH_DSP : +switch (op2) { +case OPC_REPL_OB : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm;
Quoted 9 lines
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13837
Quoted 6 lines
target-mips/translate.c +6
-0+ temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }This hasn't been fixed, and thus is still wrong.
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.
Quoted 160 lines
Quoted 13 lines
target-mips/translate.c +13
-0+case OPC_REPL_PW : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0x03FF ; + imm = (int16_t )(imm <<6 ) >>6 ; + temp = ((target_long )imm <<32 ) \ + | ((target_long )imm &0xFFFFFFFF ); +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + } +case OPC_REPL_QH :target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13860
Quoted 10 lines
target-mips/translate.c +10
-0+check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0x03FF ; + imm = (int16_t )(imm <<6 ) >>6 ; + + temp = ((uint64_t )(uint16_t )imm <<48 ) | \ + ((uint64_t )(uint16_t )imm <<32 ) | \ + ((uint64_t)(uint16_t)imm << 16) | \Same here.
Quoted 63 lines
target-mips/translate.c +49
-0+ (uint64_t )(uint16_t )imm; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + } +case OPC_REPLV_OB : +check_dsp (ctx); +tcg_gen_ext8u_tl (cpu_gpr[ret], cpu_gpr[ret]); +tcg_gen_shli_tl (t0, cpu_gpr[ret],8 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; +case OPC_REPLV_PW : +check_dsp (ctx); +tcg_gen_ext32u_i64 (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_and_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; +case OPC_REPLV_QH : +check_dsp (ctx); +tcg_gen_ext16u_tl (cpu_gpr[ret], val_t); +tcg_gen_shli_tl (t0, cpu_gpr[ret],16 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +tcg_gen_shli_tl (t0, cpu_gpr[ret],32 ); +tcg_gen_or_tl (cpu_gpr[ret], cpu_gpr[ret], t0); +break ; + } +break ; +#endif + } +tcg_temp_free (t0); +tcg_temp_free (val_t); + + (void )opn;/* avoid a compiler warning */ +MIPS_DEBUG ("%s" , opn); +} +/* End MIPSDSP functions. */ static void decode_opc (CPUMIPSState *env,DisasContext *ctx,int *is_branch)@@ -14145,6 +14323,13 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_PRECEU_PH_QBRA :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_BITREV : +case OPC_REPL_QB : +case OPC_REPLV_QB : +case OPC_REPL_PH : +case OPC_REPLV_PH : +gen_mipsdsp_bitinsn (env, ctx, op1, op2, rd, rt); +break ;default :MIPS_INVAL ("MASK ABSQ_S.PH" );generate_exception (ctx,EXCP_RI );@@ -14245,6 +14430,26 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_INSV_DSP : + op2 =MASK_INSV (ctx->opcode); +switch (op2) {target-mips/translate.c static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) · line 14445
Quoted 10 lines
target-mips/translate.c +10
-0+case OPC_INSV : +check_dsp (ctx); + { +if (rt ==0 ) { +MIPS_DEBUG ("NOP" ); +break ; + } +gen_helper_insv (cpu_gpr[rt], cpu_env, + cpu_gpr[rs], cpu_gpr[rt]); +break ;This won't work if rs or rt are 0.
Quoted 30 lines
target-mips/translate.c +16
-0+ } +default :/* Invalid */ +MIPS_INVAL ("MASK INSV" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;#if defined(TARGET_MIPS64 ) case OPC_DEXTM ... OPC_DEXT: case OPC_DINSM ... OPC_DINS:@@ -14286,6 +14491,14 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_ABSQ_S_QH :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_REPL_OB : +case OPC_REPL_PW : +case OPC_REPL_QH : +case OPC_REPLV_OB : +case OPC_REPLV_PW : +case OPC_REPLV_QH : +gen_mipsdsp_bitinsn (env, ctx, op1, op2, rd, rt); +break ;default :/* Invalid */ MIPS_INVAL ("MASK ABSQ_S.QH" );generate_exception (ctx,EXCP_RI );@@ -14392,6 +14605,24 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_DINSV_DSP :target-mips/translate.c static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) · line 14618
Quoted 10 lines
target-mips/translate.c +10
-0+ op2 =MASK_INSV (ctx->opcode); +switch (op2) { +case OPC_DINSV : +check_dsp (ctx); +if (rt ==0 ) { +MIPS_DEBUG ("NOP" ); +break ; + } +gen_helper_dinsv (cpu_gpr[rt], cpu_env, + cpu_gpr[rs], cpu_gpr[rt]);This won't work if rs or rt are 0.
Quoted 11 lines
target-mips/translate.c +7
-1+break ; +default :/* Invalid */ +MIPS_INVAL ("MASK DINSV" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;case OPC_SHLL_OB_DSP :gen_mipsdsp_shift (ctx, op1, rd, rs, rt);break ; --Quoted 3 lines
1.7.10.2 (Apple Git-33)
Quoted 3 lines
--
Aurelien Jarno GPG: 1024D/F1BCDB73
[email protected] http://www.aurel32.net
Regards,
Jia.
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Quoted 22 lines · Jia Liu
Hi Aurelien,
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+#ifdef TARGET_MIPS64 +case OPC_ABSQ_S_QH_DSP : +switch (op2) { +case OPC_REPL_OB : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm;Quoted 9 lines
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13837
Quoted 6 lines
target-mips/translate.c +6
-0+ temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }This hasn't been fixed, and thus is still wrong.
Quoted 4 lines
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.
The instruction is defined as:
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediate
In your code, I only see the value replicated 4 times, not 8 times.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Hi Aurelien,
Quoted 28 lines · Aurelien Jarno
Quoted 22 lines · Jia Liu
Hi Aurelien,
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+#ifdef TARGET_MIPS64 +case OPC_ABSQ_S_QH_DSP : +switch (op2) { +case OPC_REPL_OB : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm;Quoted 9 lines
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13837
Quoted 6 lines
target-mips/translate.c +6
-0+ temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }This hasn't been fixed, and thus is still wrong.
Quoted 4 lines
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.
Quoted 9 lines
The instruction is defined as:
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediateIn your code, I only see the value replicated 4 times, not 8 times.
Thank you very much, is this code OK?
case OPC_REPL_OB:
check_dsp(ctx);
{
target_long temp;
imm = (ctx->opcode >> 16) & 0xFF;
temp = ((uint64_t)imm << 56) | ((uint64_t)imm << 48) |
((uint64_t)imm << 40) | ((uint64_t)imm << 32) |
((uint64_t)imm << 24) | ((uint64_t)imm << 16) |
((uint64_t)imm << 8) | (uint64_t)imm;
tcg_gen_movi_tl(cpu_gpr[ret], temp);
break;
}Quoted 4 lines
--
Aurelien Jarno GPG: 1024D/F1BCDB73
[email protected] http://www.aurel32.net
Regards,
Jia.
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Quoted 44 lines · Jia Liu
Hi Aurelien,
Quoted 28 lines · Aurelien Jarno
Quoted 22 lines · Jia Liu
Hi Aurelien,
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+#ifdef TARGET_MIPS64 +case OPC_ABSQ_S_QH_DSP : +switch (op2) { +case OPC_REPL_OB : +check_dsp (ctx); + { +target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm;Quoted 9 lines
target-mips/translate.c static void gen_mipsdsp_multiply(DisasContext *ctx, uint32_t op1, uint32_t op2, · line 13837
Quoted 6 lines
target-mips/translate.c +6
-0+ temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }This hasn't been fixed, and thus is still wrong.
Quoted 4 lines
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.Quoted 9 lines
The instruction is defined as:
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediateIn your code, I only see the value replicated 4 times, not 8 times.
Thank you very much, is this code OK?
case
OPC_REPL_OB:
Quoted 13 lines
check_dsp(ctx);
{
target_long temp;
imm = (ctx->opcode >> 16) & 0xFF;
temp = ((uint64_t)imm << 56) | ((uint64_t)imm << 48) |
((uint64_t)imm << 40) | ((uint64_t)imm << 32) |
((uint64_t)imm << 24) | ((uint64_t)imm << 16) |
((uint64_t)imm << 8) | (uint64_t)imm;
tcg_gen_movi_tl(cpu_gpr[ret], temp);
break;
}Yes, this looks fine now.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
In reply to Aurelien JarnoQuoted 18 lines · Aurelien Jarno
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm; + temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
This hasn't been fixed, and thus is still wrong.
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.
Quoted 8 lines
The instruction is defined as:
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediateIn your code, I only see the value replicated 4 times, not 8 times.
There are 3 doublings: 2**3 = 8. Look again, it's right.
r~
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Quoted 21 lines · Richard Henderson
Quoted 20 lines · Aurelien Jarno
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm; + temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
This hasn't been fixed, and thus is still wrong.
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.The instruction is defined as:
Quoted 9 lines
Quoted 6 lines
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediateIn your code, I only see the value replicated 4 times, not 8 times.
There are 3 doublings: 2**3 = 8. Look again, it's right.
Oops, you are correct, I read it to fast and thought it was implemented the same way as the other REPL instructions, that is the immediate are orred one at a time.
So Jia, please keep the original version of this code.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Re: [Qemu-devel] [PATCH v11 09/14] target-mips: Add ASE DSP bit/manipulation instructions
Quoted 27 lines · Aurelien Jarno
Quoted 26 lines · Richard Henderson
Quoted 25 lines · Aurelien Jarno
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
target-mips/translate.c +10
-0+target_long temp; + + imm = (ctx->opcode >>16 ) &0xFF ; + temp = imm; + temp = (temp <<8 ) | temp; + temp = (temp <<16 ) | temp; + temp = (temp <<32 ) | temp; +tcg_gen_movi_tl (cpu_gpr[ret], temp); +break ; + }Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
This hasn't been fixed, and thus is still wrong.
Thank you for check this again.
May you give me more comment about this please? I'm not sure what should do here.The instruction is defined as:
| Replicate a immediate byte into all elements of an eight byte vector. | | Description: rd ← immediate || immediate || immediate || immediate || immediate || | immediate || immediate || immediate
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
In your code, I only see the value replicated 4 times, not 8 times.
There are 3 doublings: 2**3 = 8. Look again, it's right.
Thank you very much to point this, Richard.
Quoted 7 lines
Oops, you are correct, I read it to fast and thought it was implemented the same way as the other REPL instructions, that is the immediate are orred one at a time.
So Jia, please keep the original version of this code.
OK, I'll make it back.
Quoted 3 lines
--
Aurelien Jarno GPG: 1024D/F1BCDB73
[email protected] http://www.aurel32.net
Regards,
Jia.
PATCH v11 10/14 target-mips: Add ASE DSP compare-pick instructions
In reply to Jia LiuAdd MIPS ASE DSP Compare-Pick instructions.
--- target-mips/dsp_helper.c | 233 +++++++++++++++++++++++++++++ target-mips/helper.h | 52 +++++++ target-mips/translate.c | 372 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 657 insertions(+)
target-mips/dsp_helper.c +233 -0
@@ -3203,6 +3203,239 @@ BIT_INSV(dinsv, 0x7F, 0x3F, target_long);#undef BIT_INSV +/** DSP Compare-Pick Sub-class insns **/ +#define CMP_HAS_RET (name, func, split_num, filter, bit_size) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt) \ +{ \ + uint32_t rs_t, rt_t; \ + uint8_t cc; \ + uint32_t temp = 0; \ + int i; \ + \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + cc = mipsdsp_##func(rs_t, rt_t); \ + temp |= cc << i; \ + } \ + \ + return (target_ulong)temp; \ +} + +CMP_HAS_RET (cmpgu_eq_qb, cmp_eq,4 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_lt_qb, cmp_lt,4 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_le_qb, cmp_le,4 ,MIPSDSP_Q0 ,8 ); + +#ifdef TARGET_MIPS64 +CMP_HAS_RET (cmpgu_eq_ob, cmp_eq,8 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_lt_ob, cmp_lt,8 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_le_ob, cmp_le,8 ,MIPSDSP_Q0 ,8 ); +#endif + +#undef CMP_HAS_RET + + +#define CMP_NO_RET (name, func, split_num, filter, bit_size) \ +void helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int32_t rs_t, rt_t; \ + int32_t flag = 0; \ + int32_t cc; \ + int i; \ + \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + \ + cc = mipsdsp_##func(rs_t, rt_t); \ + flag |= cc << i; \ + } \ + \ + set_DSPControl_24(flag, split_num, env); \ +} + +CMP_NO_RET (cmpu_eq_qb, cmp_eq,4 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_lt_qb, cmp_lt,4 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_le_qb, cmp_le,4 ,MIPSDSP_Q0 ,8 ); + +CMP_NO_RET (cmp_eq_ph, cmp_eq,2 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_lt_ph, cmp_lt,2 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_le_ph, cmp_le,2 ,MIPSDSP_LO ,16 ); + +#ifdef TARGET_MIPS64 +CMP_NO_RET (cmpu_eq_ob, cmp_eq,8 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_lt_ob, cmp_lt,8 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_le_ob, cmp_le,8 ,MIPSDSP_Q0 ,8 ); + +CMP_NO_RET (cmp_eq_qh, cmp_eq,4 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_lt_qh, cmp_lt,4 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_le_qh, cmp_le,4 ,MIPSDSP_LO ,16 ); + +CMP_NO_RET (cmp_eq_pw, cmp_eq,2 ,MIPSDSP_LLO ,32 ); +CMP_NO_RET (cmp_lt_pw, cmp_lt,2 ,MIPSDSP_LLO ,32 ); +CMP_NO_RET (cmp_le_pw, cmp_le,2 ,MIPSDSP_LLO ,32 ); +#endif +#undef CMP_NO_RET + +#if defined(TARGET_MIPS64 ) + +#define CMPGDU_OB (name) \ +target_ulong helper_cmpgdu_##name##_ob(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int i; \ + uint8_t rs_t, rt_t; \ + uint32_t cond; \ + \ + cond = 0; \ + \ + for (i = 0; i < 8; i++) { \ + rs_t = (rs >> (8 * i)) & MIPSDSP_Q0; \ + rt_t = (rt >> (8 * i)) & MIPSDSP_Q0; \ + \ + if (mipsdsp_cmp_##name(rs_t, rt_t)) { \ + cond |= 0x01 << i; \ + } \ + } \ + \ + set_DSPControl_24(cond, 8, env); \ + \ + return (uint64_t)cond; \ +} + +CMPGDU_OB(eq) +CMPGDU_OB(lt) +CMPGDU_OB(le) +#undef CMPGDU_OB +#endif + +#define PICK_INSN (name, split_num, filter, bit_size, ret32bit) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint32_t rs_t, rt_t; \ + uint32_t cc; \ + target_ulong dsp; \ + int i; \ + target_ulong result = 0; \ + \ + dsp = env->active_tc.DSPControl; \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + cc = (dsp >> (24 + i)) & 0x01; \ + cc = cc == 1 ? rs_t : rt_t; \ + \ + result |= (target_ulong)cc << (bit_size * i); \ + } \ + \ + if (ret32bit) { \ + result = (target_long)(int32_t)(result & MIPSDSP_LLO); \ + } \ + \ + return result; \ +} + +PICK_INSN (pick_qb,4 ,MIPSDSP_Q0 ,8 ,1 ); +PICK_INSN (pick_ph,2 ,MIPSDSP_LO ,16 ,1 ); + +#ifdef TARGET_MIPS64 +PICK_INSN (pick_ob,8 ,MIPSDSP_Q0 ,8 ,0 ); +PICK_INSN (pick_qh,4 ,MIPSDSP_LO ,16 ,0 ); +PICK_INSN (pick_pw,2 ,MIPSDSP_LLO ,32 ,0 ); +#endif +#undef PICK_INSN + +#define APPEND_INSN (name, ret_32) \ +target_ulong helper_##name(target_ulong rt, target_ulong rs, uint32_t sa) \ +{ \ + target_ulong temp; \ + \ + if (ret_32) { \ + temp = ((rt & MIPSDSP_LLO) << sa) | \ + ((rs & MIPSDSP_LLO) & ((0x01 << sa) - 1)); \ + temp = (target_long)(int32_t)(temp & MIPSDSP_LLO); \ + } else { \ + temp = (rt << sa) | (rs & ((0x01 << sa) - 1)); \ + } \ + \ + return temp; \ +} + +APPEND_INSN (append,1 ); +#ifdef TARGET_MIPS64 +APPEND_INSN (dappend,0 ); +#endif +#undef APPEND_INSN + +#define PREPEND_INSN (name, or_val, ret_32) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + uint32_t sa) \ +{ \ + sa |= or_val; \ + \ + if (1) { \ + return (target_long)(int32_t)(uint32_t) \ + (((rs & MIPSDSP_LLO) << (32 - sa)) | \ + ((rt & MIPSDSP_LLO) >> sa)); \ + } else { \ + return (rs << (64 - sa)) | (rt >> sa); \ + } \ +} + +PREPEND_INSN (prepend,0 ,1 ); +#ifdef TARGET_MIPS64 +PREPEND_INSN (prependw,0 ,0 ); +PREPEND_INSN (prependd,0x20 ,0 ); +#endif +#undef PREPEND_INSN + +#define BALIGN_INSN (name, filter, ret32) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, uint32_t bp) \ +{ \ + bp = bp & 0x03; \ + \ + if ((bp & 1) == 0) { \ + return rt; \ + } else { \ + if (ret32) { \ + return (target_long)(int32_t)((rt << (8 * bp)) | \ + (rs >> (8 * (4 - bp)))); \ + } else { \ + return (rt << (8 * bp)) | (rs >> (8 * (8 - bp))); \ + } \ + } \ +} + +BALIGN_INSN (balign,0x03 ,1 ); +#if defined(TARGET_MIPS64 ) +BALIGN_INSN (dbalign,0x07 ,0 ); +#endif +#undef BALIGN_INSN + +target_ulong helper_packrl_ph (target_ulong rs,target_ulong rt) +{ +uint32_t rsl, rth; + + rsl = rs &MIPSDSP_LO ; + rth = (rt &MIPSDSP_HI ) >>16 ; + +return (target_long)(int32_t)((rsl <<16 ) | rth); +} + +#if defined(TARGET_MIPS64 ) +target_ulong helper_packrl_pw (target_ulong rs,target_ulong rt) +{ +uint32_t rs0, rt1; + + rs0 = rs &MIPSDSP_LLO ; + rt1 = (rt >>32 ) &MIPSDSP_LLO ; + +return ((uint64_t )rs0 <<32 ) | (uint64_t )rt1; +} +#endif +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HI
target-mips/helper.h +52 -0
56 lines not on this page · raw message
target-mips/translate.c +372 -0
432 lines not on this page · raw message
Signature · 1 line
1.7.10.2 (Apple Git-33)
Re: [Qemu-devel] [PATCH v11 10/14] target-mips: Add ASE DSP compare-pick instructions
Quoted 435 lines · Jia Liu
Add MIPS ASE DSP Compare-Pick instructions.
Signed-off-by Jia Liu <[email protected]>--- target-mips/dsp_helper.c | 233 +++++++++++++++++++++++++++++ target-mips/helper.h | 52 +++++++ target-mips/translate.c | 372 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 657 insertions(+)target-mips/dsp_helper.c +233
-0@@ -3203,6 +3203,239 @@ BIT_INSV(dinsv, 0x7F, 0x3F, target_long);#undef BIT_INSV +/** DSP Compare-Pick Sub-class insns **/ +#define CMP_HAS_RET (name, func, split_num, filter, bit_size) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt) \ +{ \ + uint32_t rs_t, rt_t; \ + uint8_t cc; \ + uint32_t temp = 0; \ + int i; \ + \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + cc = mipsdsp_##func(rs_t, rt_t); \ + temp |= cc << i; \ + } \ + \ + return (target_ulong)temp; \ +} + +CMP_HAS_RET (cmpgu_eq_qb, cmp_eq,4 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_lt_qb, cmp_lt,4 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_le_qb, cmp_le,4 ,MIPSDSP_Q0 ,8 ); + +#ifdef TARGET_MIPS64 +CMP_HAS_RET (cmpgu_eq_ob, cmp_eq,8 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_lt_ob, cmp_lt,8 ,MIPSDSP_Q0 ,8 ); +CMP_HAS_RET (cmpgu_le_ob, cmp_le,8 ,MIPSDSP_Q0 ,8 ); +#endif + +#undef CMP_HAS_RET + + +#define CMP_NO_RET (name, func, split_num, filter, bit_size) \ +void helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int32_t rs_t, rt_t; \ + int32_t flag = 0; \ + int32_t cc; \ + int i; \ + \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + \ + cc = mipsdsp_##func(rs_t, rt_t); \ + flag |= cc << i; \ + } \ + \ + set_DSPControl_24(flag, split_num, env); \ +} + +CMP_NO_RET (cmpu_eq_qb, cmp_eq,4 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_lt_qb, cmp_lt,4 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_le_qb, cmp_le,4 ,MIPSDSP_Q0 ,8 ); + +CMP_NO_RET (cmp_eq_ph, cmp_eq,2 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_lt_ph, cmp_lt,2 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_le_ph, cmp_le,2 ,MIPSDSP_LO ,16 ); + +#ifdef TARGET_MIPS64 +CMP_NO_RET (cmpu_eq_ob, cmp_eq,8 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_lt_ob, cmp_lt,8 ,MIPSDSP_Q0 ,8 ); +CMP_NO_RET (cmpu_le_ob, cmp_le,8 ,MIPSDSP_Q0 ,8 ); + +CMP_NO_RET (cmp_eq_qh, cmp_eq,4 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_lt_qh, cmp_lt,4 ,MIPSDSP_LO ,16 ); +CMP_NO_RET (cmp_le_qh, cmp_le,4 ,MIPSDSP_LO ,16 ); + +CMP_NO_RET (cmp_eq_pw, cmp_eq,2 ,MIPSDSP_LLO ,32 ); +CMP_NO_RET (cmp_lt_pw, cmp_lt,2 ,MIPSDSP_LLO ,32 ); +CMP_NO_RET (cmp_le_pw, cmp_le,2 ,MIPSDSP_LLO ,32 ); +#endif +#undef CMP_NO_RET + +#if defined(TARGET_MIPS64 ) + +#define CMPGDU_OB (name) \ +target_ulong helper_cmpgdu_##name##_ob(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + int i; \ + uint8_t rs_t, rt_t; \ + uint32_t cond; \ + \ + cond = 0; \ + \ + for (i = 0; i < 8; i++) { \ + rs_t = (rs >> (8 * i)) & MIPSDSP_Q0; \ + rt_t = (rt >> (8 * i)) & MIPSDSP_Q0; \ + \ + if (mipsdsp_cmp_##name(rs_t, rt_t)) { \ + cond |= 0x01 << i; \ + } \ + } \ + \ + set_DSPControl_24(cond, 8, env); \ + \ + return (uint64_t)cond; \ +} + +CMPGDU_OB(eq) +CMPGDU_OB(lt) +CMPGDU_OB(le) +#undef CMPGDU_OB +#endif + +#define PICK_INSN (name, split_num, filter, bit_size, ret32bit) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + CPUMIPSState *env) \ +{ \ + uint32_t rs_t, rt_t; \ + uint32_t cc; \ + target_ulong dsp; \ + int i; \ + target_ulong result = 0; \ + \ + dsp = env->active_tc.DSPControl; \ + for (i = 0; i < split_num; i++) { \ + rs_t = (rs >> (bit_size * i)) & filter; \ + rt_t = (rt >> (bit_size * i)) & filter; \ + cc = (dsp >> (24 + i)) & 0x01; \ + cc = cc == 1 ? rs_t : rt_t; \ + \ + result |= (target_ulong)cc << (bit_size * i); \ + } \ + \ + if (ret32bit) { \ + result = (target_long)(int32_t)(result & MIPSDSP_LLO); \ + } \ + \ + return result; \ +} + +PICK_INSN (pick_qb,4 ,MIPSDSP_Q0 ,8 ,1 ); +PICK_INSN (pick_ph,2 ,MIPSDSP_LO ,16 ,1 ); + +#ifdef TARGET_MIPS64 +PICK_INSN (pick_ob,8 ,MIPSDSP_Q0 ,8 ,0 ); +PICK_INSN (pick_qh,4 ,MIPSDSP_LO ,16 ,0 ); +PICK_INSN (pick_pw,2 ,MIPSDSP_LLO ,32 ,0 ); +#endif +#undef PICK_INSN + +#define APPEND_INSN (name, ret_32) \ +target_ulong helper_##name(target_ulong rt, target_ulong rs, uint32_t sa) \ +{ \ + target_ulong temp; \ + \ + if (ret_32) { \ + temp = ((rt & MIPSDSP_LLO) << sa) | \ + ((rs & MIPSDSP_LLO) & ((0x01 << sa) - 1)); \ + temp = (target_long)(int32_t)(temp & MIPSDSP_LLO); \ + } else { \ + temp = (rt << sa) | (rs & ((0x01 << sa) - 1)); \ + } \ + \ + return temp; \ +} + +APPEND_INSN (append,1 ); +#ifdef TARGET_MIPS64 +APPEND_INSN (dappend,0 ); +#endif +#undef APPEND_INSN + +#define PREPEND_INSN (name, or_val, ret_32) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, \ + uint32_t sa) \ +{ \ + sa |= or_val; \ + \ + if (1) { \ + return (target_long)(int32_t)(uint32_t) \ + (((rs & MIPSDSP_LLO) << (32 - sa)) | \ + ((rt & MIPSDSP_LLO) >> sa)); \ + } else { \ + return (rs << (64 - sa)) | (rt >> sa); \ + } \ +} + +PREPEND_INSN (prepend,0 ,1 ); +#ifdef TARGET_MIPS64 +PREPEND_INSN (prependw,0 ,0 ); +PREPEND_INSN (prependd,0x20 ,0 ); +#endif +#undef PREPEND_INSN + +#define BALIGN_INSN (name, filter, ret32) \ +target_ulong helper_##name(target_ulong rs, target_ulong rt, uint32_t bp) \ +{ \ + bp = bp & 0x03; \ + \ + if ((bp & 1) == 0) { \ + return rt; \ + } else { \ + if (ret32) { \ + return (target_long)(int32_t)((rt << (8 * bp)) | \ + (rs >> (8 * (4 - bp)))); \ + } else { \ + return (rt << (8 * bp)) | (rs >> (8 * (8 - bp))); \ + } \ + } \ +} + +BALIGN_INSN (balign,0x03 ,1 ); +#if defined(TARGET_MIPS64 ) +BALIGN_INSN (dbalign,0x07 ,0 ); +#endif +#undef BALIGN_INSN + +target_ulong helper_packrl_ph (target_ulong rs,target_ulong rt) +{ +uint32_t rsl, rth; + + rsl = rs &MIPSDSP_LO ; + rth = (rt &MIPSDSP_HI ) >>16 ; + +return (target_long)(int32_t)((rsl <<16 ) | rth); +} + +#if defined(TARGET_MIPS64 ) +target_ulong helper_packrl_pw (target_ulong rs,target_ulong rt) +{ +uint32_t rs0, rt1; + + rs0 = rs &MIPSDSP_LLO ; + rt1 = (rt >>32 ) &MIPSDSP_LLO ; + +return ((uint64_t )rs0 <<32 ) | (uint64_t )rt1; +} +#endif +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HItarget-mips/helper.h +52
-0@@ -624,4 +624,56 @@ DEF_HELPER_FLAGS_3(insv, 0, tl, env, tl, tl)DEF_HELPER_FLAGS_3 (dinsv,0 , tl, env, tl, tl);#endif +/* DSP Compare-Pick Sub-class insns */ +DEF_HELPER_FLAGS_3(cmpu_eq_qb, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpu_lt_qb, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpu_le_qb, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_2(cmpgu_eq_qb, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_2(cmpgu_lt_qb, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_2(cmpgu_le_qb, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_3(cmp_eq_ph, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_lt_ph, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_le_ph, 0, void, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(cmpu_eq_ob, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpu_lt_ob, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpu_le_ob, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpgdu_eq_ob, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpgdu_lt_ob, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(cmpgdu_le_ob, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_2(cmpgu_eq_ob, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_2(cmpgu_lt_ob, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_2(cmpgu_le_ob, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +DEF_HELPER_FLAGS_3(cmp_eq_qh, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_lt_qh, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_le_qh, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_eq_pw, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_lt_pw, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_3(cmp_le_pw, 0, void, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(pick_qb, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(pick_ph, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(pick_ob, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(pick_qh, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(pick_pw, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(append, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dappend, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#endif +DEF_HELPER_FLAGS_3(prepend, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(prependd, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +DEF_HELPER_FLAGS_3(prependw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#endif +DEF_HELPER_FLAGS_3(balign, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dbalign, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl, i32) +#endif +DEF_HELPER_FLAGS_2(packrl_ph, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_2(packrl_pw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) +#endif +#include "def-helper.h" target-mips/translate.c +78
-0@@ -348,6 +348,11 @@ enum {#if defined(TARGET_MIPS64 ) OPC_DINSV_DSP = 0x0D | OPC_SPECIAL3, #endif + /* MIPS DSP Compare-Pick Sub-class */ + OPC_APPEND_DSP = 0x31 | OPC_SPECIAL3, +#if defined(TARGET_MIPS64) + OPC_DAPPEND_DSP = 0x35 | OPC_SPECIAL3, +#endif };/* BSHFL opcodes */ @@ -473,6 +478,22 @@ enum {OPC_PRECRQ_PH_W = (0x14 <<6 ) |OPC_CMPU_EQ_QB_DSP ,OPC_PRECRQ_RS_PH_W = (0x15 <<6 ) |OPC_CMPU_EQ_QB_DSP ,OPC_PRECRQU_S_QB_PH = (0x0F <<6 ) |OPC_CMPU_EQ_QB_DSP , +/* DSP Compare-Pick Sub-class */ +OPC_CMPU_EQ_QB = (0x00 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPU_LT_QB = (0x01 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPU_LE_QB = (0x02 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGU_EQ_QB = (0x04 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGU_LT_QB = (0x05 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGU_LE_QB = (0x06 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGDU_EQ_QB = (0x18 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGDU_LT_QB = (0x19 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMPGDU_LE_QB = (0x1A <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMP_EQ_PH = (0x08 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMP_LT_PH = (0x09 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_CMP_LE_PH = (0x0A <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_PICK_QB = (0x03 <<6 ) |OPC_CMPU_EQ_QB_DSP , +OPC_PICK_PH = (0x0B <<6 ) |OPC_CMPU_EQ_QB_DSP , + OPC_PACKRL_PH = (0x0E << 6) | OPC_CMPU_EQ_QB_DSP, };#define MASK_SHLL_QB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))@@ -535,6 +556,14 @@ enum { OPC_INSV = (0x00 << 6) | OPC_INSV_DSP, }; +#define MASK_APPEND (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* MIPS DSP Compare-Pick Sub-class */ +OPC_APPEND = (0x00 <<6 ) |OPC_APPEND_DSP , +OPC_PREPEND = (0x01 <<6 ) |OPC_APPEND_DSP , +OPC_BALIGN = (0x10 <<6 ) |OPC_APPEND_DSP , +}; +#if defined(TARGET_MIPS64 )#define MASK_ABSQ_S_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) enum {@@ -603,6 +632,26 @@ enum {#if defined(TARGET_MIPS64 )#define MASK_CMPU_EQ_OB (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { +/* DSP Compare-Pick Sub-class */ +OPC_CMP_EQ_PW = (0x10 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMP_LT_PW = (0x11 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMP_LE_PW = (0x12 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMP_EQ_QH = (0x08 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMP_LT_QH = (0x09 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMP_LE_QH = (0x0A <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGDU_EQ_OB = (0x18 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGDU_LT_OB = (0x19 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGDU_LE_OB = (0x1A <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGU_EQ_OB = (0x04 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGU_LT_OB = (0x05 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPGU_LE_OB = (0x06 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPU_EQ_OB = (0x00 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPU_LT_OB = (0x01 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_CMPU_LE_OB = (0x02 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_PACKRL_PW = (0x0E <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_PICK_OB = (0x03 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_PICK_PW = (0x13 <<6 ) |OPC_CMPU_EQ_OB_DSP , +OPC_PICK_QH = (0x0B <<6 ) |OPC_CMPU_EQ_OB_DSP ,/* MIPS DSP Arithmetic Sub-class */ OPC_PRECR_OB_QH = (0x0D <<6 ) |OPC_CMPU_EQ_OB_DSP , OPC_PRECR_SRA_QH_PW = (0x1E << 6) | OPC_CMPU_EQ_OB_DSP,@@ -616,6 +665,17 @@ enum {#endif #if defined(TARGET_MIPS64 ) +#define MASK_DAPPEND (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* DSP Compare-Pick Sub-class */ +OPC_DAPPEND = (0x00 <<6 ) |OPC_DAPPEND_DSP , +OPC_PREPENDD = (0x03 <<6 ) |OPC_DAPPEND_DSP , +OPC_PREPENDW = (0x01 <<6 ) |OPC_DAPPEND_DSP , +OPC_DBALIGN = (0x10 <<6 ) |OPC_DAPPEND_DSP , +}; +#endif + +#if defined(TARGET_MIPS64 )#define MASK_DINSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* DSP Bit/Manipulation Sub-class */@@ -13897,6 +13957,266 @@ static void gen_mipsdsp_bitinsn(CPUMIPSState *env, DisasContext *ctx,MIPS_DEBUG ("%s" , opn); } +static void gen_mipsdsp_add_cmp_pick (DisasContext *ctx, +uint32_t op1,uint32_t op2, +int ret,int v1,int v2,int check_ret) +{ +const char *opn ="mipsdsp add compare pick" ; +TCGv_i32 t0 =tcg_temp_new_i32 (); +TCGv t1 =tcg_temp_new (); +TCGv v1_t =tcg_temp_new (); +TCGv v2_t =tcg_temp_new (); + +if ((ret ==0 ) && (check_ret ==1 )) { +/* Treat as NOP. */ +MIPS_DEBUG ("NOP" ); +return ; + } + +if (v1 ==0 ) { +tcg_gen_movi_tl (v1_t,0 );
target-mips/translate.c static void gen_mipsdsp_bitinsn(CPUMIPSState *env, DisasContext *ctx, · line 13987
Quoted 10 lines
target-mips/translate.c +10
-0+ }else { +gen_load_gpr (v1_t, v1); + } + +if (v2 ==0 ) { +tcg_gen_movi_tl (v2_t,0 ); + }else { +gen_load_gpr (v2_t, v2); + } +
Same comments as the previous patches apply here.
Quoted 7 lines
target-mips/translate.c +7
-0+switch (op1) { +case OPC_APPEND_DSP : +switch (op2) { +case OPC_APPEND : +tcg_gen_movi_i32 (t0, v2); +gen_helper_append (cpu_gpr[ret], cpu_gpr[ret], + v1_t, t0);
target-mips/translate.c static void gen_mipsdsp_bitinsn(CPUMIPSState *env, DisasContext *ctx, · line 14004
Quoted 10 lines
target-mips/translate.c +10
-0+break ; +case OPC_PREPEND : +tcg_gen_movi_i32 (t0, v2); +gen_helper_prepend (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0); +break ; +case OPC_BALIGN : +tcg_gen_movi_i32 (t0, v2); +gen_helper_balign (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0);
Indentation issue.
Quoted 301 lines
target-mips/translate.c +267
-0+break ; +default :/* Invid */ +MIPS_INVAL ("MASK APPEND" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ; +case OPC_CMPU_EQ_QB_DSP : +switch (op2) { +case OPC_CMPU_EQ_QB : +check_dsp (ctx); +gen_helper_cmpu_eq_qb (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPU_LT_QB : +check_dsp (ctx); +gen_helper_cmpu_lt_qb (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPU_LE_QB : +check_dsp (ctx); +gen_helper_cmpu_le_qb (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPGU_EQ_QB : +check_dsp (ctx); +gen_helper_cmpgu_eq_qb (cpu_gpr[ret], v1_t, v2_t); +break ; +case OPC_CMPGU_LT_QB : +check_dsp (ctx); +gen_helper_cmpgu_lt_qb (cpu_gpr[ret], v1_t, v2_t); +break ; +case OPC_CMPGU_LE_QB : +check_dsp (ctx); +gen_helper_cmpgu_le_qb (cpu_gpr[ret], v1_t, v2_t); +break ; +case OPC_CMPGDU_EQ_QB : +check_dspr2 (ctx); +gen_helper_cmpgu_eq_qb (t1, v1_t, v2_t); +tcg_gen_mov_tl (cpu_gpr[ret], t1); +tcg_gen_andi_tl (cpu_dspctrl, cpu_dspctrl,0xF0FFFFFF ); +tcg_gen_shli_tl (t1, t1,24 ); +tcg_gen_or_tl (cpu_dspctrl, cpu_dspctrl, t1); +break ; +case OPC_CMPGDU_LT_QB : +check_dspr2 (ctx); +gen_helper_cmpgu_lt_qb (t1, v1_t, v2_t); +tcg_gen_mov_tl (cpu_gpr[ret], t1); +tcg_gen_andi_tl (cpu_dspctrl, cpu_dspctrl,0xF0FFFFFF ); +tcg_gen_shli_tl (t1, t1,24 ); +tcg_gen_or_tl (cpu_dspctrl, cpu_dspctrl, t1); +break ; +case OPC_CMPGDU_LE_QB : +check_dspr2 (ctx); +gen_helper_cmpgu_le_qb (t1, v1_t, v2_t); +tcg_gen_mov_tl (cpu_gpr[ret], t1); +tcg_gen_andi_tl (cpu_dspctrl, cpu_dspctrl,0xF0FFFFFF ); +tcg_gen_shli_tl (t1, t1,24 ); +tcg_gen_or_tl (cpu_dspctrl, cpu_dspctrl, t1); +break ; +case OPC_CMP_EQ_PH : +check_dsp (ctx); +gen_helper_cmp_eq_ph (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LT_PH : +check_dsp (ctx); +gen_helper_cmp_lt_ph (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LE_PH : +check_dsp (ctx); +gen_helper_cmp_le_ph (v1_t, v2_t, cpu_env); +break ; +case OPC_PICK_QB : +check_dsp (ctx); +gen_helper_pick_qb (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_PICK_PH : +check_dsp (ctx); +gen_helper_pick_ph (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_PACKRL_PH : +check_dsp (ctx); +gen_helper_packrl_ph (cpu_gpr[ret], v1_t, v2_t); +break ; + } +break ; +#ifdef TARGET_MIPS64 +case OPC_CMPU_EQ_OB_DSP : +switch (op2) { +case OPC_CMP_EQ_PW : +check_dsp (ctx); +gen_helper_cmp_eq_pw (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LT_PW : +check_dsp (ctx); +gen_helper_cmp_lt_pw (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LE_PW : +check_dsp (ctx); +gen_helper_cmp_le_pw (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_EQ_QH : +check_dsp (ctx); +gen_helper_cmp_eq_qh (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LT_QH : +check_dsp (ctx); +gen_helper_cmp_lt_qh (v1_t, v2_t, cpu_env); +break ; +case OPC_CMP_LE_QH : +check_dsp (ctx); +gen_helper_cmp_le_qh (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPGDU_EQ_OB : +check_dspr2 (ctx); +gen_helper_cmpgdu_eq_ob (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_CMPGDU_LT_OB : +check_dspr2 (ctx); +gen_helper_cmpgdu_lt_ob (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_CMPGDU_LE_OB : +check_dspr2 (ctx); +gen_helper_cmpgdu_le_ob (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_CMPGU_EQ_OB : +check_dsp (ctx); +gen_helper_cmpgu_eq_ob (cpu_gpr[ret], v1_t, + v2_t); +break ; +case OPC_CMPGU_LT_OB : +check_dsp (ctx); +gen_helper_cmpgu_lt_ob (cpu_gpr[ret], v1_t, + v2_t); +break ; +case OPC_CMPGU_LE_OB : +check_dsp (ctx); +gen_helper_cmpgu_le_ob (cpu_gpr[ret], v1_t, + v2_t); +break ; +case OPC_CMPU_EQ_OB : +check_dsp (ctx); +gen_helper_cmpu_eq_ob (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPU_LT_OB : +check_dsp (ctx); +gen_helper_cmpu_lt_ob (v1_t, v2_t, cpu_env); +break ; +case OPC_CMPU_LE_OB : +check_dsp (ctx); +gen_helper_cmpu_le_ob (v1_t, v2_t, cpu_env); +break ; +case OPC_PACKRL_PW : +check_dsp (ctx); +gen_helper_packrl_pw (cpu_gpr[ret], v1_t, v2_t); +break ; +case OPC_PICK_OB : +check_dsp (ctx); +gen_helper_pick_ob (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_PICK_PW : +check_dsp (ctx); +gen_helper_pick_pw (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; +case OPC_PICK_QH : +check_dsp (ctx); +gen_helper_pick_qh (cpu_gpr[ret], v1_t, + v2_t, cpu_env); +break ; + } +break ; +case OPC_DAPPEND_DSP : +switch (op2) { +case OPC_DAPPEND : +tcg_gen_movi_i32 (t0, v2); +gen_helper_dappend (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0); +break ; +case OPC_PREPENDD : +tcg_gen_movi_i32 (t0, v2); +gen_helper_prependd (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0); +break ; +case OPC_PREPENDW : +tcg_gen_movi_i32 (t0, v2); +gen_helper_prependw (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0); +break ; +case OPC_DBALIGN : +tcg_gen_movi_i32 (t0, v2); +gen_helper_dbalign (cpu_gpr[ret], v1_t, + cpu_gpr[ret], t0); +break ; +default :/* Invalid */ +MIPS_INVAL ("MASK DAPPEND" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ; +#endif + } + +tcg_temp_free_i32 (t0); +tcg_temp_free (t1); +tcg_temp_free (v1_t); +tcg_temp_free (v2_t); + + (void )opn;/* avoid a compiler warning */ +MIPS_DEBUG ("%s" , opn); +} +/* End MIPSDSP functions. */ static void decode_opc (CPUMIPSState *env,DisasContext *ctx,int *is_branch)@@ -14388,6 +14708,25 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_PRECRQU_S_QB_PH :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_CMPU_EQ_QB : +case OPC_CMPU_LT_QB : +case OPC_CMPU_LE_QB : +case OPC_CMP_EQ_PH : +case OPC_CMP_LT_PH : +case OPC_CMP_LE_PH : +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rd, rs, rt,0 ); +break ; +case OPC_CMPGU_EQ_QB : +case OPC_CMPGU_LT_QB : +case OPC_CMPGU_LE_QB : +case OPC_CMPGDU_EQ_QB : +case OPC_CMPGDU_LT_QB : +case OPC_CMPGDU_LE_QB : +case OPC_PICK_QB : +case OPC_PICK_PH : +case OPC_PACKRL_PH : +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rd, rs, rt,1 ); +break ;default :/* Invalid */ MIPS_INVAL ("MASK CMPU.EQ.QB" );generate_exception (ctx,EXCP_RI );@@ -14450,6 +14789,11 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)break ; }break ; +case OPC_APPEND_DSP : +check_dspr2 (ctx); + op2 =MASK_APPEND (ctx->opcode); +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rt, rs, rd,1 ); +break ;#if defined(TARGET_MIPS64 ) case OPC_DEXTM ... OPC_DEXT: case OPC_DINSM ... OPC_DINS:@@ -14560,12 +14904,40 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)case OPC_PRECRQU_S_OB_QH :gen_mipsdsp_arith (ctx, op1, op2, rd, rs, rt);break ; +case OPC_CMPU_EQ_OB : +case OPC_CMPU_LT_OB : +case OPC_CMPU_LE_OB : +case OPC_CMP_EQ_QH : +case OPC_CMP_LT_QH : +case OPC_CMP_LE_QH : +case OPC_CMP_EQ_PW : +case OPC_CMP_LT_PW : +case OPC_CMP_LE_PW : +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rd, rs, rt,0 ); +break ; +case OPC_CMPGDU_EQ_OB : +case OPC_CMPGDU_LT_OB : +case OPC_CMPGDU_LE_OB : +case OPC_CMPGU_EQ_OB : +case OPC_CMPGU_LT_OB : +case OPC_CMPGU_LE_OB : +case OPC_PACKRL_PW : +case OPC_PICK_OB : +case OPC_PICK_PW : +case OPC_PICK_QH : +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rd, rs, rt,1 ); +break ;default :/* Invalid */ MIPS_INVAL ("MASK CMPU_EQ.OB" );generate_exception (ctx,EXCP_RI );break ; }break ; +case OPC_DAPPEND_DSP : +check_dspr2 (ctx); + op2 =MASK_DAPPEND (ctx->opcode); +gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rt, rs, rd,1 ); +break ;case OPC_DPAQ_W_QH_DSP : op2 =MASK_DPAQ_W_QH (ctx->opcode);switch (op2) {Signature · 1 line
1.7.10.2 (Apple Git-33)
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH v11 11/14 target-mips: Add ASE DSP accumulator instructions
In reply to Jia LiuAdd MIPS ASE DSP Accumulator and DSPControl Access instructions.
--- target-mips/dsp_helper.c | 609 ++++++++++++++++++++++++++++++++++++++++++++++ target-mips/helper.h | 35 +++ target-mips/translate.c | 355 +++++++++++++++++++++++++++ 3 files changed, 999 insertions(+)
target-mips/dsp_helper.c +609 -0
@@ -3436,6 +3436,615 @@ target_ulong helper_packrl_pw(target_ulong rs, target_ulong rt) }#endif +/** DSP Accumulator and DSPControl Access Sub-class insns **/ +target_ulong helper_extr_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int32_t tempI; +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + tempI = (tempDL[0 ] >>1 ) &MIPSDSP_LLO ; + + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + +if ((!(tempDL[1 ] ==0 && (tempDL[0 ] &MIPSDSP_LHI ) ==0x00 )) && + (!(tempDL[1 ] ==1 && (tempDL[0 ] &MIPSDSP_LHI ) ==MIPSDSP_LHI ))) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long )tempI; +} + +target_ulong helper_extr_r_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 && (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long)(int32_t)(tempDL[0 ] >>1 ); +} + +target_ulong helper_extr_rs_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int32_t tempI, temp64; +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + tempI = tempDL[0 ] >>1 ; + +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { + temp64 = tempDL[1 ]; +if (temp64 ==0 ) { + tempI =0x7FFFFFFF ; + }else { + tempI =0x80000000 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long )tempI; +} + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextr_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; + + shift = shift &0x3F ; + +mipsdsp_rndrashift_acc (temp, ac, shift, env); + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_r_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_rs_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +if (temp128 ==0 ) { + temp[0 ] =0x0FFFFFFFF ; + }else { + temp[0 ] =0x0100000000 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +target_ulong result; + + shift = shift &0x3F ; + +mipsdsp_rndrashift_acc (temp, ac, shift, env); + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} + +target_ulong helper_dextr_r_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; +target_ulong result; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} + +target_ulong helper_dextr_rs_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; +target_ulong result; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +if (temp128 ==0 ) { + temp[1 ] &=0xFFFFFFFFFFFFFFFEull ; + temp[0 ] |=0xFFFFFFFFFFFFFFFEull ; + }else { + temp[1 ] |=0x01 ; + temp[0 ] &=0x01 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} +#endif + +target_ulong helper_extr_s_h (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t temp; + + shift = shift &0x0F ; + + temp =mipsdsp_rashift_short_acc (ac, shift, env); +if (temp >0x0000000000007FFFull ) { + temp =0x00007FFF ; +set_DSPControl_overflow_flag (1 ,23 , env); + }else if (temp <0xFFFFFFFFFFFF8000ull ) { + temp =0xFFFF8000 ; +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long)(int32_t)(temp &0xFFFFFFFF ); +} + + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextr_s_h (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t temp[2 ]; +uint32_t temp127; + + shift = shift &0x1F ; + +mipsdsp_rashift_acc ((uint64_t *)temp, ac, shift, env); + + temp127 = (temp[1 ] >>63 ) &0x01 ; + +if ((temp127 ==0 ) && (temp[1 ] >0 || temp[0 ] >32767 )) { + temp[0 ] &=0xFFFF0000 ; + temp[0 ] |=0x00007FFF ; +set_DSPControl_overflow_flag (1 ,23 , env); + }else if ((temp127 ==1 ) && + (temp[1 ] <0xFFFFFFFFFFFFFFFFll + || temp[0 ] <0xFFFFFFFFFFFF1000ll )) { + temp[0 ] &=0xFFFF0000 ; + temp[0 ] |=0x00008000 ; +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int16_t )(temp[0 ] &MIPSDSP_LO ); +} + +#endif + +target_ulong helper_extp (target_ulong ac,target_ulong size,CPUMIPSState *env) +{ +int32_t start_pos; +int sub; +uint32_t temp; +uint64_t acc; + + size = size &0x1F ; + + temp =0 ; + start_pos =get_DSPControl_pos (env); + sub = start_pos - (size +1 ); +if (sub >=-1 ) { + acc = ((uint64_t )env->active_tc.HI[ac] <<32 ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); + temp = (acc >> (start_pos - size)) & + (((uint32_t )0x01 << (size +1 )) -1 ); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return (target_ulong )temp; +} + +target_ulong helper_extpdp (target_ulong ac,target_ulong size, +CPUMIPSState *env) +{ +int32_t start_pos; +int sub; +uint32_t temp; +uint64_t acc; + + size = size &0x1F ; + temp =0 ; + start_pos =get_DSPControl_pos (env); + sub = start_pos - (size +1 ); +if (sub >=-1 ) { + acc = ((uint64_t )env->active_tc.HI[ac] <<32 ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); + temp = (acc >> (start_pos - size)) & + (((uint32_t )0x01 << (size +1 )) -1 ); + +set_DSPControl_pos (start_pos - (size +1 ), env); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return (target_ulong )temp; +} + + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextp (target_ulong ac,target_ulong size,CPUMIPSState *env) +{ +int start_pos; +int len; +int sub; +uint64_t tempB, tempA; +uint64_t temp; + + temp =0 ; + + size = size &0x3F ; + start_pos =get_DSPControl_pos (env); + len = start_pos - size; + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + + sub = start_pos - (size +1 ); + +if (sub >=-1 ) { + temp = (tempB << (64 - len)) | (tempA >> len); + temp = temp & ((0x01 << (size +1 )) -1 ); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return temp; +} + +target_ulong helper_dextpdp (target_ulong ac,target_ulong size, +CPUMIPSState *env) +{ +int start_pos; +int len; +int sub; +uint64_t tempB, tempA; +uint64_t temp; + + temp =0 ; + size = size &0x3F ; + start_pos =get_DSPControl_pos (env); + len = start_pos - size; + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + + sub = start_pos - (size +1 ); + +if (sub >=-1 ) { + temp = (tempB << (64 - len)) | (tempA >> len); + temp = temp & ((0x01 << (size +1 )) -1 ); +set_DSPControl_pos (sub, env); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return temp; +} + +#endif + +void helper_shilo (target_ulong ac,target_ulong rs,CPUMIPSState *env) +{ +int8_t rs5_0; +uint64_t temp, acc; + + rs5_0 = rs &0x3F ; + rs5_0 = (int8_t )(rs5_0 <<2 ) >>2 ; + rs5_0 =MIPSDSP_ABS (rs5_0); + acc = (((uint64_t )env->active_tc.HI[ac] <<32 ) &MIPSDSP_LHI ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); +if (rs5_0 ==0 ) { + temp = acc; + }else { +if (rs5_0 >0 ) { + temp = acc >> rs5_0; + }else { + temp = acc << rs5_0; + } + } + + env->active_tc.HI[ac] = (target_ulong)(int32_t)((temp &MIPSDSP_LHI ) >>32 ); + env->active_tc.LO[ac] = (target_ulong)(int32_t)(temp &MIPSDSP_LLO ); +} + +#if defined(TARGET_MIPS64 ) +void helper_dshilo (target_ulong shift,target_ulong ac,CPUMIPSState *env) +{ +int8_t shift_t; +uint64_t tempB, tempA; + + shift_t = (uint8_t )(shift <<1 ) >>1 ; + shift_t =MIPSDSP_ABS (shift_t); + + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + +if (shift_t !=0 ) { +if (shift_t >=0 ) { + tempA = (tempB << (64 - shift)) | (tempA >> shift); + tempB = tempB >> shift; + }else { + tempB = (tempB << shift) | (tempA >> (64 - shift)); + tempA = tempA << shift; + } + } + + env->active_tc.HI[ac] = tempB; + env->active_tc.LO[ac] = tempA; +} + +#endif +void helper_mthlip (target_ulong ac,target_ulong rs,CPUMIPSState *env) +{ +int32_t tempA, tempB, pos; + + tempA = rs; + tempB = env->active_tc.LO[ac]; + env->active_tc.HI[ac] = (target_long )tempB; + env->active_tc.LO[ac] = (target_long )tempA; + pos =get_DSPControl_pos (env); + +if (pos >32 ) { +return ; + }else { +set_DSPControl_pos (pos +32 , env); + } +} + +#if defined(TARGET_MIPS64 ) +void helper_dmthlip (target_ulong rs,target_ulong ac,CPUMIPSState *env) +{ +uint8_t ac_t; +uint8_t pos; +uint64_t tempB, tempA; + + ac_t = ac &0x3 ; + + tempA = rs; + tempB = env->active_tc.LO[ac_t]; + + env->active_tc.HI[ac_t] = tempB; + env->active_tc.LO[ac_t] = tempA; + + pos =get_DSPControl_pos (env); + +if (pos <=64 ) { + pos = pos +64 ; +set_DSPControl_pos (pos, env); + } +} +#endif + +void helper_wrdsp (target_ulong rs,target_ulong mask_num,CPUMIPSState *env) +{ +uint8_t mask[6 ]; +uint8_t i; +uint32_t newbits, overwrite; +target_ulong dsp; + + newbits =0x00 ; + overwrite =0xFFFFFFFF ; + dsp = env->active_tc.DSPControl; + +for (i =0 ; i <6 ; i++) { + mask[i] = (mask_num >> i) &0x01 ; + } + +if (mask[0 ] ==1 ) { +#if defined(TARGET_MIPS64 ) + overwrite &=0xFFFFFF80 ; + newbits &=0xFFFFFF80 ; + newbits |=0x0000007F & rs; +#else + overwrite &=0xFFFFFFC0 ; + newbits &=0xFFFFFFC0 ; + newbits |=0x0000003F & rs; +#endif + } + +if (mask[1 ] ==1 ) { + overwrite &=0xFFFFE07F ; + newbits &=0xFFFFE07F ; + newbits |=0x00001F80 & rs; + } + +if (mask[2 ] ==1 ) { + overwrite &=0xFFFFDFFF ; + newbits &=0xFFFFDFFF ; + newbits |=0x00002000 & rs; + } + +if (mask[3 ] ==1 ) { + overwrite &=0xFF00FFFF ; + newbits &=0xFF00FFFF ; + newbits |=0x00FF0000 & rs; + } + +if (mask[4 ] ==1 ) { + overwrite &=0x00FFFFFF ; + newbits &=0x00FFFFFF ; + newbits |=0xFF000000 & rs; + } + +if (mask[5 ] ==1 ) { + overwrite &=0xFFFFBFFF ; + newbits &=0xFFFFBFFF ; + newbits |=0x00004000 & rs; + } + + dsp = dsp & overwrite; + dsp = dsp | newbits; + env->active_tc.DSPControl = dsp; +} + +target_ulong helper_rddsp (target_ulong masknum,CPUMIPSState *env) +{ +uint8_t mask[6 ]; +uint32_t ruler, i; +target_ulong temp; +target_ulong dsp; + + ruler =0x01 ; +for (i =0 ; i <6 ; i++) { + mask[i] = (masknum & ruler) >> i ; + ruler = ruler <<1 ; + } + + temp =0x00 ; + dsp = env->active_tc.DSPControl; + +if (mask[0 ] ==1 ) { +#if defined(TARGET_MIPS64 ) + temp |= dsp &0x7F ; +#else + temp |= dsp &0x3F ; +#endif + } + +if (mask[1 ] ==1 ) { + temp |= dsp &0x1F80 ; + } + +if (mask[2 ] ==1 ) { + temp |= dsp &0x2000 ; + } + +if (mask[3 ] ==1 ) { + temp |= dsp &0x00FF0000 ; + } + +if (mask[4 ] ==1 ) { + temp |= dsp &0xFF000000 ; + } + +if (mask[5 ] ==1 ) { + temp |= dsp &0x4000 ; + } + +return temp; +} + +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HI
target-mips/helper.h +35 -0
@@ -676,4 +676,39 @@ DEF_HELPER_FLAGS_2(packrl_ph, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) DEF_HELPER_FLAGS_2(packrl_pw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl)#endif +/* DSP Accumulator and DSPControl Access Sub-class insns */ +DEF_HELPER_FLAGS_3(extr_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extr_r_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extr_rs_w, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextr_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_r_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_rs_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_l, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_r_l, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_rs_l, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(extr_s_h, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextr_s_h, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(extp, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extpdp, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextp, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextpdp, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(shilo, 0, void, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dshilo, 0, void, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(mthlip, 0, void, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dmthlip, 0, void, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(wrdsp, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_2(rddsp, 0, tl, tl, env) + + +#include "def-helper.h"
target-mips/translate.c +355 -0
391 lines not on this page · raw message
Signature · 1 line
1.7.10.2 (Apple Git-33)
Re: [Qemu-devel] [PATCH v11 11/14] target-mips: Add ASE DSP accumulator instructions
Quoted 776 lines · Jia Liu
Add MIPS ASE DSP Accumulator and DSPControl Access instructions.
Signed-off-by Jia Liu <[email protected]>--- target-mips/dsp_helper.c | 609 ++++++++++++++++++++++++++++++++++++++++++++++ target-mips/helper.h | 35 +++ target-mips/translate.c | 355 +++++++++++++++++++++++++++ 3 files changed, 999 insertions(+)target-mips/dsp_helper.c +609
-0@@ -3436,6 +3436,615 @@ target_ulong helper_packrl_pw(target_ulong rs, target_ulong rt) }#endif +/** DSP Accumulator and DSPControl Access Sub-class insns **/ +target_ulong helper_extr_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int32_t tempI; +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + tempI = (tempDL[0 ] >>1 ) &MIPSDSP_LLO ; + + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + +if ((!(tempDL[1 ] ==0 && (tempDL[0 ] &MIPSDSP_LHI ) ==0x00 )) && + (!(tempDL[1 ] ==1 && (tempDL[0 ] &MIPSDSP_LHI ) ==MIPSDSP_LHI ))) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long )tempI; +} + +target_ulong helper_extr_r_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 && (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long)(int32_t)(tempDL[0 ] >>1 ); +} + +target_ulong helper_extr_rs_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int32_t tempI, temp64; +int64_t tempDL[2 ]; + + shift = shift &0x0F ; + +mipsdsp_rndrashift_short_acc (tempDL, ac, shift, env); +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + tempDL[0 ] +=1 ; +if (tempDL[0 ] ==0 ) { + tempDL[1 ] +=1 ; + } + tempI = tempDL[0 ] >>1 ; + +if ((tempDL[1 ] !=0 || (tempDL[0 ] &MIPSDSP_LHI ) !=0 ) && + (tempDL[1 ] !=1 || (tempDL[0 ] &MIPSDSP_LHI ) !=MIPSDSP_LHI )) { + temp64 = tempDL[1 ]; +if (temp64 ==0 ) { + tempI =0x7FFFFFFF ; + }else { + tempI =0x80000000 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long )tempI; +} + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextr_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; + + shift = shift &0x3F ; + +mipsdsp_rndrashift_acc (temp, ac, shift, env); + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_r_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_rs_w (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +if (temp128 ==0 ) { + temp[0 ] =0x0FFFFFFFF ; + }else { + temp[0 ] =0x0100000000 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int32_t )(temp[0 ] >>1 ); +} + +target_ulong helper_dextr_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +target_ulong result; + + shift = shift &0x3F ; + +mipsdsp_rndrashift_acc (temp, ac, shift, env); + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} + +target_ulong helper_dextr_r_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; +target_ulong result; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +set_DSPControl_overflow_flag (1 ,23 , env); + } + + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} + +target_ulong helper_dextr_rs_l (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +uint64_t temp[3 ]; +uint32_t temp128; +target_ulong result; + + shift = shift &0x3F ; +mipsdsp_rndrashift_acc (temp, ac, shift, env); + + temp[0 ] +=1 ; +if (temp[0 ] ==0 ) { + temp[1 ] +=1 ; +if (temp[1 ] ==0 ) { + temp[2 ] +=1 ; + } + } + + temp128 = temp[2 ] &0x01 ; + +if ((temp128 !=0 || temp[1 ] !=0 ) && + (temp128 !=1 || temp[1 ] != ~0ull )) { +if (temp128 ==0 ) { + temp[1 ] &=0xFFFFFFFFFFFFFFFEull ; + temp[0 ] |=0xFFFFFFFFFFFFFFFEull ; + }else { + temp[1 ] |=0x01 ; + temp[0 ] &=0x01 ; + } +set_DSPControl_overflow_flag (1 ,23 , env); + } + result = (temp[1 ] <<63 ) | (temp[0 ] >>1 ); + +return result; +} +#endif + +target_ulong helper_extr_s_h (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t temp; + + shift = shift &0x0F ; + + temp =mipsdsp_rashift_short_acc (ac, shift, env); +if (temp >0x0000000000007FFFull ) { + temp =0x00007FFF ; +set_DSPControl_overflow_flag (1 ,23 , env); + }else if (temp <0xFFFFFFFFFFFF8000ull ) { + temp =0xFFFF8000 ; +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (target_long)(int32_t)(temp &0xFFFFFFFF ); +} + + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextr_s_h (target_ulong ac,target_ulong shift, +CPUMIPSState *env) +{ +int64_t temp[2 ]; +uint32_t temp127; + + shift = shift &0x1F ; + +mipsdsp_rashift_acc ((uint64_t *)temp, ac, shift, env); + + temp127 = (temp[1 ] >>63 ) &0x01 ; + +if ((temp127 ==0 ) && (temp[1 ] >0 || temp[0 ] >32767 )) { + temp[0 ] &=0xFFFF0000 ; + temp[0 ] |=0x00007FFF ; +set_DSPControl_overflow_flag (1 ,23 , env); + }else if ((temp127 ==1 ) && + (temp[1 ] <0xFFFFFFFFFFFFFFFFll + || temp[0 ] <0xFFFFFFFFFFFF1000ll )) { + temp[0 ] &=0xFFFF0000 ; + temp[0 ] |=0x00008000 ; +set_DSPControl_overflow_flag (1 ,23 , env); + } + +return (int64_t )(int16_t )(temp[0 ] &MIPSDSP_LO ); +} + +#endif + +target_ulong helper_extp (target_ulong ac,target_ulong size,CPUMIPSState *env) +{ +int32_t start_pos; +int sub; +uint32_t temp; +uint64_t acc; + + size = size &0x1F ; + + temp =0 ; + start_pos =get_DSPControl_pos (env); + sub = start_pos - (size +1 ); +if (sub >=-1 ) { + acc = ((uint64_t )env->active_tc.HI[ac] <<32 ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); + temp = (acc >> (start_pos - size)) & + (((uint32_t )0x01 << (size +1 )) -1 ); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return (target_ulong )temp; +} + +target_ulong helper_extpdp (target_ulong ac,target_ulong size, +CPUMIPSState *env) +{ +int32_t start_pos; +int sub; +uint32_t temp; +uint64_t acc; + + size = size &0x1F ; + temp =0 ; + start_pos =get_DSPControl_pos (env); + sub = start_pos - (size +1 ); +if (sub >=-1 ) { + acc = ((uint64_t )env->active_tc.HI[ac] <<32 ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); + temp = (acc >> (start_pos - size)) & + (((uint32_t )0x01 << (size +1 )) -1 ); + +set_DSPControl_pos (start_pos - (size +1 ), env); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return (target_ulong )temp; +} + + +#if defined(TARGET_MIPS64 ) +target_ulong helper_dextp (target_ulong ac,target_ulong size,CPUMIPSState *env) +{ +int start_pos; +int len; +int sub; +uint64_t tempB, tempA; +uint64_t temp; + + temp =0 ; + + size = size &0x3F ; + start_pos =get_DSPControl_pos (env); + len = start_pos - size; + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + + sub = start_pos - (size +1 ); + +if (sub >=-1 ) { + temp = (tempB << (64 - len)) | (tempA >> len); + temp = temp & ((0x01 << (size +1 )) -1 ); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return temp; +} + +target_ulong helper_dextpdp (target_ulong ac,target_ulong size, +CPUMIPSState *env) +{ +int start_pos; +int len; +int sub; +uint64_t tempB, tempA; +uint64_t temp; + + temp =0 ; + size = size &0x3F ; + start_pos =get_DSPControl_pos (env); + len = start_pos - size; + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + + sub = start_pos - (size +1 ); + +if (sub >=-1 ) { + temp = (tempB << (64 - len)) | (tempA >> len); + temp = temp & ((0x01 << (size +1 )) -1 ); +set_DSPControl_pos (sub, env); +set_DSPControl_efi (0 , env); + }else { +set_DSPControl_efi (1 , env); + } + +return temp; +} + +#endif + +void helper_shilo (target_ulong ac,target_ulong rs,CPUMIPSState *env) +{ +int8_t rs5_0; +uint64_t temp, acc; + + rs5_0 = rs &0x3F ; + rs5_0 = (int8_t )(rs5_0 <<2 ) >>2 ; + rs5_0 =MIPSDSP_ABS (rs5_0); + acc = (((uint64_t )env->active_tc.HI[ac] <<32 ) &MIPSDSP_LHI ) | + ((uint64_t )env->active_tc.LO[ac] &MIPSDSP_LLO ); +if (rs5_0 ==0 ) { + temp = acc; + }else { +if (rs5_0 >0 ) { + temp = acc >> rs5_0; + }else { + temp = acc << rs5_0; + } + } + + env->active_tc.HI[ac] = (target_ulong)(int32_t)((temp &MIPSDSP_LHI ) >>32 ); + env->active_tc.LO[ac] = (target_ulong)(int32_t)(temp &MIPSDSP_LLO ); +} + +#if defined(TARGET_MIPS64 ) +void helper_dshilo (target_ulong shift,target_ulong ac,CPUMIPSState *env) +{ +int8_t shift_t; +uint64_t tempB, tempA; + + shift_t = (uint8_t )(shift <<1 ) >>1 ; + shift_t =MIPSDSP_ABS (shift_t); + + tempB = env->active_tc.HI[ac]; + tempA = env->active_tc.LO[ac]; + +if (shift_t !=0 ) { +if (shift_t >=0 ) { + tempA = (tempB << (64 - shift)) | (tempA >> shift); + tempB = tempB >> shift; + }else { + tempB = (tempB << shift) | (tempA >> (64 - shift)); + tempA = tempA << shift; + } + } + + env->active_tc.HI[ac] = tempB; + env->active_tc.LO[ac] = tempA; +} + +#endif +void helper_mthlip (target_ulong ac,target_ulong rs,CPUMIPSState *env) +{ +int32_t tempA, tempB, pos; + + tempA = rs; + tempB = env->active_tc.LO[ac]; + env->active_tc.HI[ac] = (target_long )tempB; + env->active_tc.LO[ac] = (target_long )tempA; + pos =get_DSPControl_pos (env); + +if (pos >32 ) { +return ; + }else { +set_DSPControl_pos (pos +32 , env); + } +} + +#if defined(TARGET_MIPS64 ) +void helper_dmthlip (target_ulong rs,target_ulong ac,CPUMIPSState *env) +{ +uint8_t ac_t; +uint8_t pos; +uint64_t tempB, tempA; + + ac_t = ac &0x3 ; + + tempA = rs; + tempB = env->active_tc.LO[ac_t]; + + env->active_tc.HI[ac_t] = tempB; + env->active_tc.LO[ac_t] = tempA; + + pos =get_DSPControl_pos (env); + +if (pos <=64 ) { + pos = pos +64 ; +set_DSPControl_pos (pos, env); + } +} +#endif + +void helper_wrdsp (target_ulong rs,target_ulong mask_num,CPUMIPSState *env) +{ +uint8_t mask[6 ]; +uint8_t i; +uint32_t newbits, overwrite; +target_ulong dsp; + + newbits =0x00 ; + overwrite =0xFFFFFFFF ; + dsp = env->active_tc.DSPControl; + +for (i =0 ; i <6 ; i++) { + mask[i] = (mask_num >> i) &0x01 ; + } + +if (mask[0 ] ==1 ) { +#if defined(TARGET_MIPS64 ) + overwrite &=0xFFFFFF80 ; + newbits &=0xFFFFFF80 ; + newbits |=0x0000007F & rs; +#else + overwrite &=0xFFFFFFC0 ; + newbits &=0xFFFFFFC0 ; + newbits |=0x0000003F & rs; +#endif + } + +if (mask[1 ] ==1 ) { + overwrite &=0xFFFFE07F ; + newbits &=0xFFFFE07F ; + newbits |=0x00001F80 & rs; + } + +if (mask[2 ] ==1 ) { + overwrite &=0xFFFFDFFF ; + newbits &=0xFFFFDFFF ; + newbits |=0x00002000 & rs; + } + +if (mask[3 ] ==1 ) { + overwrite &=0xFF00FFFF ; + newbits &=0xFF00FFFF ; + newbits |=0x00FF0000 & rs; + } + +if (mask[4 ] ==1 ) { + overwrite &=0x00FFFFFF ; + newbits &=0x00FFFFFF ; + newbits |=0xFF000000 & rs; + } + +if (mask[5 ] ==1 ) { + overwrite &=0xFFFFBFFF ; + newbits &=0xFFFFBFFF ; + newbits |=0x00004000 & rs; + } + + dsp = dsp & overwrite; + dsp = dsp | newbits; + env->active_tc.DSPControl = dsp; +} + +target_ulong helper_rddsp (target_ulong masknum,CPUMIPSState *env) +{ +uint8_t mask[6 ]; +uint32_t ruler, i; +target_ulong temp; +target_ulong dsp; + + ruler =0x01 ; +for (i =0 ; i <6 ; i++) { + mask[i] = (masknum & ruler) >> i ; + ruler = ruler <<1 ; + } + + temp =0x00 ; + dsp = env->active_tc.DSPControl; + +if (mask[0 ] ==1 ) { +#if defined(TARGET_MIPS64 ) + temp |= dsp &0x7F ; +#else + temp |= dsp &0x3F ; +#endif + } + +if (mask[1 ] ==1 ) { + temp |= dsp &0x1F80 ; + } + +if (mask[2 ] ==1 ) { + temp |= dsp &0x2000 ; + } + +if (mask[3 ] ==1 ) { + temp |= dsp &0x00FF0000 ; + } + +if (mask[4 ] ==1 ) { + temp |= dsp &0xFF000000 ; + } + +if (mask[5 ] ==1 ) { + temp |= dsp &0x4000 ; + } + +return temp; +} + +#undef MIPSDSP_LHI#undef MIPSDSP_LLO#undef MIPSDSP_HItarget-mips/helper.h +35
-0@@ -676,4 +676,39 @@ DEF_HELPER_FLAGS_2(packrl_ph, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl) DEF_HELPER_FLAGS_2(packrl_pw, TCG_CALL_CONST | TCG_CALL_PURE, tl, tl, tl)#endif +/* DSP Accumulator and DSPControl Access Sub-class insns */ +DEF_HELPER_FLAGS_3(extr_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extr_r_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extr_rs_w, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextr_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_r_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_rs_w, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_l, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_r_l, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextr_rs_l, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(extr_s_h, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextr_s_h, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(extp, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(extpdp, 0, tl, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dextp, 0, tl, tl, tl, env) +DEF_HELPER_FLAGS_3(dextpdp, 0, tl, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(shilo, 0, void, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dshilo, 0, void, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(mthlip, 0, void, tl, tl, env) +#if defined(TARGET_MIPS64 ) +DEF_HELPER_FLAGS_3(dmthlip, 0, void, tl, tl, env) +#endif +DEF_HELPER_FLAGS_3(wrdsp, 0, void, tl, tl, env) +DEF_HELPER_FLAGS_2(rddsp, 0, tl, tl, env) + + +#include "def-helper.h" target-mips/translate.c +74
-0@@ -353,6 +353,11 @@ enum {#if defined(TARGET_MIPS64 ) OPC_DAPPEND_DSP = 0x35 | OPC_SPECIAL3, #endif + /* MIPS DSP Accumulator and DSPControl Access Sub-class */ + OPC_EXTR_W_DSP = 0x38 | OPC_SPECIAL3, +#if defined(TARGET_MIPS64) + OPC_DEXTR_W_DSP = 0x3C | OPC_SPECIAL3, +#endif };/* BSHFL opcodes */ @@ -564,6 +569,30 @@ enum { OPC_BALIGN = (0x10 << 6) | OPC_APPEND_DSP, }; +#define MASK_EXTR_W (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* MIPS DSP Accumulator and DSPControl Access Sub-class */ +OPC_EXTR_W = (0x00 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTR_R_W = (0x04 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTR_RS_W = (0x06 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTR_S_H = (0x0E <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTRV_S_H = (0x0F <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTRV_W = (0x01 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTRV_R_W = (0x05 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTRV_RS_W = (0x07 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTP = (0x02 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTPV = (0x03 <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTPDP = (0x0A <<6 ) |OPC_EXTR_W_DSP , +OPC_EXTPDPV = (0x0B <<6 ) |OPC_EXTR_W_DSP , +OPC_SHILO = (0x1A <<6 ) |OPC_EXTR_W_DSP , +OPC_SHILOV = (0x1B <<6 ) |OPC_EXTR_W_DSP , +OPC_MTHLIP = (0x1F <<6 ) |OPC_EXTR_W_DSP , +OPC_WRDSP = (0x13 <<6 ) |OPC_EXTR_W_DSP , +OPC_RDDSP = (0x12 <<6 ) |OPC_EXTR_W_DSP , +}; + + +#if defined(TARGET_MIPS64 )#define MASK_ABSQ_S_QH (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) enum {@@ -676,6 +705,32 @@ enum {#endif #if defined(TARGET_MIPS64 ) +#define MASK_DEXTR_W (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6))) +enum { +/* MIPS DSP Accumulator and DSPControl Access Sub-class */ +OPC_DMTHLIP = (0x1F <<6 ) |OPC_DEXTR_W_DSP , +OPC_DSHILO = (0x1A <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTP = (0x02 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTPDP = (0x0A <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTPDPV = (0x0B <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTPV = (0x03 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_L = (0x10 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_R_L = (0x14 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_RS_L = (0x16 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_W = (0x00 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_R_W = (0x04 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_RS_W = (0x06 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTR_S_H = (0x0E <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_L = (0x11 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_R_L = (0x15 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_RS_L = (0x17 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_S_H = (0x0F <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_W = (0x01 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_R_W = (0x05 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DEXTRV_RS_W = (0x07 <<6 ) |OPC_DEXTR_W_DSP , +OPC_DSHILOV = (0x1B <<6 ) |OPC_DEXTR_W_DSP , +}; +#define MASK_DINSV (op) (MASK_SPECIAL3(op) | (op & (0x1F << 6)))enum { /* DSP Bit/Manipulation Sub-class */@@ -14217,6 +14272,240 @@ static void gen_mipsdsp_add_cmp_pick(DisasContext *ctx,MIPS_DEBUG ("%s" , opn); } +static void gen_mipsdsp_accinsn (DisasContext *ctx,uint32_t op1,uint32_t op2, +int ret,int v1,int v2,int check_ret) + +{ +const char *opn ="mipsdsp accumulator" ; +TCGv t0 =tcg_temp_new (); +TCGv t1 =tcg_temp_new (); +TCGv v1_t =tcg_temp_new (); +TCGv v2_t =tcg_temp_new (); +int16_t imm; + +if ((ret ==0 ) && (check_ret ==1 )) { +/* Treat as NOP. */ +MIPS_DEBUG ("NOP" ); +return ; + } + +if (v1 ==0 ) { +tcg_gen_movi_tl (v1_t,0 );
target-mips/translate.c static void gen_mipsdsp_add_cmp_pick(DisasContext *ctx, · line 14303
Quoted 10 lines
target-mips/translate.c +10
-0+ }else { +gen_load_gpr (v1_t, v1); + } + +if (v2 ==0 ) { +tcg_gen_movi_tl (v2_t,0 ); + }else { +gen_load_gpr (v2_t, v2); + } +
Same comments as the previous patches apply here.
Quoted 292 lines
target-mips/translate.c +271
-0+switch (op1) { +case OPC_EXTR_W_DSP : +check_dsp (ctx); +switch (op2) { +case OPC_EXTR_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extr_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTR_R_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extr_r_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTR_RS_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extr_rs_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTR_S_H : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extr_s_h (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTRV_S_H : +tcg_gen_movi_tl (t0, v2); +gen_helper_extr_s_h (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_EXTRV_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_extr_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_EXTRV_R_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_extr_r_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_EXTRV_RS_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_extr_rs_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_EXTP : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extp (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTPV : +tcg_gen_movi_tl (t0, v2); +gen_helper_extp (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_EXTPDP : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_extpdp (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_EXTPDPV : +tcg_gen_movi_tl (t0, v2); +gen_helper_extpdp (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_SHILO : + imm = (ctx->opcode >>20 ) &0x3F ; +tcg_gen_movi_tl (t0, ret); +tcg_gen_movi_tl (t1, imm); +gen_helper_shilo (t0, t1, cpu_env); +break ; +case OPC_SHILOV : +tcg_gen_movi_tl (t0, ret); +gen_helper_shilo (t0, v1_t, cpu_env); +break ; +case OPC_MTHLIP : +tcg_gen_movi_tl (t0, ret); +gen_helper_mthlip (t0, v1_t, cpu_env); +break ; +case OPC_WRDSP : + imm = (ctx->opcode >>11 ) &0x3FF ; +tcg_gen_movi_tl (t0, imm); +gen_helper_wrdsp (v1_t, t0, cpu_env); +break ; +case OPC_RDDSP : + imm = (ctx->opcode >>16 ) &0x03FF ; +tcg_gen_movi_tl (t0, imm); +gen_helper_rddsp (cpu_gpr[ret], t0, cpu_env); +break ; + } +break ; +#ifdef TARGET_MIPS64 +case OPC_DEXTR_W_DSP : +check_dsp (ctx); +switch (op2) { +case OPC_DMTHLIP : +tcg_gen_movi_tl (t0, ret); +gen_helper_dmthlip (v1_t, t0, cpu_env); +break ; +case OPC_DSHILO : + { +int shift = (ctx->opcode >>19 ) &0x7F ; +int ac = (ctx->opcode >>11 ) &0x03 ; +tcg_gen_movi_tl (t0, shift); +tcg_gen_movi_tl (t1, ac); +gen_helper_dshilo (t0, t1, cpu_env); +break ; + } +case OPC_DSHILOV : + { +int ac = (ctx->opcode >>11 ) &0x03 ; +tcg_gen_movi_tl (t0, ac); +gen_helper_dshilo (v1_t, t0, cpu_env); +break ; + } +case OPC_DEXTP : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); + +gen_helper_dextp (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTPV : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextp (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTPDP : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextpdp (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTPDPV : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextpdp (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTR_L : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_l (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_R_L : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_r_l (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_RS_L : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_rs_l (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_R_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_r_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_RS_W : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_rs_w (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTR_S_H : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_s_h (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTRV_S_H : +tcg_gen_movi_tl (t0, v2); +tcg_gen_movi_tl (t1, v1); +gen_helper_dextr_s_h (cpu_gpr[ret], t0, t1, cpu_env); +break ; +case OPC_DEXTRV_L : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_l (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTRV_R_L : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_r_l (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTRV_RS_L : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_rs_l (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTRV_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTRV_R_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_r_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; +case OPC_DEXTRV_RS_W : +tcg_gen_movi_tl (t0, v2); +gen_helper_dextr_rs_w (cpu_gpr[ret], t0, v1_t, cpu_env); +break ; + } +break ; +#endif + } + +tcg_temp_free (t0); +tcg_temp_free (t1); +tcg_temp_free (v1_t); +tcg_temp_free (v2_t); + + (void )opn;/* avoid a compiler warning */ +MIPS_DEBUG ("%s" , opn); +} +/* End MIPSDSP functions. */ static void decode_opc (CPUMIPSState *env,DisasContext *ctx,int *is_branch)@@ -14794,6 +15083,38 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) op2 =MASK_APPEND (ctx->opcode);gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rt, rs, rd,1 );break ; +case OPC_EXTR_W_DSP : + op2 =MASK_EXTR_W (ctx->opcode); +switch (op2) { +case OPC_EXTR_W : +case OPC_EXTR_R_W : +case OPC_EXTR_RS_W : +case OPC_EXTR_S_H : +case OPC_EXTRV_S_H : +case OPC_EXTRV_W : +case OPC_EXTRV_R_W : +case OPC_EXTRV_RS_W : +case OPC_EXTP : +case OPC_EXTPV : +case OPC_EXTPDP : +case OPC_EXTPDPV : +gen_mipsdsp_accinsn (ctx, op1, op2, rt, rs, rd,1 ); +break ; +case OPC_RDDSP : +gen_mipsdsp_accinsn (ctx, op1, op2, rd, rs, rt,1 ); +break ; +case OPC_SHILO : +case OPC_SHILOV : +case OPC_MTHLIP : +case OPC_WRDSP : +gen_mipsdsp_accinsn (ctx, op1, op2, rd, rs, rt,0 ); +break ; +default :/* Invalid */ +MIPS_INVAL ("MASK EXTR.W" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;#if defined(TARGET_MIPS64 ) case OPC_DEXTM ... OPC_DEXT: case OPC_DINSM ... OPC_DINS:@@ -14938,6 +15259,40 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch) op2 =MASK_DAPPEND (ctx->opcode);gen_mipsdsp_add_cmp_pick (ctx, op1, op2, rt, rs, rd,1 );break ; +case OPC_DEXTR_W_DSP : + op2 =MASK_DEXTR_W (ctx->opcode); +switch (op2) { +case OPC_DEXTP : +case OPC_DEXTPDP : +case OPC_DEXTPDPV : +case OPC_DEXTPV : +case OPC_DEXTR_L : +case OPC_DEXTR_R_L : +case OPC_DEXTR_RS_L : +case OPC_DEXTR_W : +case OPC_DEXTR_R_W : +case OPC_DEXTR_RS_W : +case OPC_DEXTR_S_H : +case OPC_DEXTRV_L : +case OPC_DEXTRV_R_L : +case OPC_DEXTRV_RS_L : +case OPC_DEXTRV_S_H : +case OPC_DEXTRV_W : +case OPC_DEXTRV_R_W : +case OPC_DEXTRV_RS_W : +gen_mipsdsp_accinsn (ctx, op1, op2, rt, rs, rd,1 ); +break ; +case OPC_DMTHLIP : +case OPC_DSHILO : +case OPC_DSHILOV : +gen_mipsdsp_accinsn (ctx, op1, op2, rd, rs, rt,0 ); +break ; +default :/* Invalid */ +MIPS_INVAL ("MASK EXTR.W" ); +generate_exception (ctx,EXCP_RI ); +break ; + } +break ;case OPC_DPAQ_W_QH_DSP : op2 =MASK_DPAQ_W_QH (ctx->opcode);switch (op2) {Signature · 1 line
1.7.10.2 (Apple Git-33)
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH v11 12/14 target-mips: Add ASE DSP processors
In reply to Jia LiuAdd 74kf and mips64dspr2-generic-cpu model for test.
--- target-mips/translate_init.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+)
target-mips/translate_init.c +52 -0
@@ -311,6 +311,29 @@ static const mips_def_t mips_defs[] = .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP | ASE_MT, .mmu_type = MMU_TYPE_R4000, }, + { + .name = "74Kf", + .CP0_PRid = 0x00019700, + .CP0_Config0 =MIPS_CONFIG0 | (0x1 <<CP0C0_AR ) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 =MIPS_CONFIG1 | (1 <<CP0C1_FP ) | (15 <<CP0C1_MMU ) | + (0 <<CP0C1_IS ) | (3 <<CP0C1_IL ) | (1 <<CP0C1_IA ) | + (0 <<CP0C1_DS ) | (3 <<CP0C1_DL ) | (1 <<CP0C1_DA ) | + (1 << CP0C1_CA), + .CP0_Config2 = MIPS_CONFIG2, + .CP0_Config3 = MIPS_CONFIG3 | (0 << CP0C3_VInt) | (1 << CP0C3_DSPP), + .CP0_LLAddr_rw_bitmask = 0, + .CP0_LLAddr_shift = 4, + .SYNCI_Step = 32, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x3778FF1F, + .CP1_fcr0 = (1 <<FCR0_F64 ) | (1 <<FCR0_L ) | (1 <<FCR0_W ) | + (1 << FCR0_D) | (1 << FCR0_S) | (0x93 << FCR0_PRID), + .SEGBITS = 32, + .PABITS = 32, + .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP | ASE_DSPR2, + .mmu_type =MMU_TYPE_R4000 , + }, #if defined(TARGET_MIPS64) { .name = "R4000",
@@ -484,6 +507,35 @@ static const mips_def_t mips_defs[] = .insn_flags = CPU_LOONGSON2F, .mmu_type = MMU_TYPE_R4000, }, + { + /* A generic CPU providing MIPS64 ASE DSP 2 features. + FIXME: Eventually this should be replaced by a real CPU model. */ + .name = "mips64dspr2", + .CP0_PRid = 0x00010000, + .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (63 << CP0C1_MMU) | + (2 << CP0C1_IS) | (4 << CP0C1_IL) | (3 << CP0C1_IA) | + (2 << CP0C1_DS) | (4 << CP0C1_DL) | (3 << CP0C1_DA) | + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP), + .CP0_Config2 = MIPS_CONFIG2, + .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_LPA), + .CP0_LLAddr_rw_bitmask = 0, + .CP0_LLAddr_shift = 0, + .SYNCI_Step = 32, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x36FBFFFF, + .CP1_fcr0 = (1 << FCR0_F64) | (1 << FCR0_3D) | (1 << FCR0_PS) | + (1 << FCR0_L) | (1 << FCR0_W) | (1 << FCR0_D) | + (1 << FCR0_S) | (0x00 << FCR0_PRID) | (0x0 << FCR0_REV), + .SEGBITS = 42, + /* The architectural limit is 59, but we have hardcoded 36 bit + in some places... + .PABITS = 59, */ /* the architectural limit */ + .PABITS = 36, + .insn_flags = CPU_MIPS64R2 | ASE_DSP | ASE_DSPR2, + .mmu_type = MMU_TYPE_R4000, + }, #endif };
Signature · 1 line
1.7.10.2 (Apple Git-33)
Re: [Qemu-devel] [PATCH v11 12/14] target-mips: Add ASE DSP processors
Quoted 67 lines · Jia Liu
Add 74kf and mips64dspr2-generic-cpu model for test.
Signed-off-by Jia Liu <[email protected]>--- target-mips/translate_init.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+)target-mips/translate_init.c +45
-0@@ -311,6 +311,29 @@ static const mips_def_t mips_defs[] = .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP | ASE_MT, .mmu_type = MMU_TYPE_R4000, }, + { + .name = "74Kf", + .CP0_PRid = 0x00019700, + .CP0_Config0 =MIPS_CONFIG0 | (0x1 <<CP0C0_AR ) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 =MIPS_CONFIG1 | (1 <<CP0C1_FP ) | (15 <<CP0C1_MMU ) | + (0 <<CP0C1_IS ) | (3 <<CP0C1_IL ) | (1 <<CP0C1_IA ) | + (0 <<CP0C1_DS ) | (3 <<CP0C1_DL ) | (1 <<CP0C1_DA ) | + (1 << CP0C1_CA), + .CP0_Config2 = MIPS_CONFIG2, + .CP0_Config3 = MIPS_CONFIG3 | (0 << CP0C3_VInt) | (1 << CP0C3_DSPP), + .CP0_LLAddr_rw_bitmask = 0, + .CP0_LLAddr_shift = 4, + .SYNCI_Step = 32, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x3778FF1F, + .CP1_fcr0 = (1 <<FCR0_F64 ) | (1 <<FCR0_L ) | (1 <<FCR0_W ) | + (1 << FCR0_D) | (1 << FCR0_S) | (0x93 << FCR0_PRID), + .SEGBITS = 32, + .PABITS = 32, + .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP | ASE_DSPR2, + .mmu_type =MMU_TYPE_R4000 , + }, #if defined(TARGET_MIPS64) { .name = "R4000",@@ -484,6 +507,35 @@ static const mips_def_t mips_defs[] = .insn_flags = CPU_LOONGSON2F, .mmu_type = MMU_TYPE_R4000, }, + { +/* A generic CPU providing MIPS64 ASE DSP 2 features. +FIXME: Eventually this should be replaced by a real CPU model. */ + .name = "mips64dspr2", + .CP0_PRid = 0x00010000, + .CP0_Config0 =MIPS_CONFIG0 | (0x1 <<CP0C0_AR ) | (0x2 <<CP0C0_AT ) | + (MMU_TYPE_R4000 << CP0C0_MT), + .CP0_Config1 =MIPS_CONFIG1 | (1 <<CP0C1_FP ) | (63 <<CP0C1_MMU ) | + (2 <<CP0C1_IS ) | (4 <<CP0C1_IL ) | (3 <<CP0C1_IA ) | + (2 <<CP0C1_DS ) | (4 <<CP0C1_DL ) | (3 <<CP0C1_DA ) | + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP), + .CP0_Config2 = MIPS_CONFIG2, + .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_LPA), + .CP0_LLAddr_rw_bitmask = 0, + .CP0_LLAddr_shift = 0, + .SYNCI_Step = 32, + .CCRes = 2, + .CP0_Status_rw_bitmask = 0x36FBFFFF, + .CP1_fcr0 = (1 <<FCR0_F64 ) | (1 <<FCR0_3D ) | (1 <<FCR0_PS ) | + (1 <<FCR0_L ) | (1 <<FCR0_W ) | (1 <<FCR0_D ) | + (1 << FCR0_S) | (0x00 << FCR0_PRID) | (0x0 << FCR0_REV), + .SEGBITS = 42,
target-mips/translate_init.c static const mips_def_t mips_defs[] = · line 541
Quoted 10 lines
target-mips/translate_init.c +7
-0+/* The architectural limit is 59, but we have hardcoded 36 bit +in some places... +.PABITS = 59, */ /* the architectural limit */ + .PABITS = 36, + .insn_flags = CPU_MIPS64R2 | ASE_DSP | ASE_DSPR2, + .mmu_type = MMU_TYPE_R4000, + },#endif };
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
PATCH v11 13/14 target-mips: Add ASE DSP testcases
In reply to Jia LiuAdd MIPS ASE DSP testcases.
--- tests/tcg/mips/mips32-dsp/Makefile | 135 +++++++++++ tests/tcg/mips/mips32-dsp/absq_s_ph.c | 31 +++ tests/tcg/mips/mips32-dsp/absq_s_w.c | 37 +++ tests/tcg/mips/mips32-dsp/addq_ph.c | 30 +++ tests/tcg/mips/mips32-dsp/addq_s_ph.c | 30 +++ tests/tcg/mips/mips32-dsp/addsc.c | 30 +++ tests/tcg/mips/mips32-dsp/addu_qb.c | 30 +++ tests/tcg/mips/mips32-dsp/addu_s_qb.c | 30 +++ tests/tcg/mips/mips32-dsp/addwc.c | 30 +++ tests/tcg/mips/mips32-dsp/bitrev.c | 20 ++ tests/tcg/mips/mips32-dsp/bposge32.c | 44 ++++ tests/tcg/mips/mips32-dsp/cmp_eq_ph.c | 35 +++ tests/tcg/mips/mips32-dsp/cmp_le_ph.c | 35 +++ tests/tcg/mips/mips32-dsp/cmp_lt_ph.c | 35 +++ tests/tcg/mips/mips32-dsp/cmpgu_eq_qb.c | 31 +++ tests/tcg/mips/mips32-dsp/cmpgu_le_qb.c | 31 +++ tests/tcg/mips/mips32-dsp/cmpgu_lt_qb.c | 31 +++ tests/tcg/mips/mips32-dsp/cmpu_eq_qb.c | 35 +++ tests/tcg/mips/mips32-dsp/cmpu_le_qb.c | 35 +++ tests/tcg/mips/mips32-dsp/cmpu_lt_qb.c | 35 +++ tests/tcg/mips/mips32-dsp/dpaq_s_w_ph.c | 31 +++ tests/tcg/mips/mips32-dsp/dpaq_sa_l_w.c | 31 +++ tests/tcg/mips/mips32-dsp/dpau_h_qbl.c | 27 +++ tests/tcg/mips/mips32-dsp/dpau_h_qbr.c | 27 +++ tests/tcg/mips/mips32-dsp/dpsq_s_w_ph.c | 27 +++ tests/tcg/mips/mips32-dsp/dpsq_sa_l_w.c | 31 +++ tests/tcg/mips/mips32-dsp/dpsu_h_qbl.c | 27 +++ tests/tcg/mips/mips32-dsp/dpsu_h_qbr.c | 27 +++ tests/tcg/mips/mips32-dsp/extp.c | 44 ++++ tests/tcg/mips/mips32-dsp/extpdp.c | 46 ++++ tests/tcg/mips/mips32-dsp/extpdpv.c | 47 ++++ tests/tcg/mips/mips32-dsp/extpv.c | 45 ++++ tests/tcg/mips/mips32-dsp/extr_r_w.c | 25 ++ tests/tcg/mips/mips32-dsp/extr_rs_w.c | 25 ++ tests/tcg/mips/mips32-dsp/extr_s_h.c | 25 ++ tests/tcg/mips/mips32-dsp/extr_w.c | 25 ++ tests/tcg/mips/mips32-dsp/extrv_r_w.c | 29 +++ tests/tcg/mips/mips32-dsp/extrv_rs_w.c | 29 +++ tests/tcg/mips/mips32-dsp/extrv_s_h.c | 29 +++ tests/tcg/mips/mips32-dsp/extrv_w.c | 29 +++ tests/tcg/mips/mips32-dsp/insv.c | 23 ++ tests/tcg/mips/mips32-dsp/lbux.c | 25 ++ tests/tcg/mips/mips32-dsp/lhx.c | 25 ++ tests/tcg/mips/mips32-dsp/lwx.c | 25 ++ tests/tcg/mips/mips32-dsp/madd.c | 31 +++ tests/tcg/mips/mips32-dsp/maddu.c | 31 +++ tests/tcg/mips/mips32-dsp/main.c | 6 + tests/tcg/mips/mips32-dsp/maq_s_w_phl.c | 31 +++ tests/tcg/mips/mips32-dsp/maq_s_w_phr.c | 31 +++ tests/tcg/mips/mips32-dsp/maq_sa_w_phl.c | 31 +++ tests/tcg/mips/mips32-dsp/maq_sa_w_phr.c | 31 +++ tests/tcg/mips/mips32-dsp/mfhi.c | 21 ++ tests/tcg/mips/mips32-dsp/mflo.c | 21 ++ tests/tcg/mips/mips32-dsp/modsub.c | 30 +++ tests/tcg/mips/mips32-dsp/msub.c | 30 +++ tests/tcg/mips/mips32-dsp/msubu.c | 30 +++ tests/tcg/mips/mips32-dsp/mthi.c | 21 ++ tests/tcg/mips/mips32-dsp/mthlip.c | 34 +++ tests/tcg/mips/mips32-dsp/mtlo.c | 21 ++ tests/tcg/mips/mips32-dsp/muleq_s_w_phl.c | 41 ++++ tests/tcg/mips/mips32-dsp/muleq_s_w_phr.c | 40 ++++ tests/tcg/mips/mips32-dsp/muleu_s_ph_qbl.c | 25 ++ tests/tcg/mips/mips32-dsp/muleu_s_ph_qbr.c | 25 ++ tests/tcg/mips/mips32-dsp/mulq_rs_ph.c | 25 ++ tests/tcg/mips/mips32-dsp/mult.c | 24 ++ tests/tcg/mips/mips32-dsp/multu.c | 24 ++ tests/tcg/mips/mips32-dsp/packrl_ph.c | 21 ++ tests/tcg/mips/mips32-dsp/pick_ph.c | 23 ++ tests/tcg/mips/mips32-dsp/pick_qb.c | 23 ++ tests/tcg/mips/mips32-dsp/preceq_w_phl.c | 20 ++ tests/tcg/mips/mips32-dsp/preceq_w_phr.c | 20 ++ tests/tcg/mips/mips32-dsp/precequ_ph_qbl.c | 20 ++ tests/tcg/mips/mips32-dsp/precequ_ph_qbla.c | 20 ++ tests/tcg/mips/mips32-dsp/precequ_ph_qbr.c | 20 ++ tests/tcg/mips/mips32-dsp/precequ_ph_qbra.c | 20 ++ tests/tcg/mips/mips32-dsp/preceu_ph_qbl.c | 20 ++ tests/tcg/mips/mips32-dsp/preceu_ph_qbla.c | 20 ++ tests/tcg/mips/mips32-dsp/preceu_ph_qbr.c | 20 ++ tests/tcg/mips/mips32-dsp/preceu_ph_qbra.c | 20 ++ tests/tcg/mips/mips32-dsp/precrq_ph_w.c | 21 ++ tests/tcg/mips/mips32-dsp/precrq_qb_ph.c | 21 ++ tests/tcg/mips/mips32-dsp/precrq_rs_ph_w.c | 21 ++ tests/tcg/mips/mips32-dsp/precrqu_s_qb_ph.c | 21 ++ tests/tcg/mips/mips32-dsp/raddu_w_qb.c | 20 ++ tests/tcg/mips/mips32-dsp/rddsp.c | 54 +++++ tests/tcg/mips/mips32-dsp/repl_ph.c | 23 ++ tests/tcg/mips/mips32-dsp/repl_qb.c | 16 ++ tests/tcg/mips/mips32-dsp/replv_ph.c | 19 ++ tests/tcg/mips/mips32-dsp/replv_qb.c | 19 ++ tests/tcg/mips/mips32-dsp/shilo.c | 27 +++ tests/tcg/mips/mips32-dsp/shilov.c | 29 +++ tests/tcg/mips/mips32-dsp/shll_ph.c | 24 ++ tests/tcg/mips/mips32-dsp/shll_qb.c | 23 ++ tests/tcg/mips/mips32-dsp/shll_s_ph.c | 24 ++ tests/tcg/mips/mips32-dsp/shll_s_w.c | 24 ++ tests/tcg/mips/mips32-dsp/shllv_ph.c | 25 ++ tests/tcg/mips/mips32-dsp/shllv_qb.c | 24 ++ tests/tcg/mips/mips32-dsp/shllv_s_ph.c | 25 ++ tests/tcg/mips/mips32-dsp/shllv_s_w.c | 25 ++ tests/tcg/mips/mips32-dsp/shra_ph.c | 20 ++ tests/tcg/mips/mips32-dsp/shra_r_ph.c | 20 ++ tests/tcg/mips/mips32-dsp/shra_r_w.c | 20 ++ tests/tcg/mips/mips32-dsp/shrav_ph.c | 21 ++ tests/tcg/mips/mips32-dsp/shrav_r_ph.c | 21 ++ tests/tcg/mips/mips32-dsp/shrav_r_w.c | 21 ++ tests/tcg/mips/mips32-dsp/shrl_qb.c | 20 ++ tests/tcg/mips/mips32-dsp/shrlv_qb.c | 21 ++ tests/tcg/mips/mips32-dsp/subq_ph.c | 25 ++ tests/tcg/mips/mips32-dsp/subq_s_ph.c | 25 ++ tests/tcg/mips/mips32-dsp/subq_s_w.c | 25 ++ tests/tcg/mips/mips32-dsp/subu_qb.c | 25 ++ tests/tcg/mips/mips32-dsp/subu_s_qb.c | 25 ++ tests/tcg/mips/mips32-dsp/wrdsp.c | 54 +++++ tests/tcg/mips/mips32-dspr2/Makefile | 72 ++++++ tests/tcg/mips/mips32-dspr2/absq_s_qb.c | 35 +++ tests/tcg/mips/mips32-dspr2/addqh_ph.c | 30 +++ tests/tcg/mips/mips32-dspr2/addqh_r_ph.c | 30 +++ tests/tcg/mips/mips32-dspr2/addqh_r_w.c | 34 +++ tests/tcg/mips/mips32-dspr2/addqh_w.c | 34 +++ tests/tcg/mips/mips32-dspr2/addu_ph.c | 30 +++ tests/tcg/mips/mips32-dspr2/addu_s_ph.c | 30 +++ tests/tcg/mips/mips32-dspr2/adduh_qb.c | 30 +++ tests/tcg/mips/mips32-dspr2/adduh_r_qb.c | 30 +++ tests/tcg/mips/mips32-dspr2/append.c | 30 +++ tests/tcg/mips/mips32-dspr2/balign.c | 30 +++ tests/tcg/mips/mips32-dspr2/cmpgdu_eq_qb.c | 37 +++ tests/tcg/mips/mips32-dspr2/cmpgdu_le_qb.c | 37 +++ tests/tcg/mips/mips32-dspr2/cmpgdu_lt_qb.c | 37 +++ tests/tcg/mips/mips32-dspr2/dpa_w_ph.c | 27 +++ tests/tcg/mips/mips32-dspr2/dpaqx_s_w_ph.c | 57 +++++ tests/tcg/mips/mips32-dspr2/dpaqx_sa_w_ph.c | 31 +++ tests/tcg/mips/mips32-dspr2/dpax_w_ph.c | 27 +++ tests/tcg/mips/mips32-dspr2/dps_w_ph.c | 27 +++ tests/tcg/mips/mips32-dspr2/dpsqx_s_w_ph.c | 31 +++ tests/tcg/mips/mips32-dspr2/dpsqx_sa_w_ph.c | 31 +++ tests/tcg/mips/mips32-dspr2/dpsx_w_ph.c | 27 +++ tests/tcg/mips/mips32-dspr2/mul_ph.c | 25 ++ tests/tcg/mips/mips32-dspr2/mul_s_ph.c | 25 ++ tests/tcg/mips/mips32-dspr2/muleq_s_w_phl.c | 40 ++++ tests/tcg/mips/mips32-dspr2/mulq_rs_w.c | 36 +++ tests/tcg/mips/mips32-dspr2/mulq_s_ph.c | 25 ++ tests/tcg/mips/mips32-dspr2/mulq_s_w.c | 36 +++ tests/tcg/mips/mips32-dspr2/mulsa_w_ph.c | 29 +++ tests/tcg/mips/mips32-dspr2/mulsaq_s_w_ph.c | 29 +++ tests/tcg/mips/mips32-dspr2/precr_qb_ph.c | 21 ++ tests/tcg/mips/mips32-dspr2/precr_sra_ph_w.c | 32 +++ tests/tcg/mips/mips32-dspr2/precr_sra_r_ph_w.c | 32 +++ tests/tcg/mips/mips32-dspr2/prepend.c | 30 +++ tests/tcg/mips/mips32-dspr2/shra_qb.c | 30 +++ tests/tcg/mips/mips32-dspr2/shra_r_qb.c | 30 +++ tests/tcg/mips/mips32-dspr2/shrav_qb.c | 32 +++ tests/tcg/mips/mips32-dspr2/shrav_r_qb.c | 32 +++ tests/tcg/mips/mips32-dspr2/shrl_ph.c | 20 ++ tests/tcg/mips/mips32-dspr2/shrlv_ph.c | 21 ++ tests/tcg/mips/mips32-dspr2/subqh_ph.c | 21 ++ tests/tcg/mips/mips32-dspr2/subqh_r_ph.c | 21 ++ tests/tcg/mips/mips32-dspr2/subqh_r_w.c | 21 ++ tests/tcg/mips/mips32-dspr2/subqh_w.c | 21 ++ tests/tcg/mips/mips32-dspr2/subu_ph.c | 25 ++ tests/tcg/mips/mips32-dspr2/subu_s_ph.c | 25 ++ tests/tcg/mips/mips32-dspr2/subuh_qb.c | 21 ++ tests/tcg/mips/mips32-dspr2/subuh_r_qb.c | 21 ++ tests/tcg/mips/mips64-dsp/Makefile | 305 ++++++++++++++++++++++++ tests/tcg/mips/mips64-dsp/absq_s_ob.c | 63 +++++ tests/tcg/mips/mips64-dsp/absq_s_ph.c | 37 +++ tests/tcg/mips/mips64-dsp/absq_s_pw.c | 66 +++++ tests/tcg/mips/mips64-dsp/absq_s_qh.c | 40 ++++ tests/tcg/mips/mips64-dsp/absq_s_w.c | 48 ++++ tests/tcg/mips/mips64-dsp/addq_ph.c | 37 +++ tests/tcg/mips/mips64-dsp/addq_pw.c | 26 ++ tests/tcg/mips/mips64-dsp/addq_qh.c | 28 +++ tests/tcg/mips/mips64-dsp/addq_s_ph.c | 37 +++ tests/tcg/mips/mips64-dsp/addq_s_pw.c | 45 ++++ tests/tcg/mips/mips64-dsp/addq_s_qh.c | 26 ++ tests/tcg/mips/mips64-dsp/addsc.c | 37 +++ tests/tcg/mips/mips64-dsp/addu_ob.c | 27 +++ tests/tcg/mips/mips64-dsp/addu_qb.c | 37 +++ tests/tcg/mips/mips64-dsp/addu_s_ob.c | 27 +++ tests/tcg/mips/mips64-dsp/addu_s_qb.c | 38 +++ tests/tcg/mips/mips64-dsp/addwc.c | 37 +++ tests/tcg/mips/mips64-dsp/bitrev.c | 23 ++ tests/tcg/mips/mips64-dsp/bposge32.c | 50 ++++ tests/tcg/mips/mips64-dsp/bposge64.c | 50 ++++ tests/tcg/mips/mips64-dsp/cmp_eq_ph.c | 42 ++++ tests/tcg/mips/mips64-dsp/cmp_eq_pw.c | 27 +++ tests/tcg/mips/mips64-dsp/cmp_eq_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/cmp_le_ph.c | 40 ++++ tests/tcg/mips/mips64-dsp/cmp_le_pw.c | 27 +++ tests/tcg/mips/mips64-dsp/cmp_le_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/cmp_lt_ph.c | 41 ++++ tests/tcg/mips/mips64-dsp/cmp_lt_pw.c | 27 +++ tests/tcg/mips/mips64-dsp/cmp_lt_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/cmpgu_eq_ob.c | 24 ++ tests/tcg/mips/mips64-dsp/cmpgu_eq_qb.c | 38 +++ tests/tcg/mips/mips64-dsp/cmpgu_le_ob.c | 24 ++ tests/tcg/mips/mips64-dsp/cmpgu_le_qb.c | 37 +++ tests/tcg/mips/mips64-dsp/cmpgu_lt_ob.c | 24 ++ tests/tcg/mips/mips64-dsp/cmpgu_lt_qb.c | 38 +++ tests/tcg/mips/mips64-dsp/cmpu_eq_ob.c | 27 +++ tests/tcg/mips/mips64-dsp/cmpu_eq_qb.c | 42 ++++ tests/tcg/mips/mips64-dsp/cmpu_le_ob.c | 26 ++ tests/tcg/mips/mips64-dsp/cmpu_le_qb.c | 41 ++++ tests/tcg/mips/mips64-dsp/cmpu_lt_ob.c | 26 ++ tests/tcg/mips/mips64-dsp/cmpu_lt_qb.c | 42 ++++ tests/tcg/mips/mips64-dsp/dappend.c | 37 +++ tests/tcg/mips/mips64-dsp/dextp.c | 33 +++ tests/tcg/mips/mips64-dsp/dextpdp.c | 37 +++ tests/tcg/mips/mips64-dsp/dextpdpv.c | 38 +++ tests/tcg/mips/mips64-dsp/dextpv.c | 34 +++ tests/tcg/mips/mips64-dsp/dextr_l.c | 27 +++ tests/tcg/mips/mips64-dsp/dextr_r_l.c | 32 +++ tests/tcg/mips/mips64-dsp/dextr_r_w.c | 32 +++ tests/tcg/mips/mips64-dsp/dextr_rs_l.c | 31 +++ tests/tcg/mips/mips64-dsp/dextr_rs_w.c | 31 +++ tests/tcg/mips/mips64-dsp/dextr_s_h.c | 31 +++ tests/tcg/mips/mips64-dsp/dextr_w.c | 27 +++ tests/tcg/mips/mips64-dsp/dextrv_l.c | 28 +++ tests/tcg/mips/mips64-dsp/dextrv_r_l.c | 33 +++ tests/tcg/mips/mips64-dsp/dextrv_r_w.c | 33 +++ tests/tcg/mips/mips64-dsp/dextrv_rs_l.c | 32 +++ tests/tcg/mips/mips64-dsp/dextrv_rs_w.c | 32 +++ tests/tcg/mips/mips64-dsp/dextrv_s_h.c | 32 +++ tests/tcg/mips/mips64-dsp/dextrv_w.c | 28 +++ tests/tcg/mips/mips64-dsp/dinsv.c | 25 ++ tests/tcg/mips/mips64-dsp/dmadd.c | 57 +++++ tests/tcg/mips/mips64-dsp/dmaddu.c | 56 +++++ tests/tcg/mips/mips64-dsp/dmsub.c | 59 +++++ tests/tcg/mips/mips64-dsp/dmsubu.c | 59 +++++ tests/tcg/mips/mips64-dsp/dmthlip.c | 32 +++ tests/tcg/mips/mips64-dsp/dpaq_s_w_ph.c | 32 +++ tests/tcg/mips/mips64-dsp/dpaq_s_w_qh.c | 57 +++++ tests/tcg/mips/mips64-dsp/dpaq_sa_l_pw.c | 62 +++++ tests/tcg/mips/mips64-dsp/dpaq_sa_l_w.c | 32 +++ tests/tcg/mips/mips64-dsp/dpau_h_obl.c | 59 +++++ tests/tcg/mips/mips64-dsp/dpau_h_obr.c | 59 +++++ tests/tcg/mips/mips64-dsp/dpau_h_qbl.c | 29 +++ tests/tcg/mips/mips64-dsp/dpau_h_qbr.c | 29 +++ tests/tcg/mips/mips64-dsp/dpsq_s_w_ph.c | 29 +++ tests/tcg/mips/mips64-dsp/dpsq_s_w_qh.c | 33 +++ tests/tcg/mips/mips64-dsp/dpsq_sa_l_pw.c | 39 +++ tests/tcg/mips/mips64-dsp/dpsq_sa_l_w.c | 32 +++ tests/tcg/mips/mips64-dsp/dpsu_h_obl.c | 32 +++ tests/tcg/mips/mips64-dsp/dpsu_h_obr.c | 32 +++ tests/tcg/mips/mips64-dsp/dpsu_h_qbl.c | 29 +++ tests/tcg/mips/mips64-dsp/dpsu_h_qbr.c | 29 +++ tests/tcg/mips/mips64-dsp/dshilo.c | 31 +++ tests/tcg/mips/mips64-dsp/dshilov.c | 32 +++ tests/tcg/mips/mips64-dsp/extp.c | 50 ++++ tests/tcg/mips/mips64-dsp/extpdp.c | 51 ++++ tests/tcg/mips/mips64-dsp/extpdpv.c | 52 ++++ tests/tcg/mips/mips64-dsp/extpv.c | 51 ++++ tests/tcg/mips/mips64-dsp/extr_r_w.c | 27 +++ tests/tcg/mips/mips64-dsp/extr_rs_w.c | 27 +++ tests/tcg/mips/mips64-dsp/extr_s_h.c | 27 +++ tests/tcg/mips/mips64-dsp/extr_w.c | 27 +++ tests/tcg/mips/mips64-dsp/extrv_r_w.c | 31 +++ tests/tcg/mips/mips64-dsp/extrv_rs_w.c | 31 +++ tests/tcg/mips/mips64-dsp/extrv_s_h.c | 31 +++ tests/tcg/mips/mips64-dsp/extrv_w.c | 31 +++ tests/tcg/mips/mips64-dsp/head.S | 16 ++ tests/tcg/mips/mips64-dsp/insv.c | 26 ++ tests/tcg/mips/mips64-dsp/io.h | 22 ++ tests/tcg/mips/mips64-dsp/lbux.c | 27 +++ tests/tcg/mips/mips64-dsp/ldx.c | 27 +++ tests/tcg/mips/mips64-dsp/lhx.c | 27 +++ tests/tcg/mips/mips64-dsp/lwx.c | 27 +++ tests/tcg/mips/mips64-dsp/madd.c | 33 +++ tests/tcg/mips/mips64-dsp/maddu.c | 33 +++ tests/tcg/mips/mips64-dsp/maq_s_l_pwl.c | 56 +++++ tests/tcg/mips/mips64-dsp/maq_s_l_pwr.c | 56 +++++ tests/tcg/mips/mips64-dsp/maq_s_w_phl.c | 33 +++ tests/tcg/mips/mips64-dsp/maq_s_w_phr.c | 33 +++ tests/tcg/mips/mips64-dsp/maq_s_w_qhll.c | 62 +++++ tests/tcg/mips/mips64-dsp/maq_s_w_qhlr.c | 62 +++++ tests/tcg/mips/mips64-dsp/maq_s_w_qhrl.c | 63 +++++ tests/tcg/mips/mips64-dsp/maq_s_w_qhrr.c | 63 +++++ tests/tcg/mips/mips64-dsp/maq_sa_w_phl.c | 33 +++ tests/tcg/mips/mips64-dsp/maq_sa_w_phr.c | 33 +++ tests/tcg/mips/mips64-dsp/maq_sa_w_qhll.c | 62 +++++ tests/tcg/mips/mips64-dsp/maq_sa_w_qhlr.c | 64 +++++ tests/tcg/mips/mips64-dsp/maq_sa_w_qhrl.c | 64 +++++ tests/tcg/mips/mips64-dsp/maq_sa_w_qhrr.c | 64 +++++ tests/tcg/mips/mips64-dsp/mfhi.c | 24 ++ tests/tcg/mips/mips64-dsp/mflo.c | 24 ++ tests/tcg/mips/mips64-dsp/mips_boot.lds | 31 +++ tests/tcg/mips/mips64-dsp/modsub.c | 37 +++ tests/tcg/mips/mips64-dsp/msub.c | 32 +++ tests/tcg/mips/mips64-dsp/msubu.c | 32 +++ tests/tcg/mips/mips64-dsp/mthi.c | 24 ++ tests/tcg/mips/mips64-dsp/mthlip.c | 35 +++ tests/tcg/mips/mips64-dsp/mtlo.c | 22 ++ tests/tcg/mips/mips64-dsp/muleq_s_pw_qhl.c | 55 +++++ tests/tcg/mips/mips64-dsp/muleq_s_pw_qhr.c | 24 ++ tests/tcg/mips/mips64-dsp/muleq_s_w_phl.c | 46 ++++ tests/tcg/mips/mips64-dsp/muleq_s_w_phr.c | 45 ++++ tests/tcg/mips/mips64-dsp/muleu_s_ph_qbl.c | 27 +++ tests/tcg/mips/mips64-dsp/muleu_s_ph_qbr.c | 27 +++ tests/tcg/mips/mips64-dsp/muleu_s_qh_obl.c | 25 ++ tests/tcg/mips/mips64-dsp/muleu_s_qh_obr.c | 25 ++ tests/tcg/mips/mips64-dsp/mulq_rs_ph.c | 27 +++ tests/tcg/mips/mips64-dsp/mulq_rs_qh.c | 33 +++ tests/tcg/mips/mips64-dsp/mulsaq_s_l_pw.c | 59 +++++ tests/tcg/mips/mips64-dsp/mulsaq_s_w_qh.c | 57 +++++ tests/tcg/mips/mips64-dsp/mult.c | 26 ++ tests/tcg/mips/mips64-dsp/multu.c | 26 ++ tests/tcg/mips/mips64-dsp/packrl_ph.c | 24 ++ tests/tcg/mips/mips64-dsp/packrl_pw.c | 24 ++ tests/tcg/mips/mips64-dsp/pick_ob.c | 27 +++ tests/tcg/mips/mips64-dsp/pick_ph.c | 26 ++ tests/tcg/mips/mips64-dsp/pick_pw.c | 28 +++ tests/tcg/mips/mips64-dsp/pick_qb.c | 26 ++ tests/tcg/mips/mips64-dsp/pick_qh.c | 28 +++ tests/tcg/mips/mips64-dsp/preceq_l_pwl.c | 24 ++ tests/tcg/mips/mips64-dsp/preceq_l_pwr.c | 24 ++ tests/tcg/mips/mips64-dsp/preceq_pw_qhl.c | 21 ++ tests/tcg/mips/mips64-dsp/preceq_pw_qhla.c | 23 ++ tests/tcg/mips/mips64-dsp/preceq_pw_qhr.c | 21 ++ tests/tcg/mips/mips64-dsp/preceq_pw_qhra.c | 23 ++ tests/tcg/mips/mips64-dsp/preceq_w_phl.c | 23 ++ tests/tcg/mips/mips64-dsp/preceq_w_phr.c | 23 ++ tests/tcg/mips/mips64-dsp/precequ_ph_qbl.c | 23 ++ tests/tcg/mips/mips64-dsp/precequ_ph_qbla.c | 23 ++ tests/tcg/mips/mips64-dsp/precequ_ph_qbr.c | 23 ++ tests/tcg/mips/mips64-dsp/precequ_ph_qbra.c | 23 ++ tests/tcg/mips/mips64-dsp/precequ_qh_obl.c | 22 ++ tests/tcg/mips/mips64-dsp/precequ_qh_obla.c | 22 ++ tests/tcg/mips/mips64-dsp/precequ_qh_obr.c | 24 ++ tests/tcg/mips/mips64-dsp/precequ_qh_obra.c | 24 ++ tests/tcg/mips/mips64-dsp/preceu_ph_qbl.c | 23 ++ tests/tcg/mips/mips64-dsp/preceu_ph_qbla.c | 23 ++ tests/tcg/mips/mips64-dsp/preceu_ph_qbr.c | 23 ++ tests/tcg/mips/mips64-dsp/preceu_ph_qbra.c | 23 ++ tests/tcg/mips/mips64-dsp/preceu_qh_obl.c | 22 ++ tests/tcg/mips/mips64-dsp/preceu_qh_obla.c | 22 ++ tests/tcg/mips/mips64-dsp/preceu_qh_obr.c | 23 ++ tests/tcg/mips/mips64-dsp/preceu_qh_obra.c | 23 ++ tests/tcg/mips/mips64-dsp/precr_ob_qh.c | 25 ++ tests/tcg/mips/mips64-dsp/precr_sra_qh_pw.c | 40 ++++ tests/tcg/mips/mips64-dsp/precr_sra_r_qh_pw.c | 40 ++++ tests/tcg/mips/mips64-dsp/precrq_ob_qh.c | 25 ++ tests/tcg/mips/mips64-dsp/precrq_ph_w.c | 24 ++ tests/tcg/mips/mips64-dsp/precrq_pw_l.c | 25 ++ tests/tcg/mips/mips64-dsp/precrq_qb_ph.c | 24 ++ tests/tcg/mips/mips64-dsp/precrq_qh_pw.c | 25 ++ tests/tcg/mips/mips64-dsp/precrq_rs_ph_w.c | 24 ++ tests/tcg/mips/mips64-dsp/precrq_rs_qh_pw.c | 25 ++ tests/tcg/mips/mips64-dsp/precrqu_s_ob_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/precrqu_s_qb_ph.c | 24 ++ tests/tcg/mips/mips64-dsp/prependd.c | 37 +++ tests/tcg/mips/mips64-dsp/prependw.c | 37 +++ tests/tcg/mips/mips64-dsp/printf.c | 266 +++++++++++++++++++++ tests/tcg/mips/mips64-dsp/raddu_l_ob.c | 22 ++ tests/tcg/mips/mips64-dsp/raddu_w_qb.c | 23 ++ tests/tcg/mips/mips64-dsp/rddsp.c | 53 ++++ tests/tcg/mips/mips64-dsp/repl_ob.c | 21 ++ tests/tcg/mips/mips64-dsp/repl_ph.c | 30 +++ tests/tcg/mips/mips64-dsp/repl_pw.c | 34 +++ tests/tcg/mips/mips64-dsp/repl_qb.c | 19 ++ tests/tcg/mips/mips64-dsp/repl_qh.c | 34 +++ tests/tcg/mips/mips64-dsp/replv_ob.c | 23 ++ tests/tcg/mips/mips64-dsp/replv_ph.c | 22 ++ tests/tcg/mips/mips64-dsp/replv_pw.c | 23 ++ tests/tcg/mips/mips64-dsp/replv_qb.c | 22 ++ tests/tcg/mips/mips64-dsp/shilo.c | 29 +++ tests/tcg/mips/mips64-dsp/shilov.c | 31 +++ tests/tcg/mips/mips64-dsp/shll_ob.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_ph.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_pw.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_qb.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_qh.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_s_ph.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_s_pw.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_s_qh.c | 26 ++ tests/tcg/mips/mips64-dsp/shll_s_w.c | 26 ++ tests/tcg/mips/mips64-dsp/shllv_ob.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_ph.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_pw.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_qb.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_s_ph.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_s_pw.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_s_qh.c | 27 +++ tests/tcg/mips/mips64-dsp/shllv_s_w.c | 27 +++ tests/tcg/mips/mips64-dsp/shra_ob.c | 22 ++ tests/tcg/mips/mips64-dsp/shra_ph.c | 23 ++ tests/tcg/mips/mips64-dsp/shra_pw.c | 22 ++ tests/tcg/mips/mips64-dsp/shra_qh.c | 24 ++ tests/tcg/mips/mips64-dsp/shra_r_ob.c | 22 ++ tests/tcg/mips/mips64-dsp/shra_r_ph.c | 23 ++ tests/tcg/mips/mips64-dsp/shra_r_pw.c | 22 ++ tests/tcg/mips/mips64-dsp/shra_r_qh.c | 23 ++ tests/tcg/mips/mips64-dsp/shra_r_w.c | 23 ++ tests/tcg/mips/mips64-dsp/shrav_ph.c | 24 ++ tests/tcg/mips/mips64-dsp/shrav_pw.c | 23 ++ tests/tcg/mips/mips64-dsp/shrav_qh.c | 24 ++ tests/tcg/mips/mips64-dsp/shrav_r_ph.c | 24 ++ tests/tcg/mips/mips64-dsp/shrav_r_pw.c | 23 ++ tests/tcg/mips/mips64-dsp/shrav_r_qh.c | 24 ++ tests/tcg/mips/mips64-dsp/shrav_r_w.c | 24 ++ tests/tcg/mips/mips64-dsp/shrl_ob.c | 23 ++ tests/tcg/mips/mips64-dsp/shrl_qb.c | 23 ++ tests/tcg/mips/mips64-dsp/shrl_qh.c | 22 ++ tests/tcg/mips/mips64-dsp/shrlv_ob.c | 24 ++ tests/tcg/mips/mips64-dsp/shrlv_qb.c | 24 ++ tests/tcg/mips/mips64-dsp/shrlv_qh.c | 23 ++ tests/tcg/mips/mips64-dsp/subq_ph.c | 27 +++ tests/tcg/mips/mips64-dsp/subq_pw.c | 44 ++++ tests/tcg/mips/mips64-dsp/subq_qh.c | 26 ++ tests/tcg/mips/mips64-dsp/subq_s_ph.c | 27 +++ tests/tcg/mips/mips64-dsp/subq_s_pw.c | 45 ++++ tests/tcg/mips/mips64-dsp/subq_s_qh.c | 44 ++++ tests/tcg/mips/mips64-dsp/subq_s_w.c | 27 +++ tests/tcg/mips/mips64-dsp/subu_ob.c | 26 ++ tests/tcg/mips/mips64-dsp/subu_qb.c | 27 +++ tests/tcg/mips/mips64-dsp/subu_s_ob.c | 26 ++ tests/tcg/mips/mips64-dsp/subu_s_qb.c | 27 +++ tests/tcg/mips/mips64-dsp/wrdsp.c | 48 ++++ tests/tcg/mips/mips64-dspr2/.directory | 2 + tests/tcg/mips/mips64-dspr2/Makefile | 117 +++++++++ tests/tcg/mips/mips64-dspr2/absq_s_qb.c | 42 ++++ tests/tcg/mips/mips64-dspr2/addqh_ph.c | 35 +++ tests/tcg/mips/mips64-dspr2/addqh_r_ph.c | 35 +++ tests/tcg/mips/mips64-dspr2/addqh_r_w.c | 38 +++ tests/tcg/mips/mips64-dspr2/addqh_w.c | 39 +++ tests/tcg/mips/mips64-dspr2/addu_ph.c | 35 +++ tests/tcg/mips/mips64-dspr2/addu_qh.c | 41 ++++ tests/tcg/mips/mips64-dspr2/addu_s_ph.c | 35 +++ tests/tcg/mips/mips64-dspr2/addu_s_qh.c | 41 ++++ tests/tcg/mips/mips64-dspr2/adduh_ob.c | 21 ++ tests/tcg/mips/mips64-dspr2/adduh_qb.c | 35 +++ tests/tcg/mips/mips64-dspr2/adduh_r_ob.c | 21 ++ tests/tcg/mips/mips64-dspr2/adduh_r_qb.c | 35 +++ tests/tcg/mips/mips64-dspr2/append.c | 35 +++ tests/tcg/mips/mips64-dspr2/balign.c | 35 +++ tests/tcg/mips/mips64-dspr2/cmpgdu_eq_ob.c | 26 ++ tests/tcg/mips/mips64-dspr2/cmpgdu_eq_qb.c | 41 ++++ tests/tcg/mips/mips64-dspr2/cmpgdu_le_ob.c | 26 ++ tests/tcg/mips/mips64-dspr2/cmpgdu_le_qb.c | 48 ++++ tests/tcg/mips/mips64-dspr2/cmpgdu_lt_ob.c | 26 ++ tests/tcg/mips/mips64-dspr2/cmpgdu_lt_qb.c | 48 ++++ tests/tcg/mips/mips64-dspr2/dbalign.c | 23 ++ tests/tcg/mips/mips64-dspr2/dpa_w_ph.c | 32 +++ tests/tcg/mips/mips64-dspr2/dpa_w_qh.c | 56 +++++ tests/tcg/mips/mips64-dspr2/dpaqx_s_w_ph.c | 74 ++++++ tests/tcg/mips/mips64-dspr2/dpaqx_sa_w_ph.c | 42 ++++ tests/tcg/mips/mips64-dspr2/dpax_w_ph.c | 32 +++ tests/tcg/mips/mips64-dspr2/dps_w_ph.c | 28 +++ tests/tcg/mips/mips64-dspr2/dps_w_qh.c | 55 +++++ tests/tcg/mips/mips64-dspr2/dpsqx_s_w_ph.c | 31 +++ tests/tcg/mips/mips64-dspr2/dpsqx_sa_w_ph.c | 30 +++ tests/tcg/mips/mips64-dspr2/dpsx_w_ph.c | 28 +++ tests/tcg/mips/mips64-dspr2/head.S | 16 ++ tests/tcg/mips/mips64-dspr2/io.h | 22 ++ tests/tcg/mips/mips64-dspr2/mips_boot.lds | 31 +++ tests/tcg/mips/mips64-dspr2/mul_ph.c | 26 ++ tests/tcg/mips/mips64-dspr2/mul_s_ph.c | 26 ++ tests/tcg/mips/mips64-dspr2/muleq_s_w_phl.c | 42 ++++ tests/tcg/mips/mips64-dspr2/mulq_rs_w.c | 40 ++++ tests/tcg/mips/mips64-dspr2/mulq_s_ph.c | 26 ++ tests/tcg/mips/mips64-dspr2/mulq_s_w.c | 40 ++++ tests/tcg/mips/mips64-dspr2/mulsa_w_ph.c | 30 +++ tests/tcg/mips/mips64-dspr2/mulsaq_s_w_ph.c | 30 +++ tests/tcg/mips/mips64-dspr2/precr_qb_ph.c | 23 ++ tests/tcg/mips/mips64-dspr2/precr_sra_ph_w.c | 37 +++ tests/tcg/mips/mips64-dspr2/precr_sra_r_ph_w.c | 37 +++ tests/tcg/mips/mips64-dspr2/prepend.c | 35 +++ tests/tcg/mips/mips64-dspr2/printf.c | 266 +++++++++++++++++++++ tests/tcg/mips/mips64-dspr2/shra_qb.c | 35 +++ tests/tcg/mips/mips64-dspr2/shra_r_qb.c | 35 +++ tests/tcg/mips/mips64-dspr2/shrav_ob.c | 22 ++ tests/tcg/mips/mips64-dspr2/shrav_qb.c | 37 +++ tests/tcg/mips/mips64-dspr2/shrav_r_ob.c | 22 ++ tests/tcg/mips/mips64-dspr2/shrav_r_qb.c | 37 +++ tests/tcg/mips/mips64-dspr2/shrl_ph.c | 22 ++ tests/tcg/mips/mips64-dspr2/shrlv_ph.c | 23 ++ tests/tcg/mips/mips64-dspr2/subqh_ph.c | 23 ++ tests/tcg/mips/mips64-dspr2/subqh_r_ph.c | 23 ++ tests/tcg/mips/mips64-dspr2/subqh_r_w.c | 23 ++ tests/tcg/mips/mips64-dspr2/subqh_w.c | 23 ++ tests/tcg/mips/mips64-dspr2/subu_ph.c | 26 ++ tests/tcg/mips/mips64-dspr2/subu_qh.c | 24 ++ tests/tcg/mips/mips64-dspr2/subu_s_ph.c | 25 ++ tests/tcg/mips/mips64-dspr2/subu_s_qh.c | 24 ++ tests/tcg/mips/mips64-dspr2/subuh_ob.c | 23 ++ tests/tcg/mips/mips64-dspr2/subuh_qb.c | 23 ++ tests/tcg/mips/mips64-dspr2/subuh_r_ob.c | 23 ++ tests/tcg/mips/mips64-dspr2/subuh_r_qb.c | 23 ++ 487 files changed, 15870 insertions(+) create mode 100644 tests/tcg/mips/mips32-dsp/Makefile create mode 100644 tests/tcg/mips/mips32-dsp/absq_s_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/absq_s_w.c create mode 100644 tests/tcg/mips/mips32-dsp/addq_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/addq_s_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/addsc.c create mode 100644 tests/tcg/mips/mips32-dsp/addu_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/addu_s_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/addwc.c create mode 100644 tests/tcg/mips/mips32-dsp/bitrev.c create mode 100644 tests/tcg/mips/mips32-dsp/bposge32.c create mode 100644 tests/tcg/mips/mips32-dsp/cmp_eq_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/cmp_le_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/cmp_lt_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpgu_eq_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpgu_le_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpgu_lt_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpu_eq_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpu_le_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/cmpu_lt_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/dpaq_s_w_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/dpaq_sa_l_w.c create mode 100644 tests/tcg/mips/mips32-dsp/dpau_h_qbl.c create mode 100644 tests/tcg/mips/mips32-dsp/dpau_h_qbr.c create mode 100644 tests/tcg/mips/mips32-dsp/dpsq_s_w_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/dpsq_sa_l_w.c create mode 100644 tests/tcg/mips/mips32-dsp/dpsu_h_qbl.c create mode 100644 tests/tcg/mips/mips32-dsp/dpsu_h_qbr.c create mode 100644 tests/tcg/mips/mips32-dsp/extp.c create mode 100644 tests/tcg/mips/mips32-dsp/extpdp.c create mode 100644 tests/tcg/mips/mips32-dsp/extpdpv.c create mode 100644 tests/tcg/mips/mips32-dsp/extpv.c create mode 100644 tests/tcg/mips/mips32-dsp/extr_r_w.c create mode 100644 tests/tcg/mips/mips32-dsp/extr_rs_w.c create mode 100644 tests/tcg/mips/mips32-dsp/extr_s_h.c create mode 100644 tests/tcg/mips/mips32-dsp/extr_w.c create mode 100644 tests/tcg/mips/mips32-dsp/extrv_r_w.c create mode 100644 tests/tcg/mips/mips32-dsp/extrv_rs_w.c create mode 100644 tests/tcg/mips/mips32-dsp/extrv_s_h.c create mode 100644 tests/tcg/mips/mips32-dsp/extrv_w.c create mode 100644 tests/tcg/mips/mips32-dsp/insv.c create mode 100644 tests/tcg/mips/mips32-dsp/lbux.c create mode 100644 tests/tcg/mips/mips32-dsp/lhx.c create mode 100644 tests/tcg/mips/mips32-dsp/lwx.c create mode 100644 tests/tcg/mips/mips32-dsp/madd.c create mode 100644 tests/tcg/mips/mips32-dsp/maddu.c create mode 100644 tests/tcg/mips/mips32-dsp/main.c create mode 100644 tests/tcg/mips/mips32-dsp/maq_s_w_phl.c create mode 100644 tests/tcg/mips/mips32-dsp/maq_s_w_phr.c create mode 100644 tests/tcg/mips/mips32-dsp/maq_sa_w_phl.c create mode 100644 tests/tcg/mips/mips32-dsp/maq_sa_w_phr.c create mode 100644 tests/tcg/mips/mips32-dsp/mfhi.c create mode 100644 tests/tcg/mips/mips32-dsp/mflo.c create mode 100644 tests/tcg/mips/mips32-dsp/modsub.c create mode 100644 tests/tcg/mips/mips32-dsp/msub.c create mode 100644 tests/tcg/mips/mips32-dsp/msubu.c create mode 100644 tests/tcg/mips/mips32-dsp/mthi.c create mode 100644 tests/tcg/mips/mips32-dsp/mthlip.c create mode 100644 tests/tcg/mips/mips32-dsp/mtlo.c create mode 100644 tests/tcg/mips/mips32-dsp/muleq_s_w_phl.c create mode 100644 tests/tcg/mips/mips32-dsp/muleq_s_w_phr.c create mode 100644 tests/tcg/mips/mips32-dsp/muleu_s_ph_qbl.c create mode 100644 tests/tcg/mips/mips32-dsp/muleu_s_ph_qbr.c create mode 100644 tests/tcg/mips/mips32-dsp/mulq_rs_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/mult.c create mode 100644 tests/tcg/mips/mips32-dsp/multu.c create mode 100644 tests/tcg/mips/mips32-dsp/packrl_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/pick_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/pick_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/preceq_w_phl.c create mode 100644 tests/tcg/mips/mips32-dsp/preceq_w_phr.c create mode 100644 tests/tcg/mips/mips32-dsp/precequ_ph_qbl.c create mode 100644 tests/tcg/mips/mips32-dsp/precequ_ph_qbla.c create mode 100644 tests/tcg/mips/mips32-dsp/precequ_ph_qbr.c create mode 100644 tests/tcg/mips/mips32-dsp/precequ_ph_qbra.c create mode 100644 tests/tcg/mips/mips32-dsp/preceu_ph_qbl.c create mode 100644 tests/tcg/mips/mips32-dsp/preceu_ph_qbla.c create mode 100644 tests/tcg/mips/mips32-dsp/preceu_ph_qbr.c create mode 100644 tests/tcg/mips/mips32-dsp/preceu_ph_qbra.c create mode 100644 tests/tcg/mips/mips32-dsp/precrq_ph_w.c create mode 100644 tests/tcg/mips/mips32-dsp/precrq_qb_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/precrq_rs_ph_w.c create mode 100644 tests/tcg/mips/mips32-dsp/precrqu_s_qb_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/raddu_w_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/rddsp.c create mode 100644 tests/tcg/mips/mips32-dsp/repl_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/repl_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/replv_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/replv_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/shilo.c create mode 100644 tests/tcg/mips/mips32-dsp/shilov.c create mode 100644 tests/tcg/mips/mips32-dsp/shll_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shll_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/shll_s_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shll_s_w.c create mode 100644 tests/tcg/mips/mips32-dsp/shllv_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shllv_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/shllv_s_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shllv_s_w.c create mode 100644 tests/tcg/mips/mips32-dsp/shra_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shra_r_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shra_r_w.c create mode 100644 tests/tcg/mips/mips32-dsp/shrav_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shrav_r_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/shrav_r_w.c create mode 100644 tests/tcg/mips/mips32-dsp/shrl_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/shrlv_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/subq_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/subq_s_ph.c create mode 100644 tests/tcg/mips/mips32-dsp/subq_s_w.c create mode 100644 tests/tcg/mips/mips32-dsp/subu_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/subu_s_qb.c create mode 100644 tests/tcg/mips/mips32-dsp/wrdsp.c create mode 100644 tests/tcg/mips/mips32-dspr2/Makefile create mode 100644 tests/tcg/mips/mips32-dspr2/absq_s_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/addqh_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/addqh_r_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/addqh_r_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/addqh_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/addu_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/addu_s_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/adduh_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/adduh_r_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/append.c create mode 100644 tests/tcg/mips/mips32-dspr2/balign.c create mode 100644 tests/tcg/mips/mips32-dspr2/cmpgdu_eq_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/cmpgdu_le_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/cmpgdu_lt_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpa_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpaqx_s_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpaqx_sa_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpax_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dps_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpsqx_s_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpsqx_sa_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/dpsx_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/mul_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/mul_s_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/muleq_s_w_phl.c create mode 100644 tests/tcg/mips/mips32-dspr2/mulq_rs_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/mulq_s_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/mulq_s_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/mulsa_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/mulsaq_s_w_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/precr_qb_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/precr_sra_ph_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/precr_sra_r_ph_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/prepend.c create mode 100644 tests/tcg/mips/mips32-dspr2/shra_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/shra_r_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/shrav_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/shrav_r_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/shrl_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/shrlv_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/subqh_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/subqh_r_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/subqh_r_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/subqh_w.c create mode 100644 tests/tcg/mips/mips32-dspr2/subu_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/subu_s_ph.c create mode 100644 tests/tcg/mips/mips32-dspr2/subuh_qb.c create mode 100644 tests/tcg/mips/mips32-dspr2/subuh_r_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/Makefile create mode 100644 tests/tcg/mips/mips64-dsp/absq_s_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/absq_s_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/absq_s_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/absq_s_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/absq_s_w.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_s_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_s_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/addq_s_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/addsc.c create mode 100644 tests/tcg/mips/mips64-dsp/addu_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/addu_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/addu_s_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/addu_s_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/addwc.c create mode 100644 tests/tcg/mips/mips64-dsp/bitrev.c create mode 100644 tests/tcg/mips/mips64-dsp/bposge32.c create mode 100644 tests/tcg/mips/mips64-dsp/bposge64.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_eq_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_eq_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_eq_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_le_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_le_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_le_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_lt_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_lt_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/cmp_lt_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_eq_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_eq_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_le_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_le_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_lt_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpgu_lt_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_eq_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_eq_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_le_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_le_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_lt_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/cmpu_lt_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/dappend.c create mode 100644 tests/tcg/mips/mips64-dsp/dextp.c create mode 100644 tests/tcg/mips/mips64-dsp/dextpdp.c create mode 100644 tests/tcg/mips/mips64-dsp/dextpdpv.c create mode 100644 tests/tcg/mips/mips64-dsp/dextpv.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_r_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_rs_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_rs_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_s_h.c create mode 100644 tests/tcg/mips/mips64-dsp/dextr_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_r_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_rs_l.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_rs_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_s_h.c create mode 100644 tests/tcg/mips/mips64-dsp/dextrv_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dinsv.c create mode 100644 tests/tcg/mips/mips64-dsp/dmadd.c create mode 100644 tests/tcg/mips/mips64-dsp/dmaddu.c create mode 100644 tests/tcg/mips/mips64-dsp/dmsub.c create mode 100644 tests/tcg/mips/mips64-dsp/dmsubu.c create mode 100644 tests/tcg/mips/mips64-dsp/dmthlip.c create mode 100644 tests/tcg/mips/mips64-dsp/dpaq_s_w_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/dpaq_s_w_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/dpaq_sa_l_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/dpaq_sa_l_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dpau_h_obl.c create mode 100644 tests/tcg/mips/mips64-dsp/dpau_h_obr.c create mode 100644 tests/tcg/mips/mips64-dsp/dpau_h_qbl.c create mode 100644 tests/tcg/mips/mips64-dsp/dpau_h_qbr.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsq_s_w_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsq_s_w_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsq_sa_l_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsq_sa_l_w.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsu_h_obl.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsu_h_obr.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsu_h_qbl.c create mode 100644 tests/tcg/mips/mips64-dsp/dpsu_h_qbr.c create mode 100644 tests/tcg/mips/mips64-dsp/dshilo.c create mode 100644 tests/tcg/mips/mips64-dsp/dshilov.c create mode 100644 tests/tcg/mips/mips64-dsp/extp.c create mode 100644 tests/tcg/mips/mips64-dsp/extpdp.c create mode 100644 tests/tcg/mips/mips64-dsp/extpdpv.c create mode 100644 tests/tcg/mips/mips64-dsp/extpv.c create mode 100644 tests/tcg/mips/mips64-dsp/extr_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/extr_rs_w.c create mode 100644 tests/tcg/mips/mips64-dsp/extr_s_h.c create mode 100644 tests/tcg/mips/mips64-dsp/extr_w.c create mode 100644 tests/tcg/mips/mips64-dsp/extrv_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/extrv_rs_w.c create mode 100644 tests/tcg/mips/mips64-dsp/extrv_s_h.c create mode 100644 tests/tcg/mips/mips64-dsp/extrv_w.c create mode 100644 tests/tcg/mips/mips64-dsp/head.S create mode 100644 tests/tcg/mips/mips64-dsp/insv.c create mode 100644 tests/tcg/mips/mips64-dsp/io.h create mode 100644 tests/tcg/mips/mips64-dsp/lbux.c create mode 100644 tests/tcg/mips/mips64-dsp/ldx.c create mode 100644 tests/tcg/mips/mips64-dsp/lhx.c create mode 100644 tests/tcg/mips/mips64-dsp/lwx.c create mode 100644 tests/tcg/mips/mips64-dsp/madd.c create mode 100644 tests/tcg/mips/mips64-dsp/maddu.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_l_pwl.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_l_pwr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_phl.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_phr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_qhll.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_qhlr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_qhrl.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_s_w_qhrr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_phl.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_phr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_qhll.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_qhlr.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_qhrl.c create mode 100644 tests/tcg/mips/mips64-dsp/maq_sa_w_qhrr.c create mode 100644 tests/tcg/mips/mips64-dsp/mfhi.c create mode 100644 tests/tcg/mips/mips64-dsp/mflo.c create mode 100644 tests/tcg/mips/mips64-dsp/mips_boot.lds create mode 100644 tests/tcg/mips/mips64-dsp/modsub.c create mode 100644 tests/tcg/mips/mips64-dsp/msub.c create mode 100644 tests/tcg/mips/mips64-dsp/msubu.c create mode 100644 tests/tcg/mips/mips64-dsp/mthi.c create mode 100644 tests/tcg/mips/mips64-dsp/mthlip.c create mode 100644 tests/tcg/mips/mips64-dsp/mtlo.c create mode 100644 tests/tcg/mips/mips64-dsp/muleq_s_pw_qhl.c create mode 100644 tests/tcg/mips/mips64-dsp/muleq_s_pw_qhr.c create mode 100644 tests/tcg/mips/mips64-dsp/muleq_s_w_phl.c create mode 100644 tests/tcg/mips/mips64-dsp/muleq_s_w_phr.c create mode 100644 tests/tcg/mips/mips64-dsp/muleu_s_ph_qbl.c create mode 100644 tests/tcg/mips/mips64-dsp/muleu_s_ph_qbr.c create mode 100644 tests/tcg/mips/mips64-dsp/muleu_s_qh_obl.c create mode 100644 tests/tcg/mips/mips64-dsp/muleu_s_qh_obr.c create mode 100644 tests/tcg/mips/mips64-dsp/mulq_rs_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/mulq_rs_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/mulsaq_s_l_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/mulsaq_s_w_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/mult.c create mode 100644 tests/tcg/mips/mips64-dsp/multu.c create mode 100644 tests/tcg/mips/mips64-dsp/packrl_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/packrl_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/pick_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/pick_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/pick_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/pick_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/pick_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_l_pwl.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_l_pwr.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_pw_qhl.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_pw_qhla.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_pw_qhr.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_pw_qhra.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_w_phl.c create mode 100644 tests/tcg/mips/mips64-dsp/preceq_w_phr.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_ph_qbl.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_ph_qbla.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_ph_qbr.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_ph_qbra.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_qh_obl.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_qh_obla.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_qh_obr.c create mode 100644 tests/tcg/mips/mips64-dsp/precequ_qh_obra.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_ph_qbl.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_ph_qbla.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_ph_qbr.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_ph_qbra.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_qh_obl.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_qh_obla.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_qh_obr.c create mode 100644 tests/tcg/mips/mips64-dsp/preceu_qh_obra.c create mode 100644 tests/tcg/mips/mips64-dsp/precr_ob_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/precr_sra_qh_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/precr_sra_r_qh_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_ob_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_ph_w.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_pw_l.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_qb_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_qh_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_rs_ph_w.c create mode 100644 tests/tcg/mips/mips64-dsp/precrq_rs_qh_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/precrqu_s_ob_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/precrqu_s_qb_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/prependd.c create mode 100644 tests/tcg/mips/mips64-dsp/prependw.c create mode 100644 tests/tcg/mips/mips64-dsp/printf.c create mode 100644 tests/tcg/mips/mips64-dsp/raddu_l_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/raddu_w_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/rddsp.c create mode 100644 tests/tcg/mips/mips64-dsp/repl_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/repl_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/repl_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/repl_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/repl_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/replv_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/replv_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/replv_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/replv_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/shilo.c create mode 100644 tests/tcg/mips/mips64-dsp/shilov.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_s_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_s_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_s_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shll_s_w.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_s_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_s_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_s_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shllv_s_w.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_r_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_r_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_r_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_r_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shra_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_r_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_r_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_r_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shrav_r_w.c create mode 100644 tests/tcg/mips/mips64-dsp/shrl_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shrl_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/shrl_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/shrlv_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/shrlv_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/shrlv_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_s_ph.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_s_pw.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_s_qh.c create mode 100644 tests/tcg/mips/mips64-dsp/subq_s_w.c create mode 100644 tests/tcg/mips/mips64-dsp/subu_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/subu_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/subu_s_ob.c create mode 100644 tests/tcg/mips/mips64-dsp/subu_s_qb.c create mode 100644 tests/tcg/mips/mips64-dsp/wrdsp.c create mode 100644 tests/tcg/mips/mips64-dspr2/.directory create mode 100644 tests/tcg/mips/mips64-dspr2/Makefile create mode 100644 tests/tcg/mips/mips64-dspr2/absq_s_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/addqh_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/addqh_r_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/addqh_r_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/addqh_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/addu_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/addu_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/addu_s_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/addu_s_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/adduh_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/adduh_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/adduh_r_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/adduh_r_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/append.c create mode 100644 tests/tcg/mips/mips64-dspr2/balign.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_eq_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_eq_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_le_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_le_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_lt_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/cmpgdu_lt_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/dbalign.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpa_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpa_w_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpaqx_s_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpaqx_sa_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpax_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dps_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dps_w_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpsqx_s_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpsqx_sa_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/dpsx_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/head.S create mode 100644 tests/tcg/mips/mips64-dspr2/io.h create mode 100644 tests/tcg/mips/mips64-dspr2/mips_boot.lds create mode 100644 tests/tcg/mips/mips64-dspr2/mul_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/mul_s_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/muleq_s_w_phl.c create mode 100644 tests/tcg/mips/mips64-dspr2/mulq_rs_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/mulq_s_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/mulq_s_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/mulsa_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/mulsaq_s_w_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/precr_qb_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/precr_sra_ph_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/precr_sra_r_ph_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/prepend.c create mode 100644 tests/tcg/mips/mips64-dspr2/printf.c create mode 100644 tests/tcg/mips/mips64-dspr2/shra_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/shra_r_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrav_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrav_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrav_r_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrav_r_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrl_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/shrlv_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/subqh_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/subqh_r_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/subqh_r_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/subqh_w.c create mode 100644 tests/tcg/mips/mips64-dspr2/subu_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/subu_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/subu_s_ph.c create mode 100644 tests/tcg/mips/mips64-dspr2/subu_s_qh.c create mode 100644 tests/tcg/mips/mips64-dspr2/subuh_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/subuh_qb.c create mode 100644 tests/tcg/mips/mips64-dspr2/subuh_r_ob.c create mode 100644 tests/tcg/mips/mips64-dspr2/subuh_r_qb.c
tests/tcg/mips/mips32-dsp/Makefile new file +135 -0
@@ -0,0 +1,135 @@ +-include ../../config-host.mak + +CROSS=mips64el-unknown-linux-gnu- + +SIM=qemu-mipsel +SIM_FLAGS=-cpu 74Kf + +CC = $(CROSS)gcc +CFLAGS = -mabi=32 -march=mips32r2 -mgp32 -mdsp -static + +TESTCASES = absq_s_ph.tst +TESTCASES += absq_s_w.tst +TESTCASES += addq_ph.tst +TESTCASES += addq_s_ph.tst +TESTCASES += addsc.tst +TESTCASES += addu_qb.tst +TESTCASES += addu_s_qb.tst +TESTCASES += addwc.tst +TESTCASES += bitrev.tst +TESTCASES += bposge32.tst +TESTCASES += cmp_eq_ph.tst +TESTCASES += cmpgu_eq_qb.tst +TESTCASES += cmpgu_le_qb.tst +TESTCASES += cmpgu_lt_qb.tst +TESTCASES += cmp_le_ph.tst +TESTCASES += cmp_lt_ph.tst +TESTCASES += cmpu_eq_qb.tst +TESTCASES += cmpu_le_qb.tst +TESTCASES += cmpu_lt_qb.tst +TESTCASES += dpaq_sa_l_w.tst +TESTCASES += dpaq_s_w_ph.tst +TESTCASES += dpau_h_qbl.tst +TESTCASES += dpau_h_qbr.tst +TESTCASES += dpsq_sa_l_w.tst +TESTCASES += dpsq_s_w_ph.tst +TESTCASES += dpsu_h_qbl.tst +TESTCASES += dpsu_h_qbr.tst +TESTCASES += extp.tst +TESTCASES += extpdp.tst +TESTCASES += extpdpv.tst +TESTCASES += extpv.tst +TESTCASES += extr_rs_w.tst +TESTCASES += extr_r_w.tst +TESTCASES += extr_s_h.tst +TESTCASES += extrv_rs_w.tst +TESTCASES += extrv_r_w.tst +TESTCASES += extrv_s_h.tst +TESTCASES += extrv_w.tst +TESTCASES += extr_w.tst +TESTCASES += insv.tst +TESTCASES += lbux.tst +TESTCASES += lhx.tst +TESTCASES += lwx.tst +TESTCASES += madd.tst +TESTCASES += maddu.tst +TESTCASES += maq_sa_w_phl.tst +TESTCASES += maq_sa_w_phr.tst +TESTCASES += maq_s_w_phl.tst +TESTCASES += maq_s_w_phr.tst +TESTCASES += mfhi.tst +TESTCASES += mflo.tst +TESTCASES += modsub.tst +TESTCASES += msub.tst +TESTCASES += msubu.tst +TESTCASES += mthi.tst +TESTCASES += mthlip.tst +TESTCASES += mtlo.tst +TESTCASES += muleq_s_w_phl.tst +TESTCASES += muleq_s_w_phr.tst +TESTCASES += muleu_s_ph_qbl.tst +TESTCASES += muleu_s_ph_qbr.tst +TESTCASES += mulq_rs_ph.tst +TESTCASES += mult.tst +TESTCASES += multu.tst +TESTCASES += packrl_ph.tst +TESTCASES += pick_ph.tst +TESTCASES += pick_qb.tst +TESTCASES += precequ_ph_qbla.tst +TESTCASES += precequ_ph_qbl.tst +TESTCASES += precequ_ph_qbra.tst +TESTCASES += precequ_ph_qbr.tst +TESTCASES += preceq_w_phl.tst +TESTCASES += preceq_w_phr.tst +TESTCASES += preceu_ph_qbla.tst +TESTCASES += preceu_ph_qbl.tst +TESTCASES += preceu_ph_qbra.tst +TESTCASES += preceu_ph_qbr.tst +TESTCASES += precrq_ph_w.tst +TESTCASES += precrq_qb_ph.tst +TESTCASES += precrq_rs_ph_w.tst +TESTCASES += precrqu_s_qb_ph.tst +TESTCASES += raddu_w_qb.tst +TESTCASES += rddsp.tst +TESTCASES += repl_ph.tst +TESTCASES += repl_qb.tst +TESTCASES += replv_ph.tst +TESTCASES += replv_qb.tst +TESTCASES += shilo.tst +TESTCASES += shilov.tst +TESTCASES += shll_ph.tst +TESTCASES += shll_qb.tst +TESTCASES += shll_s_ph.tst +TESTCASES += shll_s_w.tst +TESTCASES += shllv_ph.tst +TESTCASES += shllv_qb.tst +TESTCASES += shllv_s_ph.tst +TESTCASES += shllv_s_w.tst +TESTCASES += shra_ph.tst +TESTCASES += shra_r_ph.tst +TESTCASES += shra_r_w.tst +TESTCASES += shrav_ph.tst +TESTCASES += shrav_r_ph.tst +TESTCASES += shrav_r_w.tst +TESTCASES += shrl_qb.tst +TESTCASES += shrlv_qb.tst +TESTCASES += subq_ph.tst +TESTCASES += subq_s_ph.tst +TESTCASES += subq_s_w.tst +TESTCASES += subu_qb.tst +TESTCASES += subu_s_qb.tst +TESTCASES += wrdsp.tst + +all: $(TESTCASES) + +%.tst: %.c + $(CC) $(CFLAGS) $< -o $@ + +check: $(TESTCASES) + @for case in $(TESTCASES); do \ + echo $(SIM) $(SIM_FLAGS) ./$$case;\ + $(SIM) $(SIM_FLAGS) ./$$case; \ + done + +clean: + $(RM) -rf $(TESTCASES)
tests/tcg/mips/mips32-dsp/absq_s_ph.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + + +int main () +{ +int rd, rt; +int result; + + rt =0x10017EFD ; + result =0x10017EFD ; + + __asm + ("absq_s.ph %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + + rt =0x8000A536 ; + result =0x7FFF5ACA ; + + __asm + ("absq_s.ph %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/absq_s_w.c new file +37 -0
@@ -0,0 +1,37 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x80000000 ; + result =0x7FFFFFFF ; + __asm + ("absq_s.w %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + + rt =0x80030000 ; + result =0x7FFD0000 ; + __asm + ("absq_s.w %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + + rt =0x31036080 ; + result =0x31036080 ; + __asm + ("absq_s.w %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addq_ph.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0xFFFFFFFF ; + rt =0x10101010 ; + result =0x100F100F ; + __asm + ("addq.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + + rs =0x3712847D ; + rt =0x0031AF2D ; + result =0x374333AA ; + __asm + ("addq.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addq_s_ph.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0xFFFFFFFF ; + rt =0x10101010 ; + result =0x100F100F ; + __asm + ("addq_s.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + + rs =0x3712847D ; + rt =0x0031AF2D ; + result =0x37438000 ; + __asm + ("addq_s.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addsc.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x0000000F ; + rt =0x00000001 ; + result =0x00000010 ; + __asm + ("addsc %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + + rs =0xFFFF0FFF ; + rt =0x00010111 ; + result =0x00001110 ; + __asm + ("addsc %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addu_qb.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x00FF00FF ; + rt =0x00010001 ; + result =0x00000000 ; + __asm + ("addu.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + + rs =0xFFFF1111 ; + rt =0x00020001 ; + result =0xFF011112 ; + __asm + ("addu.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addu_s_qb.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x10FF01FF ; + rt =0x10010001 ; + result =0x20FF01FF ; + __asm + ("addu_s.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + + rs =0xFFFF1111 ; + rt =0x00020001 ; + result =0xFFFF1112 ; + __asm + ("addu_s.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/addwc.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x10FF01FF ; + rt =0x10010001 ; + result =0x21000200 ; + __asm + ("addwc %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + + rs =0xFFFF1111 ; + rt =0x00020001 ; + result =0x00011112 ; + __asm + ("addwc %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/bitrev.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x12345678 ; + result =0x00001E6A ; + + __asm + ("bitrev %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/bposge32.c new file +44 -0
44 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/cmp_eq_ph.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA33FF ; + result =0x00 ; + __asm + ("cmp.eq.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x03 ; + __asm + ("cmp.eq.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmp_le_ph.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA33FF ; + result =0x02 ; + __asm + ("cmp.le.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x03 ; + __asm + ("cmp.le.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmp_lt_ph.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA33FF ; + result =0x02 ; + __asm + ("cmp.lt.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x00 ; + __asm + ("cmp.lt.ph %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + rd = (rd >>24 ) &0x03 ; +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpgu_eq_qb.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x02 ; + __asm + ("cmpgu.eq.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + +assert (rd == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x0F ; + __asm + ("cmpgu.eq.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpgu_le_qb.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x0F ; + __asm + ("cmpgu.le.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + +assert (rd == result); + + rs =0x11777066 ; + rt =0x11766066 ; + result =0x09 ; + __asm + ("cmpgu.le.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpgu_lt_qb.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x0D ; + __asm + ("cmpgu.lt.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); + +assert (rd == result); + + rs =0x11777066 ; + rt =0x11766066 ; + result =0x00 ; + __asm + ("cmpgu.lt.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpu_eq_qb.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int dsp; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x02 ; + __asm + ("cmpu.eq.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x0F ; + __asm + ("cmpu.eq.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpu_le_qb.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int dsp; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x0F ; + __asm + ("cmpu.le.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x0F ; + __asm + ("cmpu.le.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/cmpu_lt_qb.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int dsp; +int result; + + rs =0x11777066 ; + rt =0x55AA70FF ; + result =0x0D ; + __asm + ("cmpu.lt.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + + rs =0x11777066 ; + rt =0x11777066 ; + result =0x00 ; + __asm + ("cmpu.lt.qb %1, %2\n\t" +"rddsp %0\n\t" + :"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>24 ) &0x0F ; +assert (dsp == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpaq_s_w_ph.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt, dsp; +int ach =0 , acl =0 ; +int resulth, resultl, resultdsp; + + rs =0x800000FF ; + rt =0x80000002 ; + resulth =0x00 ; + resultl =0x800003FB ; + resultdsp =0x01 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpaq_s.w.ph $ac1, %3, %4\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" +"rddsp %2\n\t" + :"+r" (ach),"+r" (acl),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = dsp >>17 &0x01 ; +assert (dsp == resultdsp); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpaq_sa_l_w.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt, dsp; +int ach =0 , acl =0 ; +int resulth, resultl, resultdsp; + + rs =0x800000FF ; + rt =0x80000002 ; + resulth =0x7FFFFFFF ; + resultl =0xFFFFFFFF ; + resultdsp =0x01 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %0, $ac1\n\t" +"dpaq_sa.l.w $ac1, %3, %4\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" +"rddsp %2\n\t" + :"+r" (ach),"+r" (acl),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>17 ) &0x01 ; +assert (dsp == resultdsp); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpau_h_qbl.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int ach =5 , acl =3 ; +int resulth, resultl; + + rs =0x800000FF ; + rt =0x80000002 ; + resulth =0x05 ; + resultl =0x4003 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpau.h.qbl $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpau_h_qbr.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int ach =5 , acl =3 ; +int resulth, resultl; + + rs =0x800000FF ; + rt =0x80000002 ; + resulth =0x05 ; + resultl =0x0201 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpau.h.qbr $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpsq_s_w_ph.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int ach =5 , acl =5 ; +int resulth, resultl; + + rs =0xBC0123AD ; + rt =0x01643721 ; + resulth =0x04 ; + resultl =0xEE9794A3 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpsq_s.w.ph $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpsq_sa_l_w.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt, dsp; +int ach =5 , acl =5 ; +int resulth, resultl, resultdsp; + + rs =0xBC0123AD ; + rt =0x01643721 ; + resulth =0x7FFFFFFF ; + resultl =0xFFFFFFFF ; + resultdsp =0x01 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpsq_sa.l.w $ac1, %3, %4\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" +"rddsp %2\n\t" + :"+r" (ach),"+r" (acl),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>17 ) &0x01 ; +assert (dsp == resultdsp); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpsu_h_qbl.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int ach =5 , acl =5 ; +int resulth, resultl; + + rs =0xBC0123AD ; + rt =0x01643721 ; + resulth =0x04 ; + resultl =0xFFFFFEE5 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpsu.h.qbl $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/dpsu_h_qbr.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt; +int ach =5 , acl =5 ; +int resulth, resultl; + + rs =0xBC0123AD ; + rt =0x01643721 ; + resulth =0x04 ; + resultl =0xFFFFE233 ; + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"dpsu.h.qbr $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extp.c new file +44 -0
44 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/extpdp.c new file +46 -0
46 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/extpdpv.c new file +47 -0
47 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/extpv.c new file +45 -0
45 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/extr_r_w.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + result =0xA0001699 ; + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"extr_r.w %0, $ac1, 0x03\n\t" +"rddsp %1\n\t" + :"=r" (rt),"=r" (dsp) + :"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extr_rs_w.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + result =0x7FFFFFFF ; + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"extr_rs.w %0, $ac1, 0x03\n\t" +"rddsp %1\n\t" + :"=r" (rt),"=r" (dsp) + :"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extr_s_h.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + result =0x00007FFF ; + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"extr_s.h %0, $ac1, 0x03\n\t" +"rddsp %1\n\t" + :"=r" (rt),"=r" (dsp) + :"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extr_w.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + result =0xA0001699 ; + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"extr.w %0, $ac1, 0x03\n\t" +"rddsp %1\n\t" + :"=r" (rt),"=r" (dsp) + :"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extrv_r_w.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + dsp =0x07 ; + rs =0x03 ; + result =0xA0001699 ; + + __asm + ("wrdsp %1, 0x01\n\t" +"mthi %3, $ac1\n\t" +"mtlo %4, $ac1\n\t" +"extrv_r.w %0, $ac1, %2\n\t" +"rddsp %1\n\t" + :"=r" (rt),"+r" (dsp) + :"r" (rs),"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extrv_rs_w.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + dsp =0x07 ; + rs =0x03 ; + result =0x7FFFFFFF ; + + __asm + ("wrdsp %1, 0x01\n\t" +"mthi %3, $ac1\n\t" +"mtlo %4, $ac1\n\t" +"extrv_rs.w %0, $ac1, %2\n\t" +"rddsp %1\n\t" + :"=r" (rt),"+r" (dsp) + :"r" (rs),"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extrv_s_h.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + dsp =0x07 ; + rs =0x03 ; + result =0x00007FFF ; + + __asm + ("wrdsp %1, 0x01\n\t" +"mthi %3, $ac1\n\t" +"mtlo %4, $ac1\n\t" +"extrv_s.h %0, $ac1, %2\n\t" +"rddsp %1\n\t" + :"=r" (rt),"+r" (dsp) + :"r" (rs),"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/extrv_w.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs, ach, acl, dsp; +int result; + + ach =0x05 ; + acl =0xB4CB ; + dsp =0x07 ; + rs =0x03 ; + result =0xA0001699 ; + + __asm + ("wrdsp %1, 0x01\n\t" +"mthi %3, $ac1\n\t" +"mtlo %4, $ac1\n\t" +"extrv.w %0, $ac1, %2\n\t" +"rddsp %1\n\t" + :"=r" (rt),"+r" (dsp) + :"r" (rs),"r" (ach),"r" (acl) + ); + dsp = (dsp >>23 ) &0x01 ; +assert (dsp ==1 ); +assert (result == rt); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/insv.c new file +23 -0
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs, dsp; +int result; + +/* msb = 10, lsb = 5 */ + dsp =0x305 ; + rt =0x12345678 ; + rs =0x87654321 ; + result =0x12345338 ; + __asm + ("wrdsp %2, 0x03\n\t" +"insv %0, %1\n\t" + :"+r" (rt) + :"r" (rs),"r" (dsp) + ); +assert (rt == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/lbux.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main (void ) +{ +int value, rd; +int *p; +unsigned long addr, index; +int result; + + value =0xBCDEF389 ; + p = &value; + addr = (unsigned long )p; + index =0 ; + result = value &0xFF ; + __asm + ("lbux %0, %1(%2)\n\t" + :"=r" (rd) + :"r" (index),"r" (addr) + ); + +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/lhx.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main (void ) +{ +int value, rd; +int *p; +unsigned long addr, index; +int result; + + value =0xBCDEF389 ; + p = &value; + addr = (unsigned long )p; + index =0 ; + result =0xFFFFF389 ; + __asm + ("lhx %0, %1(%2)\n\t" + :"=r" (rd) + :"r" (index),"r" (addr) + ); + +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/lwx.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main (void ) +{ +int value, rd; +int *p; +unsigned long addr, index; +int result; + + value =0xBCDEF389 ; + p = &value; + addr = (unsigned long )p; + index =0 ; + result =0xBCDEF389 ; + __asm + ("lwx %0, %1(%2)\n\t" + :"=r" (rd) + :"r" (index),"r" (addr) + ); + +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/madd.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0x01 ; + rt =0x01 ; + resulth =0x05 ; + resultl =0xB4CC ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"madd $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/maddu.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0x01 ; + rt =0x01 ; + resulth =0x05 ; + resultl =0xB4CC ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"madd $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/main.c new file +6 -0
@@ -0,0 +1,6 @@ +#include <stdio.h> + +int main () +{ +printf ("hello world\n" ); +}
tests/tcg/mips/mips32-dsp/maq_s_w_phl.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0xFF060000 ; + rt =0xCB000000 ; + resulth =0x04 ; + resultl =0x947438CB ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"maq_s.w.phl $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/maq_s_w_phr.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0xFF06 ; + rt =0xCB00 ; + resulth =0x04 ; + resultl =0x947438CB ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"maq_s.w.phr $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/maq_sa_w_phl.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0xFF060000 ; + rt =0xCB000000 ; + resulth =0x00 ; + resultl =0x7FFFFFFF ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"maq_sa.w.phl $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/maq_sa_w_phr.c new file +31 -0
@@ -0,0 +1,31 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rt, rs; +int achi, acli; +int acho, aclo; +int resulth, resultl; + + achi =0x05 ; + acli =0xB4CB ; + rs =0xFF06 ; + rt =0xCB00 ; + resulth =0x00 ; + resultl =0x7FFFFFFF ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"maq_sa.w.phr $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (resulth == acho); +assert (resultl == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mfhi.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int achi, acho; +int result; + + achi =0x004433 ; + result =0x004433 ; + + __asm + ("mthi %1, $ac1\n\t" +"mfhi %0, $ac1\n\t" + :"=r" (acho) + :"r" (achi) + ); +assert (result == acho); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mflo.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int acli, aclo; +int result; + + acli =0x004433 ; + result =0x004433 ; + + __asm + ("mthi %1, $ac1\n\t" +"mfhi %0, $ac1\n\t" + :"=r" (aclo) + :"r" (acli) + ); +assert (result == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/modsub.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0xFFFFFFFF ; + rt =0x000000FF ; + result =0xFFFFFF00 ; + __asm + ("modsub %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + + rs =0x00000000 ; + rt =0x00CD1FFF ; + result =0x0000CD1F ; + __asm + ("modsub %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/msub.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int achi, acli, rs, rt; +int acho, aclo; +int resulth, resultl; + + rs =0x00BBAACC ; + rt =0x0B1C3D2F ; + achi =0x00004433 ; + acli =0xFFCC0011 ; + resulth =0xFFF81F29 ; + resultl =0xB355089D ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"msub $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (acho == resulth); +assert (aclo == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/msubu.c new file +30 -0
@@ -0,0 +1,30 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int achi, acli, rs, rt; +int acho, aclo; +int resulth, resultl; + + rs =0x00BBAACC ; + rt =0x0B1C3D2F ; + achi =0x00004433 ; + acli =0xFFCC0011 ; + resulth =0xFFF81F29 ; + resultl =0xB355089D ; + + __asm + ("mthi %2, $ac1\n\t" +"mtlo %3, $ac1\n\t" +"msubu $ac1, %4, %5\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (acho),"=r" (aclo) + :"r" (achi),"r" (acli),"r" (rs),"r" (rt) + ); +assert (acho == resulth); +assert (aclo == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mthi.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int achi, acho; +int result; + + achi =0x004433 ; + result =0x004433 ; + + __asm + ("mthi %1, $ac1\n\t" +"mfhi %0, $ac1\n\t" + :"=r" (acho) + :"r" (achi) + ); +assert (result == acho); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mthlip.c new file +34 -0
@@ -0,0 +1,34 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, ach, acl, dsp; +int result, resulth, resultl; + + dsp =0x07 ; + ach =0x05 ; + acl =0xB4CB ; + rs =0x00FFBBAA ; + resulth =0xB4CB ; + resultl =0x00FFBBAA ; + result =0x27 ; + + __asm + ("wrdsp %0, 0x01\n\t" +"mthi %1, $ac1\n\t" +"mtlo %2, $ac1\n\t" +"mthlip %3, $ac1\n\t" +"mfhi %1, $ac1\n\t" +"mflo %2, $ac1\n\t" +"rddsp %0\n\t" + :"+r" (dsp),"+r" (ach),"+r" (acl) + :"r" (rs) + ); + dsp = dsp &0x3F ; +assert (dsp == result); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mtlo.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int acli, aclo; +int result; + + acli =0x004433 ; + result =0x004433 ; + + __asm + ("mthi %1, $ac1\n\t" +"mfhi %0, $ac1\n\t" + :"=r" (aclo) + :"r" (acli) + ); +assert (result == aclo); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/muleq_s_w_phl.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/muleq_s_w_phr.c new file +40 -0
@@ -0,0 +1,40 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x8000 ; + rt =0x8000 ; + result =0x7FFFFFFF ; + resultdsp =1 ; + + __asm + ("muleq_s.w.phr %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>21 ) &0x01 ; +assert (rd == result); +assert (dsp == resultdsp); + + rs =0x1234 ; + rt =0x4321 ; + result =0x98be968 ; + resultdsp =1 ; + + __asm + ("muleq_s.w.phr %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>21 ) &0x01 ; +assert (rd == result); +assert (dsp == resultdsp); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/muleu_s_ph_qbl.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x80001234 ; + rt =0x80004321 ; + result =0xFFFF0000 ; + resultdsp =1 ; + + __asm + ("muleu_s.ph.qbl %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>21 ) &0x01 ; +assert (rd == result); +assert (dsp == resultdsp); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/muleu_s_ph_qbr.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x8000 ; + rt =0x80004321 ; + result =0xFFFF0000 ; + resultdsp =1 ; + + __asm + ("muleu_s.ph.qbr %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>21 ) &0x01 ; +assert (rd == result); +assert (dsp == resultdsp); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mulq_rs_ph.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x80001234 ; + rt =0x80004321 ; + result =0x7FFF098C ; + resultdsp =1 ; + + __asm + ("mulq_rs.ph %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rs),"r" (rt) + ); + dsp = (dsp >>21 ) &0x01 ; +assert (rd == result); +assert (dsp == resultdsp); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/mult.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt, ach, acl; +int result, resulth, resultl; + + rs =0x00FFBBAA ; + rt =0x4B231000 ; + resulth =0x4b0f01 ; + resultl =0x71f8a000 ; + __asm + ("mult $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (ach),"=r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/multu.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, rt, ach, acl; +int result, resulth, resultl; + + rs =0x00FFBBAA ; + rt =0x4B231000 ; + resulth =0x4b0f01 ; + resultl =0x71f8a000 ; + __asm + ("mult $ac1, %2, %3\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"=r" (ach),"=r" (acl) + :"r" (rs),"r" (rt) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/packrl_ph.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + result =0x56788765 ; + + __asm + ("packrl.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/pick_ph.c new file +23 -0
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + dsp =0x0A000000 ; + result =0x12344321 ; + + __asm + ("wrdsp %3, 0x10\n\t" +"pick.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt),"r" (dsp) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/pick_qb.c new file +23 -0
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + dsp =0x0A000000 ; + result =0x12655621 ; + + __asm + ("wrdsp %3, 0x10\n\t" +"pick.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt),"r" (dsp) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceq_w_phl.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x87650000 ; + + __asm + ("preceq.w.phl %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceq_w_phr.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x43210000 ; + + __asm + ("preceq.w.phr %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precequ_ph_qbl.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x43803280 ; + + __asm + ("precequ.ph.qbl %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precequ_ph_qbla.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x43802180 ; + + __asm + ("precequ.ph.qbla %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precequ_ph_qbr.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x21801080 ; + + __asm + ("precequ.ph.qbr %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precequ_ph_qbra.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x32801080 ; + + __asm + ("precequ.ph.qbra %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceu_ph_qbl.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x00870065 ; + + __asm + ("preceu.ph.qbl %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceu_ph_qbla.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x00870043 ; + + __asm + ("preceu.ph.qbla %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceu_ph_qbr.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x00430021 ; + + __asm + ("preceu.ph.qbr %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/preceu_ph_qbra.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0x00650021 ; + + __asm + ("preceu.ph.qbra %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precrq_ph_w.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + result =0x12348765 ; + + __asm + ("precrq.ph.w %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precrq_qb_ph.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + result =0x12568743 ; + + __asm + ("precrq.qb.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precrq_rs_ph_w.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + result =0x12348765 ; + + __asm + ("precrq_rs.ph.w %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/precrqu_s_qb_ph.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x12345678 ; + rt =0x87654321 ; + result =0x24AC0086 ; + + __asm + ("precrqu_s.qb.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rs),"r" (rt) + ); +assert (result == rd); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/raddu_w_qb.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs; +int result; + + rs =0x12345678 ; + result =0x114 ; + + __asm + ("raddu.w.qb %0, %1\n\t" + :"=r" (rd) + :"r" (rs) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/rddsp.c new file +54 -0
54 lines not on this page · raw message
tests/tcg/mips/mips32-dsp/repl_ph.c new file +23 -0
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, result; + + result =0x01BF01BF ; + __asm + ("repl.ph %0, 0x1BF\n\t" + :"=r" (rd) + ); +assert (rd == result); + + result =0x01FF01FF ; + __asm + ("repl.ph %0, 0x01FF\n\t" + :"=r" (rd) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/repl_qb.c new file +16 -0
@@ -0,0 +1,16 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, result; + + result =0xBFBFBFBF ; + __asm + ("repl.qb %0, 0xBF\n\t" + :"=r" (rd) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/replv_ph.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x12345678 ; + result =0x56785678 ; + __asm + ("replv.ph %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/replv_qb.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x12345678 ; + result =0x78787878 ; + __asm + ("replv.qb %0, %1\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shilo.c new file +27 -0
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int ach, acl; +int resulth, resultl; + + ach =0xBBAACCFF ; + acl =0x1C3B001D ; + + resulth =0x17755 ; + resultl =0x99fe3876 ; + + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"shilo $ac1, 0x0F\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shilov.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rs, ach, acl; +int resulth, resultl; + + rs =0x0F ; + ach =0xBBAACCFF ; + acl =0x1C3B001D ; + + resulth =0x17755 ; + resultl =0x99fe3876 ; + + __asm + ("mthi %0, $ac1\n\t" +"mtlo %1, $ac1\n\t" +"shilov $ac1, %2\n\t" +"mfhi %0, $ac1\n\t" +"mflo %1, $ac1\n\t" + :"+r" (ach),"+r" (acl) + :"r" (rs) + ); +assert (ach == resulth); +assert (acl == resultl); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shll_ph.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt, dsp; +int result, resultdsp; + + rt =0x12345678 ; + result =0xA000C000 ; + resultdsp =1 ; + + __asm + ("shll.ph %0, %2, 0x0B\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shll_qb.c new file +23 -0
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt, dsp; +int result, resultdsp; + + rt =0x87654321 ; + result =0x38281808 ; + resultdsp =0x01 ; + + __asm + ("shll.qb %0, %2, 0x03\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shll_s_ph.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt, dsp; +int result, resultdsp; + + rt =0x12345678 ; + result =0x7FFF7FFF ; + resultdsp =0x01 ; + + __asm + ("shll_s.ph %0, %2, 0x0B\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shll_s_w.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt, dsp; +int result, resultdsp; + + rt =0x12345678 ; + result =0x7FFFFFFF ; + resultdsp =0x01 ; + + __asm + ("shll_s.w %0, %2, 0x0B\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shllv_ph.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x0B ; + rt =0x12345678 ; + result =0xA000C000 ; + resultdsp =1 ; + + __asm + ("shllv.ph %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt),"r" (rs) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shllv_qb.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x03 ; + rt =0x87654321 ; + result =0x38281808 ; + resultdsp =0x01 ; + + __asm + ("shllv.qb %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt),"r" (rs) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shllv_s_ph.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x0B ; + rt =0x12345678 ; + result =0x7FFF7FFF ; + resultdsp =0x01 ; + + __asm + ("shllv_s.ph %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt),"r" (rs) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shllv_s_w.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp; +int result, resultdsp; + + rs =0x0B ; + rt =0x12345678 ; + result =0x7FFFFFFF ; + resultdsp =0x01 ; + + __asm + ("shllv_s.w %0, %2, %3\n\t" +"rddsp %1\n\t" + :"=r" (rd),"=r" (dsp) + :"r" (rt),"r" (rs) + ); + dsp = (dsp >>22 ) &0x01 ; +assert (dsp == resultdsp); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shra_ph.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0xF0EC0864 ; + + __asm + ("shra.ph %0, %1, 0x03\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shra_r_ph.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0xF0ED0864 ; + + __asm + ("shra_r.ph %0, %1, 0x03\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shra_r_w.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x87654321 ; + result =0xF0ECA864 ; + + __asm + ("shra_r.w %0, %1, 0x03\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shrav_ph.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x03 ; + rt =0x87654321 ; + result =0xF0EC0864 ; + + __asm + ("shrav.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rt),"r" (rs) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shrav_r_ph.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x03 ; + rt =0x87654321 ; + result =0xF0ED0864 ; + + __asm + ("shrav_r.ph %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rt),"r" (rs) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shrav_r_w.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x03 ; + rt =0x87654321 ; + result =0xF0ECA864 ; + + __asm + ("shrav_r.w %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rt),"r" (rs) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shrl_qb.c new file +20 -0
@@ -0,0 +1,20 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rt; +int result; + + rt =0x12345678 ; + result =0x00010203 ; + + __asm + ("shrl.qb %0, %1, 0x05\n\t" + :"=r" (rd) + :"r" (rt) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/shrlv_qb.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt; +int result; + + rs =0x05 ; + rt =0x12345678 ; + result =0x00010203 ; + + __asm + ("shrlv.qb %0, %1, %2\n\t" + :"=r" (rd) + :"r" (rt),"r" (rs) + ); +assert (rd == result); + +return 0 ; +}
tests/tcg/mips/mips32-dsp/subq_ph.c new file +25 -0
@@ -0,0 +1,25 @@ +#include <stdio.h> +#include <assert.h> + +int main () +{ +int rd, rs, rt, dsp;
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dsp/subq_s_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dsp/subq_s_w.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dsp/subu_qb.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dsp/subu_s_qb.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dsp/wrdsp.c new file +54 -0
54 lines not on this page · raw message
tests/tcg/mips/mips32-dspr2/Makefile new file +72 -0
72 lines not on this page · raw message
tests/tcg/mips/mips32-dspr2/absq_s_qb.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addqh_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addqh_r_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addqh_r_w.c new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addqh_w.c new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addu_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/addu_s_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/adduh_qb.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/adduh_r_qb.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/append.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/balign.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/cmpgdu_eq_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/cmpgdu_le_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/cmpgdu_lt_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpa_w_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpaqx_s_w_ph.c new file +57 -0
57 lines not on this page · raw message
tests/tcg/mips/mips32-dspr2/dpaqx_sa_w_ph.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpax_w_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dps_w_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpsqx_s_w_ph.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpsqx_sa_w_ph.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/dpsx_w_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mul_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mul_s_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/muleq_s_w_phl.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mulq_rs_w.c new file +36 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mulq_s_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mulq_s_w.c new file +36 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mulsa_w_ph.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/mulsaq_s_w_ph.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/precr_qb_ph.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/precr_sra_ph_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/precr_sra_r_ph_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/prepend.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shra_qb.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shra_r_qb.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shrav_qb.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shrav_r_qb.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shrl_ph.c new file +20 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/shrlv_ph.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subqh_ph.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subqh_r_ph.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subqh_r_w.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subqh_w.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subu_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subu_s_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subuh_qb.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips32-dspr2/subuh_r_qb.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/Makefile new file +305 -0
305 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/absq_s_ob.c new file +63 -0
63 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/absq_s_ph.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/absq_s_pw.c new file +66 -0
66 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/absq_s_qh.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/absq_s_w.c new file +48 -0
48 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/addq_ph.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addq_pw.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addq_qh.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addq_s_ph.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addq_s_pw.c new file +45 -0
45 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/addq_s_qh.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addsc.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addu_ob.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addu_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addu_s_ob.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addu_s_qb.c new file +38 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/addwc.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/bitrev.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/bposge32.c new file +50 -0
50 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/bposge64.c new file +50 -0
50 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/cmp_eq_ph.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/cmp_eq_pw.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_eq_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_le_ph.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_le_pw.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_le_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_lt_ph.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/cmp_lt_pw.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmp_lt_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_eq_ob.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_eq_qb.c new file +38 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_le_ob.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_le_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_lt_ob.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpgu_lt_qb.c new file +38 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpu_eq_ob.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpu_eq_qb.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/cmpu_le_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpu_le_qb.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/cmpu_lt_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/cmpu_lt_qb.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dappend.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextp.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextpdp.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextpdpv.c new file +38 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextpv.c new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_l.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_r_l.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_r_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_rs_l.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_rs_w.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_s_h.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextr_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_l.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_r_l.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_r_w.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_rs_l.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_rs_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_s_h.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dextrv_w.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dinsv.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dmadd.c new file +57 -0
57 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dmaddu.c new file +56 -0
56 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dmsub.c new file +59 -0
59 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dmsubu.c new file +59 -0
59 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dmthlip.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpaq_s_w_ph.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpaq_s_w_qh.c new file +57 -0
57 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dpaq_sa_l_pw.c new file +62 -0
62 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dpaq_sa_l_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpau_h_obl.c new file +59 -0
59 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dpau_h_obr.c new file +59 -0
59 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/dpau_h_qbl.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpau_h_qbr.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsq_s_w_ph.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsq_s_w_qh.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsq_sa_l_pw.c new file +39 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsq_sa_l_w.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsu_h_obl.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsu_h_obr.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsu_h_qbl.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dpsu_h_qbr.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dshilo.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/dshilov.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extp.c new file +50 -0
50 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/extpdp.c new file +51 -0
51 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/extpdpv.c new file +52 -0
52 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/extpv.c new file +51 -0
51 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/extr_r_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extr_rs_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extr_s_h.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extr_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extrv_r_w.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extrv_rs_w.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extrv_s_h.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/extrv_w.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/head.S new file +16 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/insv.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/io.h new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/lbux.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/ldx.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/lhx.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/lwx.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/madd.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maddu.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maq_s_l_pwl.c new file +56 -0
56 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_s_l_pwr.c new file +56 -0
56 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_s_w_phl.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maq_s_w_phr.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maq_s_w_qhll.c new file +62 -0
62 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_s_w_qhlr.c new file +62 -0
62 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_s_w_qhrl.c new file +63 -0
63 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_s_w_qhrr.c new file +63 -0
63 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_sa_w_phl.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maq_sa_w_phr.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/maq_sa_w_qhll.c new file +62 -0
62 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_sa_w_qhlr.c new file +64 -0
64 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_sa_w_qhrl.c new file +64 -0
64 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/maq_sa_w_qhrr.c new file +64 -0
64 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/mfhi.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mflo.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mips_boot.lds new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/modsub.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/msub.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/msubu.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mthi.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mthlip.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mtlo.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/muleq_s_pw_qhl.c new file +55 -0
55 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/muleq_s_pw_qhr.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/muleq_s_w_phl.c new file +46 -0
46 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/muleq_s_w_phr.c new file +45 -0
45 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/muleu_s_ph_qbl.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/muleu_s_ph_qbr.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/muleu_s_qh_obl.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/muleu_s_qh_obr.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mulq_rs_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mulq_rs_qh.c new file +33 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/mulsaq_s_l_pw.c new file +59 -0
59 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/mulsaq_s_w_qh.c new file +57 -0
57 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/mult.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/multu.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/packrl_ph.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/packrl_pw.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/pick_ob.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/pick_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/pick_pw.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/pick_qb.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/pick_qh.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_l_pwl.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_l_pwr.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_pw_qhl.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_pw_qhla.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_pw_qhr.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_pw_qhra.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_w_phl.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceq_w_phr.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_ph_qbl.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_ph_qbla.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_ph_qbr.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_ph_qbra.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_qh_obl.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_qh_obla.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_qh_obr.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precequ_qh_obra.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_ph_qbl.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_ph_qbla.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_ph_qbr.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_ph_qbra.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_qh_obl.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_qh_obla.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_qh_obr.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/preceu_qh_obra.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precr_ob_qh.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precr_sra_qh_pw.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precr_sra_r_qh_pw.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_ob_qh.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_ph_w.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_pw_l.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_qb_ph.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_qh_pw.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_rs_ph_w.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrq_rs_qh_pw.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrqu_s_ob_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/precrqu_s_qb_ph.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/prependd.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/prependw.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/printf.c new file +266 -0
266 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/raddu_l_ob.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/raddu_w_qb.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/rddsp.c new file +53 -0
53 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/repl_ob.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/repl_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/repl_pw.c new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/repl_qb.c new file +19 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/repl_qh.c new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/replv_ob.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/replv_ph.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/replv_pw.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/replv_qb.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shilo.c new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shilov.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_pw.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_qb.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_qh.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_s_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_s_pw.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_s_qh.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shll_s_w.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_ob.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_pw.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_qb.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_s_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_s_pw.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_s_qh.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shllv_s_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_ob.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_pw.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_qh.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_r_ob.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_r_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_r_pw.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_r_qh.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shra_r_w.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_ph.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_pw.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_qh.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_r_ph.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_r_pw.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_r_qh.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrav_r_w.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrl_ob.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrl_qb.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrl_qh.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrlv_ob.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrlv_qb.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/shrlv_qh.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subq_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subq_pw.c new file +44 -0
44 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/subq_qh.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subq_s_ph.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subq_s_pw.c new file +45 -0
45 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/subq_s_qh.c new file +44 -0
44 lines not on this page · raw message
tests/tcg/mips/mips64-dsp/subq_s_w.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subu_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subu_qb.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subu_s_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/subu_s_qb.c new file +27 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dsp/wrdsp.c new file +48 -0
48 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/.directory new file +2 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/Makefile new file +117 -0
117 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/absq_s_qb.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/addqh_ph.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addqh_r_ph.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addqh_r_w.c new file +38 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addqh_w.c new file +39 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addu_ph.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addu_qh.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/addu_s_ph.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/addu_s_qh.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/adduh_ob.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/adduh_qb.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/adduh_r_ob.c new file +21 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/adduh_r_qb.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/append.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/balign.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/cmpgdu_eq_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/cmpgdu_eq_qb.c new file +41 -0
41 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/cmpgdu_le_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/cmpgdu_le_qb.c new file +48 -0
48 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/cmpgdu_lt_ob.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/cmpgdu_lt_qb.c new file +48 -0
48 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/dbalign.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dpa_w_ph.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dpa_w_qh.c new file +56 -0
56 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/dpaqx_s_w_ph.c new file +74 -0
74 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/dpaqx_sa_w_ph.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/dpax_w_ph.c new file +32 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dps_w_ph.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dps_w_qh.c new file +55 -0
55 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/dpsqx_s_w_ph.c new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dpsqx_sa_w_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/dpsx_w_ph.c new file +28 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/head.S new file +16 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/io.h new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mips_boot.lds new file +31 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mul_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mul_s_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/muleq_s_w_phl.c new file +42 -0
42 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/mulq_rs_w.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mulq_s_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mulq_s_w.c new file +40 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mulsa_w_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/mulsaq_s_w_ph.c new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/precr_qb_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/precr_sra_ph_w.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/precr_sra_r_ph_w.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/prepend.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/printf.c new file +266 -0
266 lines not on this page · raw message
tests/tcg/mips/mips64-dspr2/shra_qb.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shra_r_qb.c new file +35 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrav_ob.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrav_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrav_r_ob.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrav_r_qb.c new file +37 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrl_ph.c new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/shrlv_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subqh_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subqh_r_ph.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subqh_r_w.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subqh_w.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subu_ph.c new file +26 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subu_qh.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subu_s_ph.c new file +25 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subu_s_qh.c new file +24 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subuh_ob.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subuh_qb.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subuh_r_ob.c new file +23 -0
Lines of this file are not shown. View the raw message.
tests/tcg/mips/mips64-dspr2/subuh_r_qb.c new file +23 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.2 (Apple Git-33)
Part of the diff is not shown here. View the raw message.