summaryrefslogtreecommitdiffstats
path: root/tcg/ppc
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-08-28 15:51:08 -0700
committerRichard Henderson <rth@twiddle.net>2013-09-25 07:46:31 -0700
commit4b2b114d8cc0f0f59bc20855bf287fb3df55b553 (patch)
tree1778fb65055f43c0c0dbf633c0d494ed00b14c35 /tcg/ppc
parent619f90ba62e27c674b1a9af8c0ae68eef8d64a92 (diff)
downloadhqemu-4b2b114d8cc0f0f59bc20855bf287fb3df55b553.zip
hqemu-4b2b114d8cc0f0f59bc20855bf287fb3df55b553.tar.gz
tcg-ppc: 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/ppc')
-rw-r--r--tcg/ppc/tcg-target.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 24a8621..965108b 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -450,7 +450,9 @@ static const uint32_t tcg_to_bc[] = {
static 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 void tcg_out_movi(TCGContext *s, TCGType type,
OpenPOWER on IntegriCloud