diff mbox

[RFC,6/6] target-i386: Cleanup pextrq

Message ID 1323521895-26693-7-git-send-email-andreas.faerber@web.de
State New
Headers show

Commit Message

Andreas Färber Dec. 10, 2011, 12:58 p.m. UTC
gen_op_mov_reg_v() wants a TCGv, so use cpu_T[0] like pextrd does.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 target-i386/translate.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/target-i386/translate.c b/target-i386/translate.c
index 6d09496..5ce8d3e 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -3842,14 +3842,15 @@  static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
                                             (s->mem_index >> 2) - 1);
                     } else { /* pextrq */
 #ifdef TARGET_X86_64
-                        tcg_gen_ld_i64(cpu_tmp1_i64, cpu_env,
-                                        offsetof(CPUX86State,
-                                                xmm_regs[reg].XMM_Q(val & 1)));
-                        if (mod == 3)
-                            gen_op_mov_reg_v(ot, rm, cpu_tmp1_i64);
-                        else
-                            tcg_gen_qemu_st64(cpu_tmp1_i64, cpu_A0,
-                                            (s->mem_index >> 2) - 1);
+                        tcg_gen_ld_tl(cpu_T[0], cpu_env,
+                                      offsetof(CPUX86State,
+                                               xmm_regs[reg].XMM_Q(val & 1)));
+                        if (mod == 3) {
+                            gen_op_mov_reg_v(ot, rm, cpu_T[0]);
+                        } else {
+                            tcg_gen_qemu_st64_tl(cpu_T[0], cpu_A0,
+                                                 (s->mem_index >> 2) - 1);
+                        }
 #else
                         goto illegal_op;
 #endif