From patchwork Tue Dec 25 20:55:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 154511 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5226820ljp; Tue, 25 Dec 2018 13:29:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN57FxNUCPFaQYFjVEHId3fXFAQYx8pDe4kTH8w8SYxQ/kNmdYeXzWWiFLPC5LfvPnAo3Izs X-Received: by 2002:a37:8f02:: with SMTP id r2mr16177688qkd.246.1545773351115; Tue, 25 Dec 2018 13:29:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545773351; cv=none; d=google.com; s=arc-20160816; b=bfXJjt/YcXbBUTwDBzZ+x8nLZv4x1vBZIQUEgeUCgDuHdrcK/wPTLFyRnXm8jXnZr4 VD2ondTzZ8DW23f9M+Zt+/Lox0iCzMXHnu2G5yhUrJX0WihaQuoH6irgqMhnbl5b9ngR QPnb1ixl5TBQWCpz07ZPqg+x9l6N1tAzk4asvXiD2UM65sAzwIK0LQY5jyu/90OzlX76 NR+scLR9FuNCNLZWDMQabhl1imhXlplZSPW0GW/p6px6G81V5rLlJWFdTlRhoJO4N+qL 4j67Y8OMLRt4D/ov1ywtqBSjIgqHwnJzoQMSaO1ohCOagIkVU0mgJMacgwOZCEuknodA xcpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=mb5rlCOOemNJYBl2hLY0FC1HtZztFvuXbqXXbgy8hxI=; b=d89sQA0pJX/zJrmt5hlLMLhXPFBbKf4F7mQ/F8GaWcx1kyAcg858szhdr83Zs1Ku8W LXtrt5Q+XERbeE//ZKWMhn+wN91LyVJUOeJD5iMoWHWjrEEqLvKiUdyQ3IebXo/yftap 9tHsNtoP/xvwUdhJT1E36v9hiYENMTW3iGiDlO3YJdxv5XFR64UIPQFgijMR95Uj6JVC 6C1nAITL7HQTo+54sM5qSl/gZQHF4lpMJTyMX41LNiqwgVEC8fq30N7NCMV13tFXlV15 z4Xkdh7qZ/THbyKP/hxeM/k3qgt8Yc6Gsk541RCtdlLi1NJ2OO7GMRwLqj+1DyPhbzVj +b2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eKpIoesK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id f42si4167041qkh.191.2018.12.25.13.29.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 25 Dec 2018 13:29:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eKpIoesK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:43379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbuGE-0002c1-Ki for patch@linaro.org; Tue, 25 Dec 2018 16:29:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbtnd-0007m2-Ap for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbtna-0001Ui-72 for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:37 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:38009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbtna-0001Tv-1U for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:34 -0500 Received: by mail-pl1-x629.google.com with SMTP id e5so6810979plb.5 for ; Tue, 25 Dec 2018 12:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mb5rlCOOemNJYBl2hLY0FC1HtZztFvuXbqXXbgy8hxI=; b=eKpIoesKQ/IMbqQoUUvU8b9BcW9qXwy0kkAjcVjs4+tP9QVJqfWDtSmuYXw671tY4w 5mEyecW3DvJKGCx5UXpy2TRPzuC9bRWomJSvuW4LJ+oITDymgy/NnmdArPVo7/GWOtfd O8jg0AdG0Iwv79nvhQ4m2srMo0bYKWatIHp4A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mb5rlCOOemNJYBl2hLY0FC1HtZztFvuXbqXXbgy8hxI=; b=GVo/emQ2Y4fW+J7WwmnRWQ9lf2aEk0vWvQuLLoXRPqF2Z8hjQloK/vINwUb98ylryI xh6wmbbvTagepdpKMazSQE9TRag+8+oJpnDGE1/1FGwEGZFQNyYKNvmrvkIHJmunzxmC GV+dY/FZ48XUV3B0rCiKkM2mimjXnpZm55hk+hXUQ/hIZgAtnRItAYicbb6mTwpi376S Xt1krdWSRU1EJn61vuEYbiGRPfZEGMPXnreMmwwHaM5u9f0LYxRmvg1hDgmtH0OTgcn2 QfOQ36xHoq731GG7cAiCWNTeOz0LpvaTwrHUAsZrU4MTeQGkoVF9jUcGQbA0UteyitDD YaKg== X-Gm-Message-State: AJcUukdY7Kw+o+CyqK4IRB2ZUdK2WV78gJjj9nkAN3RDe5P8UnWtFVg6 ANXq6YcHorrcqHLW9BVPmvRvq2rncjs= X-Received: by 2002:a17:902:584:: with SMTP id f4mr17937425plf.28.1545771572782; Tue, 25 Dec 2018 12:59:32 -0800 (PST) Received: from cloudburst.home (c211-28-135-144.sunsh3.vic.optusnet.com.au. [211.28.135.144]) by smtp.gmail.com with ESMTPSA id t21sm48501628pgg.24.2018.12.25.12.59.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Dec 2018 12:59:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Dec 2018 07:55:20 +1100 Message-Id: <20181225205529.10874-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181225205529.10874-1-richard.henderson@linaro.org> References: <20181225205529.10874-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::629 Subject: [Qemu-devel] [PULL 33/42] tcg: Add preferred_reg argument to tcg_reg_alloc_do_movi X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Pass this through to temp_sync. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.17.2 diff --git a/tcg/tcg.c b/tcg/tcg.c index fe060c481a..7844158a8a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -3077,7 +3077,8 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs) } static void tcg_reg_alloc_do_movi(TCGContext *s, TCGTemp *ots, - tcg_target_ulong val, TCGLifeData arg_life) + tcg_target_ulong val, TCGLifeData arg_life, + TCGRegSet preferred_regs) { if (ots->fixed_reg) { /* For fixed registers, we do not do any constant propagation. */ @@ -3093,7 +3094,7 @@ static void tcg_reg_alloc_do_movi(TCGContext *s, TCGTemp *ots, ots->val = val; ots->mem_coherent = 0; if (NEED_SYNC_ARG(0)) { - temp_sync(s, ots, s->reserved_regs, 0, IS_DEAD_ARG(0)); + temp_sync(s, ots, s->reserved_regs, preferred_regs, IS_DEAD_ARG(0)); } else if (IS_DEAD_ARG(0)) { temp_dead(s, ots); } @@ -3104,7 +3105,7 @@ static void tcg_reg_alloc_movi(TCGContext *s, const TCGOp *op) TCGTemp *ots = arg_temp(op->args[0]); tcg_target_ulong val = op->args[1]; - tcg_reg_alloc_do_movi(s, ots, val, op->life); + tcg_reg_alloc_do_movi(s, ots, val, op->life, 0); } static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op) @@ -3128,7 +3129,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op) if (IS_DEAD_ARG(1)) { temp_dead(s, ts); } - tcg_reg_alloc_do_movi(s, ots, val, arg_life); + tcg_reg_alloc_do_movi(s, ots, val, arg_life, 0); return; }