提交 3707cd62 编写于 作者: T Tom Musta 提交者: Alexander Graf

target-ppc: Use Additional Temporary in stqcx Case

Per Alex Graf's suggestion, the recently added case to gen_conditional_store
for stqcx should use an additional temporary when accessing the second
doubleword.  This avoids the mutation of the EA argument to the function,
which is counter intuitive.
Signed-off-by: NTom Musta <tommusta@gmail.com>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 7dff9abe
...@@ -3333,7 +3333,7 @@ static void gen_conditional_store(DisasContext *ctx, TCGv EA, ...@@ -3333,7 +3333,7 @@ static void gen_conditional_store(DisasContext *ctx, TCGv EA,
gen_qemu_st16(ctx, cpu_gpr[reg], EA); gen_qemu_st16(ctx, cpu_gpr[reg], EA);
#if defined(TARGET_PPC64) #if defined(TARGET_PPC64)
} else if (size == 16) { } else if (size == 16) {
TCGv gpr1, gpr2; TCGv gpr1, gpr2 , EA8;
if (unlikely(ctx->le_mode)) { if (unlikely(ctx->le_mode)) {
gpr1 = cpu_gpr[reg+1]; gpr1 = cpu_gpr[reg+1];
gpr2 = cpu_gpr[reg]; gpr2 = cpu_gpr[reg];
...@@ -3342,8 +3342,10 @@ static void gen_conditional_store(DisasContext *ctx, TCGv EA, ...@@ -3342,8 +3342,10 @@ static void gen_conditional_store(DisasContext *ctx, TCGv EA,
gpr2 = cpu_gpr[reg+1]; gpr2 = cpu_gpr[reg+1];
} }
gen_qemu_st64(ctx, gpr1, EA); gen_qemu_st64(ctx, gpr1, EA);
gen_addr_add(ctx, EA, EA, 8); EA8 = tcg_temp_local_new();
gen_qemu_st64(ctx, gpr2, EA); gen_addr_add(ctx, EA8, EA, 8);
gen_qemu_st64(ctx, gpr2, EA8);
tcg_temp_free(EA8);
#endif #endif
} else { } else {
gen_qemu_st8(ctx, cpu_gpr[reg], EA); gen_qemu_st8(ctx, cpu_gpr[reg], EA);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册