提交 5793f2a4 编写于 作者: R Richard Henderson 提交者: Blue Swirl

target-sparc: Make cpu_dst local to OP=2 insns

And initialize it such that it (may) write directly to rd.
Signed-off-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 7b04bd5c
...@@ -48,7 +48,7 @@ static TCGv cpu_y; ...@@ -48,7 +48,7 @@ static TCGv cpu_y;
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY
static TCGv cpu_tbr; static TCGv cpu_tbr;
#endif #endif
static TCGv cpu_cond, cpu_dst; static TCGv cpu_cond;
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
static TCGv_i32 cpu_xcc, cpu_asi, cpu_fprs; static TCGv_i32 cpu_xcc, cpu_asi, cpu_fprs;
static TCGv cpu_gsr; static TCGv cpu_gsr;
...@@ -2511,7 +2511,6 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) ...@@ -2511,7 +2511,6 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
} }
opc = GET_FIELD(insn, 0, 1); opc = GET_FIELD(insn, 0, 1);
rd = GET_FIELD(insn, 2, 6); rd = GET_FIELD(insn, 2, 6);
switch (opc) { switch (opc) {
...@@ -2620,6 +2619,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) ...@@ -2620,6 +2619,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
case 2: /* FPU & Logical Operations */ case 2: /* FPU & Logical Operations */
{ {
unsigned int xop = GET_FIELD(insn, 7, 12); unsigned int xop = GET_FIELD(insn, 7, 12);
TCGv cpu_dst = gen_dest_gpr(dc, rd);
if (xop == 0x3a) { /* generate trap */ if (xop == 0x3a) { /* generate trap */
int cond = GET_FIELD(insn, 3, 6); int cond = GET_FIELD(insn, 3, 6);
TCGv_i32 trap; TCGv_i32 trap;
...@@ -5258,12 +5259,10 @@ static inline void gen_intermediate_code_internal(TranslationBlock * tb, ...@@ -5258,12 +5259,10 @@ static inline void gen_intermediate_code_internal(TranslationBlock * tb,
insn = cpu_ldl_code(env, dc->pc); insn = cpu_ldl_code(env, dc->pc);
cpu_tmp0 = tcg_temp_new(); cpu_tmp0 = tcg_temp_new();
cpu_dst = tcg_temp_new();
disas_sparc_insn(dc, insn); disas_sparc_insn(dc, insn);
num_insns++; num_insns++;
tcg_temp_free(cpu_dst);
tcg_temp_free(cpu_tmp0); tcg_temp_free(cpu_tmp0);
if (dc->is_br) if (dc->is_br)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册