From nobody Thu Dec 18 19:33:17 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1644545360; cv=none; d=zohomail.com; s=zohoarc; b=PGAi6sQ5s8j/oxSZXjZ32elXNg3Q5U8Bd0zMThYwXYsN/YHlaFL5PtZB2YLTw6ufWcPCK+8ehNODSxup58n+vCSsAgwJmGpgZwTS+rEReXYkPeed8BVLdDFWDKsTMpGeLQxg54oRHALBY9If6fF6hBop3k9+fHoU6ql91pTIm5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644545360; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6gT0loTTikTyP62uuClYFZJH9vRBsPpRKE1y+i3/wdg=; b=bEQtlrGGuEYbnV8tPFjOolirK35RGSRg3wap1b3AZrvIauWAVVzwtHMgUEVgCOVdtyo5IV0xpmBGPgVqOfx9NCzZaIBzGackFEVdzdJIy2KIBq6jDJahJxj0aNqfO40Wn9ftTIa+iN5U0Ux4D6oSHudLkoHWjaYrlHbN7bIyY38= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644545360770399.34257007413305; Thu, 10 Feb 2022 18:09:20 -0800 (PST) Received: from localhost ([::1]:60854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nILN9-0003Dd-Hb for importer@patchew.org; Thu, 10 Feb 2022 21:09:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIKo6-0005Sz-3Y for qemu-devel@nongnu.org; Thu, 10 Feb 2022 20:33:06 -0500 Received: from [2607:f8b0:4864:20::42d] (port=46008 helo=mail-pf1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIKnz-0007Tj-CT for qemu-devel@nongnu.org; Thu, 10 Feb 2022 20:33:05 -0500 Received: by mail-pf1-x42d.google.com with SMTP id 9so10601489pfx.12 for ; Thu, 10 Feb 2022 17:32:46 -0800 (PST) Received: from localhost.localdomain ([124.189.222.164]) by smtp.gmail.com with ESMTPSA id h5sm25738788pfi.111.2022.02.10.17.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 17:32:44 -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 :mime-version:content-transfer-encoding; bh=6gT0loTTikTyP62uuClYFZJH9vRBsPpRKE1y+i3/wdg=; b=BsuUbaQLM8NeBTan1cTZznV/P+3CR+Y6Ymphp4h+sekgf+ttt0utJncGD1VHAiCwju 6ca0xEIXcbzbcRQh7ITHGxCqq+JjyGQerHOT/4cUIdgYNwad/nvWAQ554vLGaG6DiXge U9SGICYgBrLKG4rk8t8/Vv718q6z/Rzl0KnF53OXJfqJY7eYAExsMULekSaGmfBspvyb nWpcZQ/V01VUWkZC1sDzgs22XJwH898rBWUx8w3eflUdtR3I8o4O71yIAWvxu6ESeZvh vhd0ZDp1Avz3Fmy0m93aA4OQ+TECbXBmix8S1TGDA2ucluQSkMZ9y0lVATUK/MB4j59H shew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6gT0loTTikTyP62uuClYFZJH9vRBsPpRKE1y+i3/wdg=; b=DiUXvNNv4wtclngYU+jhskodyKs/lsJ/x5Ju+Vn83ef81KlUbmv8aHOkkQTri5dawU UHXLeC+zNbdWpHqaO4eIsC4pOqDwOMMPsv5OSbw0tvpJNoohoBvPKB/l+NtxdBzKAxBW X9qVIeE09MeofFkZbusuvOpkp0D3NrbsnzfNX/YV510Zpz4UNUoEXkPAVal3GXUgBTBY pJcqhdW5dWHcSURKMplIUqBOrN5RCe6T2N+YzoVdFDBMK8h3RJQMLPQzQGc1NXGm3YBa vCs+M8/a7xF5nFkd5haOKUo13zq0fNv1Yq+tSYChgawi24BoDF3mYDCuXjDmIdy9kHYI 4AUA== X-Gm-Message-State: AOAM532XcSGLJ+SmHQCGRrKhDoNu9XGg2bSctOuOsZIN8qERxKwgkd6M Uz1YsE7MySvJ0LkXIeOXB2LFgnybM60YIVHD X-Google-Smtp-Source: ABdhPJzAW8QLKeQf/2EET0IbcrxMhrByZQWNEe1vNgIKQbjHCvHgHirdC7aA+mgAIUNV0EzF/ltQCQ== X-Received: by 2002:aa7:8c0b:: with SMTP id c11mr10255201pfd.62.1644543165187; Thu, 10 Feb 2022 17:32:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 28/34] tcg/sparc: Add scratch argument to tcg_out_movi_int Date: Fri, 11 Feb 2022 12:30:53 +1100 Message-Id: <20220211013059.17994-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211013059.17994-1-richard.henderson@linaro.org> References: <20220211013059.17994-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42d (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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: pass (identity @linaro.org) X-ZM-MESSAGEID: 1644545361774100002 Content-Type: text/plain; charset="utf-8" This will allow us to control exactly what scratch register is used for loading the constant. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index 2f7c8dcb0a..7a8f20ee9a 100644 --- a/tcg/sparc/tcg-target.c.inc +++ b/tcg/sparc/tcg-target.c.inc @@ -428,7 +428,8 @@ static void tcg_out_movi_imm32(TCGContext *s, TCGReg re= t, int32_t arg) } =20 static void tcg_out_movi_int(TCGContext *s, TCGType type, TCGReg ret, - tcg_target_long arg, bool in_prologue) + tcg_target_long arg, bool in_prologue, + TCGReg scratch) { tcg_target_long hi, lo =3D (int32_t)arg; tcg_target_long test, lsb; @@ -483,16 +484,17 @@ static void tcg_out_movi_int(TCGContext *s, TCGType t= ype, TCGReg ret, } else { hi =3D arg >> 32; tcg_out_movi_imm32(s, ret, hi); - tcg_out_movi_imm32(s, TCG_REG_T2, lo); + tcg_out_movi_imm32(s, scratch, lo); tcg_out_arithi(s, ret, ret, 32, SHIFT_SLLX); - tcg_out_arith(s, ret, ret, TCG_REG_T2, ARITH_OR); + tcg_out_arith(s, ret, ret, scratch, ARITH_OR); } } =20 static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg ret, tcg_target_long arg) { - tcg_out_movi_int(s, type, ret, arg, false); + tcg_debug_assert(ret !=3D TCG_REG_T2); + tcg_out_movi_int(s, type, ret, arg, false, TCG_REG_T2); } =20 static void tcg_out_ldst_rr(TCGContext *s, TCGReg data, TCGReg a1, @@ -847,7 +849,7 @@ static void tcg_out_call_nodelay(TCGContext *s, const t= cg_insn_unit *dest, } else { uintptr_t desti =3D (uintptr_t)dest; tcg_out_movi_int(s, TCG_TYPE_PTR, TCG_REG_T1, - desti & ~0xfff, in_prologue); + desti & ~0xfff, in_prologue, TCG_REG_O7); tcg_out_arithi(s, TCG_REG_O7, TCG_REG_T1, desti & 0xfff, JMPL); } } @@ -1023,7 +1025,8 @@ static void tcg_target_qemu_prologue(TCGContext *s) =20 #ifndef CONFIG_SOFTMMU if (guest_base !=3D 0) { - tcg_out_movi_int(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base, = true); + tcg_out_movi_int(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, + guest_base, true, TCG_REG_T1); tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG); } #endif --=20 2.25.1