{"id":811227,"url":"http://patchwork.ozlabs.org/api/1.2/patches/811227/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-9-richard.henderson@linaro.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170907224051.21518-9-richard.henderson@linaro.org>","list_archive_url":null,"date":"2017-09-07T22:40:36","name":"[PULL,08/23] tcg/s390: Use constant pool for andi","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c05aa4f0bea8f16f7b2610f56471000652507230","submitter":{"id":72104,"url":"http://patchwork.ozlabs.org/api/1.2/people/72104/?format=json","name":"Richard Henderson","email":"richard.henderson@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-9-richard.henderson@linaro.org/mbox/","series":[{"id":2073,"url":"http://patchwork.ozlabs.org/api/1.2/series/2073/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2073","date":"2017-09-07T22:40:28","name":"[PULL,01/23] tcg: Move USE_DIRECT_JUMP discriminator to tcg/cpu/tcg-target.h","version":1,"mbox":"http://patchwork.ozlabs.org/series/2073/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811227/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811227/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"jBYkufR6\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpFvs06q0z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 08:47:37 +1000 (AEST)","from localhost ([::1]:42539 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dq5aB-0008C4-4A\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 18:47:35 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:52075)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Tz-00032B-NE\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:16 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Tu-00088V-TC\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:11 -0400","from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:32922)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1dq5Tu-00087n-NS\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:06 -0400","by mail-pf0-x229.google.com with SMTP id y29so859862pff.0\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 15:41:06 -0700 (PDT)","from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net.\n\t[97.126.108.236]) by smtp.gmail.com with ESMTPSA id\n\th19sm770678pfh.142.2017.09.07.15.41.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 07 Sep 2017 15:41:04 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=rGbRrj0jmlEL38dOoU7mQ92x2mbFZxz0QiK0pcfEGz0=;\n\tb=jBYkufR60avJ+5wm8Zgr7Asm/1ifTFL8S73nIP2HAcABj0mGwEr4oaICgFlhMAcEq4\n\teCY22ysDa02W7FPM5j4cey4Wp4nS8PT8T5gEVT59Xs+K2mCPFRiivpNmVJNpxYzFeMZ9\n\tr8tf13lItEqzVZBOAgW7ZsJ9iOz3/ls61rkbU=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=rGbRrj0jmlEL38dOoU7mQ92x2mbFZxz0QiK0pcfEGz0=;\n\tb=kz0CZloXi/iOs5DsREi84gnoDNJELGBH8w0+WzWuo1bo37/X50Cj2bPOrvhkigPvQC\n\tEDynH7ON1F+PtbS3XmDEfZmqOwrzXYJCVhGDpB0KjPWuQd/IIzTnoIw4J0Zo1GVsEZyU\n\tTiRYxzeMx0k7yr/prYI6NCP3kRwPZOFFdSbNaA9OFVEKQMOofXYesekjaFf5QypyrHU7\n\tM1+VD77sBrdpsrG/FzyQv4e2txiUyGnvrSqQxm1/Bo3i0QwOGQSBW84Np/Lb5HRRcWd4\n\tCOkqtViRAiRQUmk5VthZASBrps+SqGHlzbdWOSI8Bo9m0RMqt9QUzImGxu6qL6c5MueB\n\tcJlA==","X-Gm-Message-State":"AHPjjUgVBxDUHRh3A06jTpWWahyquiIGupWi1WFU8D1hgu5OPyy53+r9\n\tYb4ITuAFhX3dZX1rKExKuA==","X-Google-Smtp-Source":"ADKCNb6F7621rB8eAoZKsClcOtWl13/2AUhAvW1V1aSKadjC8ed4lXDBBmovcFZJtxUfaqmJIepk9w==","X-Received":"by 10.99.130.198 with SMTP id w189mr918235pgd.175.1504824065457; \n\tThu, 07 Sep 2017 15:41:05 -0700 (PDT)","From":"Richard Henderson <richard.henderson@linaro.org>","To":"qemu-devel@nongnu.org","Date":"Thu,  7 Sep 2017 15:40:36 -0700","Message-Id":"<20170907224051.21518-9-richard.henderson@linaro.org>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170907224051.21518-1-richard.henderson@linaro.org>","References":"<20170907224051.21518-1-richard.henderson@linaro.org>","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c00::229","Subject":"[Qemu-devel] [PULL 08/23] tcg/s390: Use constant pool for andi","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"peter.maydell@linaro.org, Richard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: Richard Henderson <rth@twiddle.net>\n\nSigned-off-by: Richard Henderson <rth@twiddle.net>\n---\n tcg/s390/tcg-target.inc.c | 20 ++++++++++++++------\n 1 file changed, 14 insertions(+), 6 deletions(-)","diff":"diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c\nindex 29b77ff67f..4be57c5765 100644\n--- a/tcg/s390/tcg-target.inc.c\n+++ b/tcg/s390/tcg-target.inc.c\n@@ -224,6 +224,7 @@ typedef enum S390Opcode {\n     RXY_LRVG    = 0xe30f,\n     RXY_LRVH    = 0xe31f,\n     RXY_LY      = 0xe358,\n+    RXY_NG      = 0xe380,\n     RXY_STCY    = 0xe372,\n     RXY_STG     = 0xe324,\n     RXY_STHY    = 0xe370,\n@@ -985,8 +986,17 @@ static void tgen_andi(TCGContext *s, TCGType type, TCGReg dest, uint64_t val)\n         return;\n     }\n \n-    /* Fall back to loading the constant.  */\n-    tcg_out_movi(s, type, TCG_TMP0, val);\n+    /* Use the constant pool if USE_REG_TB, but not for small constants.  */\n+    if (USE_REG_TB) {\n+        if (!maybe_out_small_movi(s, type, TCG_TMP0, val)) {\n+            tcg_out_insn(s, RXY, NG, dest, TCG_REG_TB, TCG_REG_NONE, 0);\n+            new_pool_label(s, val & valid, R_390_20, s->code_ptr - 2,\n+                           -(intptr_t)s->code_gen_ptr);\n+            return;\n+        }\n+    } else {\n+        tcg_out_movi(s, type, TCG_TMP0, val);\n+    }\n     if (type == TCG_TYPE_I32) {\n         tcg_out_insn(s, RR, NR, dest, TCG_TMP0);\n     } else {\n@@ -2341,6 +2351,8 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op)\n         return &r_r_ri;\n     case INDEX_op_sub_i32:\n     case INDEX_op_sub_i64:\n+    case INDEX_op_and_i32:\n+    case INDEX_op_and_i64:\n         return (s390_facilities & FACILITY_DISTINCT_OPS ? &r_r_ri : &r_0_ri);\n \n     case INDEX_op_mul_i32:\n@@ -2375,10 +2387,6 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op)\n                 ? (s390_facilities & FACILITY_DISTINCT_OPS ? &r_r_rM : &r_0_rM)\n                 : &r_0_r);\n \n-    case INDEX_op_and_i32:\n-    case INDEX_op_and_i64:\n-        return (s390_facilities & FACILITY_DISTINCT_OPS ? &r_r_ri : &r_0_ri);\n-\n     case INDEX_op_shl_i32:\n     case INDEX_op_shr_i32:\n     case INDEX_op_sar_i32:\n","prefixes":["PULL","08/23"]}