From nobody Tue Feb 10 12:09:36 2026 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=1629319822; cv=none; d=zohomail.com; s=zohoarc; b=V+E5bnJ9jy1s4hndBcfL8BZihI/MWci8TenKfWRgJ2HOF5CJ6upkiiX/wF9yOJ8x7nwtPnEoojbXw9qPPOHSYzu5CtzlWjzRw7T+StwSawwQ6tjUcBXu+JA80fTBpwvtvUEGAusO0cjh4o3jQoza3FIPU649SzVNGBf3Y1KuJSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629319822; h=Content-Transfer-Encoding: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=eXSlP509FPYxp/SHlpwwNwQWv2WcEvZieYKUWUJBBNw=; b=VCRQH5O62G5J4Hn+D5fMNO528ci0dPACcmunKKFJ1wfhfKRc/yhtYXXPgZgJh3+aLGe+cY1Mfev2t2V0tot03/fSXXIsmNulJ5NZNUjf/lscixtdxp3NcJhJlgBPJYoslQbnOTK2/jlD/gxiZG4YfkXrnb1MIMTHJhmrXFBvmuA= 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 1629319822106964.2671631741863; Wed, 18 Aug 2021 13:50:22 -0700 (PDT) Received: from localhost ([::1]:57688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGSVw-0000aJ-VB for importer@patchew.org; Wed, 18 Aug 2021 16:50:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGSRw-0000KV-Vo for qemu-devel@nongnu.org; Wed, 18 Aug 2021 16:46:13 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:46822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGSRv-00088C-JS for qemu-devel@nongnu.org; Wed, 18 Aug 2021 16:46:12 -0400 Received: by mail-pg1-x52c.google.com with SMTP id k14so3566127pga.13 for ; Wed, 18 Aug 2021 13:46:11 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id 143sm739815pfz.13.2021.08.18.13.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 13:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=eXSlP509FPYxp/SHlpwwNwQWv2WcEvZieYKUWUJBBNw=; b=gqk9KmG8DO9gT64dLGnYuBjsQrjR/G6QQtpWd86GXL1kWuulL9qdiprQNQA8wG6c68 gtrTIcvthD7z9x7PdabfyYoy588bPkNm34jVZqN99XF6IgjitWDTeJnymiMBT/p8WgEy ikfv+WHVzsqkCs7EEomC5QmwCv8SFJwGFS1F77z2OYLHtFHnqWNoq2orhvKoewzIXWzE yIen9A2aajRfpIzDBh/dBcUOux/PfFjFX5bmqAvVObp2S39iKmYMWLgGXEHxIyFucZEq M9vl0vjb+3dhaxq0g7bwk9QNFQ/i5FK/qzblwMMBYpWadYzqDf3Qb9pXrRiIkyJvlVwc j4aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eXSlP509FPYxp/SHlpwwNwQWv2WcEvZieYKUWUJBBNw=; b=ZpuCVsU+bE/mkaDF77UPp6/j+QZP8khxlcwiGbFW2wO8aq6DRcii1t1nxItSqxvbZZ adKw5HO3t3UjueB4fvGGQgGvceh9aLP6cd5yQ2FqxbeUXB1l5UO+1UxD6i8UWutXd3k6 7HmMYbmJ9dNlDGTaRVoWJdIG64UUClZf7SXlQus8p+SRVzUdJ6z/bJOOOd3VQYwPl8jh NXenKf5sy9KFBVNJDbZfIfgh5QkOVygPQKa/Gi5Qi+lhTEoYe9cZX0zN0i9/nfmtMQi2 DFZNwwcRSTCJ6GEphDiySeU9CeJixQ34fbO8x5Y77iHT6q2fH7pvhVv1gLw0DcfIOuPH OIfQ== X-Gm-Message-State: AOAM532FsBIRvOPZFoHxD2qI74mmrB/bdrfiNXBUdKHOGFDtWT11O4ww F8i8MnRqwcIQNT7rfzGXCV+cLEqz9NsdRA== X-Google-Smtp-Source: ABdhPJws5vu3Cf8u3FOnDK3L0XAV8E+d7v0Vn85kO0aslga2qijXhywKd8iLdbX5yEv2Yq7oq1fAQQ== X-Received: by 2002:a63:a511:: with SMTP id n17mr10620250pgf.156.1629319570355; Wed, 18 Aug 2021 13:46:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 5/7] tcg/sparc: Use the constant pool for 64-bit constants Date: Wed, 18 Aug 2021 10:46:00 -1000 Message-Id: <20210818204602.394771-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818204602.394771-1-richard.henderson@linaro.org> References: <20210818204602.394771-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1629319824386100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index 16e2258b9b..b64760e736 100644 --- a/tcg/sparc/tcg-target.c.inc +++ b/tcg/sparc/tcg-target.c.inc @@ -332,6 +332,13 @@ static bool patch_reloc(tcg_insn_unit *src_rw, int typ= e, insn &=3D ~INSN_OFF19(-1); insn |=3D INSN_OFF19(pcrel); break; + case R_SPARC_13: + if (!check_fit_ptr(value, 13)) { + return false; + } + insn &=3D ~INSN_IMM13(-1); + insn |=3D INSN_IMM13(value); + break; default: g_assert_not_reached(); } @@ -469,6 +476,14 @@ static void tcg_out_movi_int(TCGContext *s, TCGType ty= pe, TCGReg ret, return; } =20 + /* Use the constant pool, if possible. */ + if (!in_prologue && USE_REG_TB) { + new_pool_label(s, arg, R_SPARC_13, s->code_ptr, + tcg_tbrel_diff(s, NULL)); + tcg_out32(s, LDX | INSN_RD(ret) | INSN_RS1(TCG_REG_TB)); + return; + } + /* A 64-bit constant decomposed into 2 32-bit pieces. */ if (check_fit_i32(lo, 13)) { hi =3D (arg - lo) >> 32; --=20 2.25.1