From nobody Thu Oct 2 10:20:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1545772475893189.27673820631196; Tue, 25 Dec 2018 13:14:35 -0800 (PST) Received: from localhost ([127.0.0.1]:43176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbu26-0001zm-AG for importer@patchew.org; Tue, 25 Dec 2018 16:14:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbtnW-0007ed-0v for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbtnV-0001P9-6i for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:29 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:42169) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbtnV-0001OX-13 for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:59:29 -0500 Received: by mail-pf1-x434.google.com with SMTP id 64so7071864pfr.9 for ; Tue, 25 Dec 2018 12:59:28 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Dec 2018 12:59:27 -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=Q2OD/0jwdXN0qVQ970iuhIvtXWNMm2381UTggUlPz1c=; b=NitUfoW3/NDV6bwkLcIY1rlR85NFCkD5pHm3UezfG+uinWWfgT99i8wgx6FcQYN4Vp EzDEpf11OdTSipFC9JG2PLq4B9Zx7LEPhyGUzLdDRjJBfB1CawVgz/rEZutmnKS2Nv4d NdWvjsJXss1wiWmgbPbURfR5rUU+7K75A4ve0= 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=Q2OD/0jwdXN0qVQ970iuhIvtXWNMm2381UTggUlPz1c=; b=McZ3jwk2pqfXwyuvXWx2IDXZ7fnp984VcFmgMG1oio9jo2L3YHp9AcLNzL2jM+QS/E /JeTWZ+VrO6E92a3X2W0fvL6WAwMyLrhb6yMhsTx6kt0I4mkkFLF6I/aW8nGRTBXOk18 PGqhap3q53fMDl8EZkszIKoilMcYDCrdmLLE9JPG9YT6GsOHl/sLRksA/ro2DW6MpQ8U VEf9dQ1/0JJ1S6mfKi707/tU8QO5z7KL0mQGd3ACCqq0/cAo1bDmi6ArGLNW5DiZl85N 686MgcWr/bTvZ+6E2YaaP/QBf4r4rjIoBMnzMPZYQ0qY5Mto6CTj7Ag0F/iBzd7RVycj T/nA== X-Gm-Message-State: AJcUukdEmjAqhTt57UUa77C2+JNv6NHBJeogSH/3mwEmPVqB9zbmzZ41 xBvraIOiX9daucSlTMeTs2FuCbHvdts= X-Google-Smtp-Source: ALg8bN4cRUwHBjb8tLcaNwxfsBkvw/UQ3porwCa+I3FcBtVfD41LrONLsDRu6QVMcHBKDPfBEAlW0A== X-Received: by 2002:a63:b543:: with SMTP id u3mr16524609pgo.420.1545771567788; Tue, 25 Dec 2018 12:59:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Dec 2018 07:55:19 +1100 Message-Id: <20181225205529.10874-33-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::434 Subject: [Qemu-devel] [PULL 32/42] tcg: Add preferred_reg argument to temp_sync 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Pass this through to tcg_reg_alloc. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 351d302a68..fe060c481a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2865,8 +2865,8 @@ static inline void temp_dead(TCGContext *s, TCGTemp *= ts) registers needs to be allocated to store a constant. If 'free_or_dead' is non-zero, subsequently release the temporary; if it is positive, the temp is dead; if it is negative, the temp is free. */ -static void temp_sync(TCGContext *s, TCGTemp *ts, - TCGRegSet allocated_regs, int free_or_dead) +static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs, + TCGRegSet preferred_regs, int free_or_dead) { if (ts->fixed_reg) { return; @@ -2886,7 +2886,7 @@ static void temp_sync(TCGContext *s, TCGTemp *ts, break; } temp_load(s, ts, tcg_target_available_regs[ts->type], - allocated_regs, 0); + allocated_regs, preferred_regs); /* fallthrough */ =20 case TEMP_VAL_REG: @@ -2913,7 +2913,7 @@ static void tcg_reg_free(TCGContext *s, TCGReg reg, T= CGRegSet allocated_regs) { TCGTemp *ts =3D s->reg_to_temp[reg]; if (ts !=3D NULL) { - temp_sync(s, ts, allocated_regs, -1); + temp_sync(s, ts, allocated_regs, 0, -1); } } =20 @@ -3093,7 +3093,7 @@ static void tcg_reg_alloc_do_movi(TCGContext *s, TCGT= emp *ots, ots->val =3D val; ots->mem_coherent =3D 0; if (NEED_SYNC_ARG(0)) { - temp_sync(s, ots, s->reserved_regs, IS_DEAD_ARG(0)); + temp_sync(s, ots, s->reserved_regs, 0, IS_DEAD_ARG(0)); } else if (IS_DEAD_ARG(0)) { temp_dead(s, ots); } @@ -3176,7 +3176,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TC= GOp *op) ots->mem_coherent =3D 0; s->reg_to_temp[ots->reg] =3D ots; if (NEED_SYNC_ARG(0)) { - temp_sync(s, ots, allocated_regs, 0); + temp_sync(s, ots, allocated_regs, 0, 0); } } } @@ -3346,7 +3346,7 @@ static void tcg_reg_alloc_op(TCGContext *s, const TCG= Op *op) tcg_out_mov(s, ts->type, ts->reg, reg); } if (NEED_SYNC_ARG(i)) { - temp_sync(s, ts, o_allocated_regs, IS_DEAD_ARG(i)); + temp_sync(s, ts, o_allocated_regs, 0, IS_DEAD_ARG(i)); } else if (IS_DEAD_ARG(i)) { temp_dead(s, ts); } @@ -3480,7 +3480,7 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *= op) ts->mem_coherent =3D 0; s->reg_to_temp[reg] =3D ts; if (NEED_SYNC_ARG(i)) { - temp_sync(s, ts, allocated_regs, IS_DEAD_ARG(i)); + temp_sync(s, ts, allocated_regs, 0, IS_DEAD_ARG(i)); } else if (IS_DEAD_ARG(i)) { temp_dead(s, ts); } --=20 2.17.2