mirror of https://gitee.com/openkylin/qemu.git
target-alpha: Use mulu2 for umulh insn
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
f1fae40c61
commit
962415fcd5
|
@ -9,7 +9,6 @@ DEF_HELPER_FLAGS_3(subqv, TCG_CALL_NO_WG, i64, env, i64, i64)
|
|||
DEF_HELPER_FLAGS_3(sublv, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_3(mullv, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_3(mulqv, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||
DEF_HELPER_FLAGS_2(umulh, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
||||
|
||||
DEF_HELPER_FLAGS_1(ctpop, TCG_CALL_NO_RWG_SE, i64, i64)
|
||||
DEF_HELPER_FLAGS_1(ctlz, TCG_CALL_NO_RWG_SE, i64, i64)
|
||||
|
|
|
@ -22,13 +22,6 @@
|
|||
#include "qemu/host-utils.h"
|
||||
|
||||
|
||||
uint64_t helper_umulh(uint64_t op1, uint64_t op2)
|
||||
{
|
||||
uint64_t tl, th;
|
||||
mulu64(&tl, &th, op1, op2);
|
||||
return th;
|
||||
}
|
||||
|
||||
uint64_t helper_ctpop(uint64_t arg)
|
||||
{
|
||||
return ctpop64(arg);
|
||||
|
|
|
@ -1390,7 +1390,6 @@ static inline void glue(gen_, name)(int ra, int rb, int rc, int islit,\
|
|||
tcg_temp_free(tmp1); \
|
||||
} \
|
||||
}
|
||||
ARITH3(umulh)
|
||||
ARITH3(cmpbge)
|
||||
ARITH3(minub8)
|
||||
ARITH3(minsb8)
|
||||
|
@ -2426,7 +2425,24 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
|
|||
break;
|
||||
case 0x30:
|
||||
/* UMULH */
|
||||
gen_umulh(ra, rb, rc, islit, lit);
|
||||
{
|
||||
TCGv low;
|
||||
if (unlikely(rc == 31)){
|
||||
break;
|
||||
}
|
||||
if (ra == 31) {
|
||||
tcg_gen_movi_i64(cpu_ir[rc], 0);
|
||||
break;
|
||||
}
|
||||
low = tcg_temp_new();
|
||||
if (islit) {
|
||||
tcg_gen_movi_tl(low, lit);
|
||||
tcg_gen_mulu2_i64(low, cpu_ir[rc], cpu_ir[ra], low);
|
||||
} else {
|
||||
tcg_gen_mulu2_i64(low, cpu_ir[rc], cpu_ir[ra], cpu_ir[rb]);
|
||||
}
|
||||
tcg_temp_free(low);
|
||||
}
|
||||
break;
|
||||
case 0x40:
|
||||
/* MULL/V */
|
||||
|
|
Loading…
Reference in New Issue