diff options
author | Richard Henderson <rth@twiddle.net> | 2013-02-19 23:52:03 -0800 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2013-02-23 17:25:29 +0000 |
commit | 962415fcd5f8223a6fbc6f7bb8c5fdf2500f2f84 (patch) | |
tree | 2e87691b27555e8ceab0e0fa7dc6249467013f6a /target-alpha | |
parent | f1fae40c61fd4558c7d10992c98b4bb47f99e0ed (diff) |
target-alpha: Use mulu2 for umulh insn
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-alpha')
-rw-r--r-- | target-alpha/helper.h | 1 | ||||
-rw-r--r-- | target-alpha/int_helper.c | 7 | ||||
-rw-r--r-- | target-alpha/translate.c | 20 |
3 files changed, 18 insertions, 10 deletions
diff --git a/target-alpha/helper.h b/target-alpha/helper.h index eac3041b87..3321fde916 100644 --- a/target-alpha/helper.h +++ b/target-alpha/helper.h @@ -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) diff --git a/target-alpha/int_helper.c b/target-alpha/int_helper.c index c9b42b6ed4..51ccd41bd2 100644 --- a/target-alpha/int_helper.c +++ b/target-alpha/int_helper.c @@ -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); diff --git a/target-alpha/translate.c b/target-alpha/translate.c index f687b95c63..f8f76957a9 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -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 */ |