dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0019-tcg-optimize-simplify-or-xor-r-a-0-cases.patch

5544c1
From f69f9bd1a7a095ee153eea5422651780aef178b0 Mon Sep 17 00:00:00 2001
5544c1
From: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Date: Thu, 6 Sep 2012 16:47:14 +0200
5544c1
Subject: [PATCH] tcg/optimize: simplify or/xor r, a, 0 cases
5544c1
5544c1
or/xor r, a, 0 is equivalent to a mov r, a.
5544c1
5544c1
Reviewed-by: Richard Henderson <rth@twiddle.net>
5544c1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 tcg/optimize.c | 2 ++
5544c1
 1 file changed, 2 insertions(+)
5544c1
5544c1
diff --git a/tcg/optimize.c b/tcg/optimize.c
5544c1
index 63f970d..0db849e 100644
5544c1
--- a/tcg/optimize.c
5544c1
+++ b/tcg/optimize.c
5544c1
@@ -331,6 +331,8 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
5544c1
         CASE_OP_32_64(sar):
5544c1
         CASE_OP_32_64(rotl):
5544c1
         CASE_OP_32_64(rotr):
5544c1
+        CASE_OP_32_64(or):
5544c1
+        CASE_OP_32_64(xor):
5544c1
             if (temps[args[1]].state == TCG_TEMP_CONST) {
5544c1
                 /* Proceed with possible constant folding. */
5544c1
                 break;
5544c1
-- 
5544c1
1.7.12.1
5544c1