Commit 38d14952014790c8c7f5c098f8048be594a4385d
1 parent
60b19691
target-ppc: simplify evsplati and evsplatfi
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5803 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
16 deletions
target-ppc/translate.c
@@ -6569,16 +6569,10 @@ static always_inline void gen_evmergelohi (DisasContext *ctx) | @@ -6569,16 +6569,10 @@ static always_inline void gen_evmergelohi (DisasContext *ctx) | ||
6569 | } | 6569 | } |
6570 | static always_inline void gen_evsplati (DisasContext *ctx) | 6570 | static always_inline void gen_evsplati (DisasContext *ctx) |
6571 | { | 6571 | { |
6572 | - int32_t imm = (int32_t)(rA(ctx->opcode) << 11) >> 27; | 6572 | + uint64_t imm = ((int32_t)(rA(ctx->opcode) << 11)) >> 27; |
6573 | 6573 | ||
6574 | #if defined(TARGET_PPC64) | 6574 | #if defined(TARGET_PPC64) |
6575 | - TCGv t0 = tcg_temp_new(); | ||
6576 | - TCGv t1 = tcg_temp_new(); | ||
6577 | - tcg_gen_movi_tl(t0, imm); | ||
6578 | - tcg_gen_shri_tl(t1, t0, 32); | ||
6579 | - tcg_gen_or_tl(cpu_gpr[rD(ctx->opcode)], t0, t1); | ||
6580 | - tcg_temp_free(t0); | ||
6581 | - tcg_temp_free(t1); | 6575 | + tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm); |
6582 | #else | 6576 | #else |
6583 | tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm); | 6577 | tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm); |
6584 | tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm); | 6578 | tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm); |
@@ -6586,16 +6580,10 @@ static always_inline void gen_evsplati (DisasContext *ctx) | @@ -6586,16 +6580,10 @@ static always_inline void gen_evsplati (DisasContext *ctx) | ||
6586 | } | 6580 | } |
6587 | static always_inline void gen_evsplatfi (DisasContext *ctx) | 6581 | static always_inline void gen_evsplatfi (DisasContext *ctx) |
6588 | { | 6582 | { |
6589 | - uint32_t imm = rA(ctx->opcode) << 11; | 6583 | + uint64_t imm = rA(ctx->opcode) << 11; |
6590 | 6584 | ||
6591 | #if defined(TARGET_PPC64) | 6585 | #if defined(TARGET_PPC64) |
6592 | - TCGv t0 = tcg_temp_new(); | ||
6593 | - TCGv t1 = tcg_temp_new(); | ||
6594 | - tcg_gen_movi_tl(t0, imm); | ||
6595 | - tcg_gen_shri_tl(t1, t0, 32); | ||
6596 | - tcg_gen_or_tl(cpu_gpr[rD(ctx->opcode)], t0, t1); | ||
6597 | - tcg_temp_free(t0); | ||
6598 | - tcg_temp_free(t1); | 6586 | + tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm); |
6599 | #else | 6587 | #else |
6600 | tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm); | 6588 | tcg_gen_movi_i32(cpu_gpr[rD(ctx->opcode)], imm); |
6601 | tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm); | 6589 | tcg_gen_movi_i32(cpu_gprh[rD(ctx->opcode)], imm); |