summaryrefslogtreecommitdiffstats
path: root/tcg/ppc64/tcg-target.c
diff options
context:
space:
mode:
authorRichard Henderson2013-07-31 06:26:04 +0200
committerRichard Henderson2013-09-25 16:46:32 +0200
commitf8b84129073d600cef20d526814b9bdd15c2e1ba (patch)
tree9a5b2f9a47ac5131f4a7adc632eb91e91a47d370 /tcg/ppc64/tcg-target.c
parenttcg-ppc64: Use tcg_out64 (diff)
downloadqemu-f8b84129073d600cef20d526814b9bdd15c2e1ba.tar.gz
qemu-f8b84129073d600cef20d526814b9bdd15c2e1ba.tar.xz
qemu-f8b84129073d600cef20d526814b9bdd15c2e1ba.zip
tcg-ppc64: Avoid code for nop move
While these are rare from code that's been through the optimizer, it's not uncommon within the tcg backend. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/ppc64/tcg-target.c')
-rw-r--r--tcg/ppc64/tcg-target.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index 27a955ba2a..357f8c11de 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -509,7 +509,9 @@ static const uint32_t tcg_to_isel[] = {
static inline void tcg_out_mov(TCGContext *s, TCGType type,
TCGReg ret, TCGReg arg)
{
- tcg_out32(s, OR | SAB(arg, ret, arg));
+ if (ret != arg) {
+ tcg_out32(s, OR | SAB(arg, ret, arg));
+ }
}
static inline void tcg_out_rld(TCGContext *s, int op, TCGReg ra, TCGReg rs,