From patchwork Wed Nov 28 05:38:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 152186 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp688485ljp; Tue, 27 Nov 2018 21:42:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/XP3uXFopc3FX5ujSUCOku2lpknpnkwxSJTOVHM8IWw/sjptIbvWKcrbajFZxHlGT+WUMM9 X-Received: by 2002:a25:6ec1:: with SMTP id j184-v6mr34770780ybc.400.1543383753140; Tue, 27 Nov 2018 21:42:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543383753; cv=none; d=google.com; s=arc-20160816; b=zaL/USrltlVAGuhn5vEJOrwuJMFiGVdbbRhpYN0gQkIRotbWTZ4mRxQZFBq/BSIiqj Puttc2gtSuGg5eXi+W0a4pIoafUE8D0QigJN4bAdNwHhluicmyBsQmdPpbZhQNCMMTa1 +z+0zloPm7sIqku74u7m/cv33mFIZLeQ/oBJv1sZFyFglOBECYIRuf1WN4dpEVipMQWW MnsJMpCE/9CvdpEUwNPAbTOyhJ3ibaiMCIN1S+lD9Prr1AMWKKTNyX3jDj3qm6f+xeqn uK1apTGW/ylHWDXvpctL2uMaPelRjqVEgy27wG4XMmrUszmZuD/OZ4m9b5E6gjgun7aT vzrQ== 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=vQPcVoGV0u9SuJTOPjajxaRuT7Da+0X49o+wYRuOFhM=; b=RZwtjwKWaqy0GrDUukX3FGAg0Dt82YTRrxYZ1SZ4M045Z6ISLCxKAv1P/LgS77BLYm wv8TgYB91a9CWlTvwnQNbXgRpLB7rKqBzVnivs3v0DjZMSnXT3ofcxdZlCWVW5WXjNKP oAooRsBObA5FEEvQwTg5cvCv3qq3Cskp9UvkP2YzBQkZr2YyqgPBGFjoB15/S6mV/yem c65M/a27iPs61FZpz6Dsbh1opTFSCS+GEvGbuxOHJsogOP3mCb8khKePYtfW+EBR2yBK GfTlAdbO17fQzMC3XhRsCr84jz3MFkuhiY+7/Vz+FV2McQ1I74iUqjFC+LmPyWBNdy0i SlHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SbPOeqva; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f125si4214415ywa.280.2018.11.27.21.42.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 27 Nov 2018 21:42:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SbPOeqva; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:46045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRscK-0006jY-FS for patch@linaro.org; Wed, 28 Nov 2018 00:42:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRsYi-0003tC-GB for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRsYg-0004LL-GJ for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:48 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:39023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRsYd-0004JT-9b for qemu-devel@nongnu.org; Wed, 28 Nov 2018 00:38:44 -0500 Received: by mail-pl1-x642.google.com with SMTP id 101so10531006pld.6 for ; Tue, 27 Nov 2018 21:38:42 -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=vQPcVoGV0u9SuJTOPjajxaRuT7Da+0X49o+wYRuOFhM=; b=SbPOeqvao72aUCPdZlSLY+iRN25Mf00mRqdXuqxMmVDqJXQBf3XwKTkcoV5FdE+4co O+WcNOAHACrJHl6xk9eLmtMzT5d0A/YBsiOOuQoSp3XoI7+bwJtsbJ6tRxIEEH1Uns6L JKoWS7INtOdPL4CASpqggc1B6BBxdwYKDlurs= 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=vQPcVoGV0u9SuJTOPjajxaRuT7Da+0X49o+wYRuOFhM=; b=bSC5FJV/oDavgYiJ+wHDjvvGJIKKVUisOsp7YzWviWwxd3Xoxex7bpTI2J30U9lo0k rCPobyOMYJW0LswfM/lmzqAy6TXwkQ4X6s9dw2QHbasKn9wEVZmmsDPQSJHDNR4nf/fj gzZcXMvYrlSJbCUZSGFVYGzoNv6KzxJpU6+/crNFp1oUQX+Y8ZuvnE0jUE9+o7+MKr0F Ff8PsieOXht2JHTTCZqwUtRPU3TuWYJ/qxfjQgFa8JKOYgY2y68bqnlmaOcxtUWrZ1Cw 1GEwHttCQ+SCEreX4gojD02NKJjXBw9rS3ShXbYd3aM+hoPPZ3YI58EHXB7SBRDfWuM/ GGtA== X-Gm-Message-State: AA+aEWZisNsu7r79MicGRPoixu82xiNk9ylDnpOIzzKYEki2ZPg501/3 Ied2Msi/aWjnxYKot0R9wDkIE+bdYiU= X-Received: by 2002:a17:902:bf49:: with SMTP id u9mr35168848pls.4.1543383521392; Tue, 27 Nov 2018 21:38:41 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-170-180.tukw.qwest.net. [97.113.170.180]) by smtp.gmail.com with ESMTPSA id 19sm8569336pfs.108.2018.11.27.21.38.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 21:38:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 21:38:26 -0800 Message-Id: <20181128053834.10861-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181128053834.10861-1-richard.henderson@linaro.org> References: <20181128053834.10861-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::642 Subject: [Qemu-devel] [PATCH 04/12] 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: cota@braap.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Pass this through to temp_sync. 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 509e5974bd..c83ca238aa 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -3099,7 +3099,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. */ @@ -3115,7 +3116,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); } @@ -3126,7 +3127,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) @@ -3150,7 +3151,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; }