From patchwork Fri Nov 6 03:29:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 320748 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp982242ilc; Thu, 5 Nov 2020 19:43:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwT+2QZl+8lpnIi9kMuSobUO4E50XYBwqEBnH1tfYjDVX5Ey0PV1PLuG8QB3Z9TrO5HcaxO X-Received: by 2002:a25:c346:: with SMTP id t67mr204392ybf.369.1604634216164; Thu, 05 Nov 2020 19:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604634216; cv=none; d=google.com; s=arc-20160816; b=Rlo6QeOB9OJiVul3u0ld33GBExvil34NqmvL1QyuXY1hNogNCROgrhHXkrAYF7o4VG cMN8auuxUCsjr/sQ3yilwM2fLrGiXqns2j8q5NYdz3inMPe8JW0uN3tyvs7JqB/MaOoZ OPJQg/uAedVh2GEX+Mhob+ouQ80h8dQBiEo6xGLAnZHEYzeEA5QzaIQd53eQU1PPjRJX if4rCSqFdkQQihXwudOgpPraHnKDkun0HgmEAvz1Cx8E7T5R4CiEDBaGRm/8ppjqNx5v D/FjKKoG1YGK8dJZLEmEgrbdNcidhRqMePGLj2B595vI7kFfGHq/8bCk+ZLmAProsQEn +3LA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lR9ILVXMVkME60wGI8pWnBaKO2y1Li21DXN5Z4ukxX8=; b=Z8Iw8GUcY1m6LWhNFp8Ies+7FdPqVWdkEsXdDTMikhjaJ24twfHBClmZSJOimNdVbD MYcrtLxy/YHVjklpjDKxv9bZ80xiWDYnNkvWGhtP5+rFS3xGqG8BlWi5agnfTwAjfDaF PBvtUiaI1xIyoYxKv3T3H8AgOQE2wWFbYljPGlmW2/VzKNqqlkfZL96ZgWhr+PQN0dZi dJ2VzcckcxULHOdO0OyCCiYLlgSUidfLSoooykWnSfiYDlTpy/W6yBvlxzl5d+bMFB/V KWECtJAkeMqgDabEU46fp2B2zzsP2iHRu7JXiP1gM6xp5IFsU0eHhcpDVVioQwT18YcY faQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jaFmAEZd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o2si205937ybc.369.2020.11.05.19.43.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Nov 2020 19:43:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jaFmAEZd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kasf1-0008Le-L4 for patch@linaro.org; Thu, 05 Nov 2020 22:43:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kasRy-0005TT-70 for qemu-devel@nongnu.org; Thu, 05 Nov 2020 22:30:07 -0500 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:44180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kasRt-00075U-5q for qemu-devel@nongnu.org; Thu, 05 Nov 2020 22:30:05 -0500 Received: by mail-pg1-x544.google.com with SMTP id e21so2865993pgr.11 for ; Thu, 05 Nov 2020 19:30:00 -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=lR9ILVXMVkME60wGI8pWnBaKO2y1Li21DXN5Z4ukxX8=; b=jaFmAEZd3q6hKFAfLjDCKTZf6mgsn+43MkS0j0Q7ND9xFtCm5dbS2sdJC6U+cTOMqt 157uPA80qIDqR93Dxt0TLjyhYF7wZx/48TvK8InU0wHgWVbJKn2bQ5dJhIDoxCg1MvZF ra17Gict90s/pk0wogAP3RQh67dnjHj7suqaveMqhUQRDsCPtUT0LgrM8S2chPcJiEVn mtI7cnG2HbsgFH/rX6LIqdf6ryLJK+Dg3zTl8BZg4S2FNuZ5LrZ4NLqhFuFFNk5cwftu J4wy0RSL+rUI96V41uQGRpSFDpZfHiQeF1+axbk71ScCvxxsab/9tQavgLBHUQDqaMlb F+DA== 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:mime-version:content-transfer-encoding; bh=lR9ILVXMVkME60wGI8pWnBaKO2y1Li21DXN5Z4ukxX8=; b=p5XKrT3wI7wo13X5mDi3u/uIT9tXgkb/W+j3sXKlz9gzsWprwasx1i41ISDEIQVca4 bfFpUs+TU9sQ2cDa+zbwD5E6EOJjVkVICG6gwRU7QIkx9XeemTIGgWN6AnOu+r+lUVYA DmmJ6TZ1eELC9xMeZYn0Gw3jUofpe3una7LO2qM27TYwBL2Iz/Rtlq4AxKat9z74xGTb 7Ct1UqBgCbCOA5H7g+Ow5se2NfJwxrlYLcBG81tgsfyMyLbccUYA2Xx5RoCsjO4RmdQg cqr4X33acjeRQqHs6fbZIVdZbYRcjOv8KtHartYB779FCEAmOP1kuO/bGYWJq1hqBNmH pmpw== X-Gm-Message-State: AOAM533Bn4KpEG4pRoohiC+nZfhnqiSApPq+ksIsYn8USlZLp5BuVr37 GsD84Ux+nLAC5dpw7mM+SFea3qxDLh+GYw== X-Received: by 2002:a17:90a:eb12:: with SMTP id j18mr150225pjz.15.1604633399544; Thu, 05 Nov 2020 19:29:59 -0800 (PST) Received: from localhost.localdomain (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id i10sm40773pfd.60.2020.11.05.19.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 19:29:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 26/41] tcg/ppc: Use tcg_out_mem_long to reset TCG_REG_TB Date: Thu, 5 Nov 2020 19:29:06 -0800 Message-Id: <20201106032921.600200-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106032921.600200-1-richard.henderson@linaro.org> References: <20201106032921.600200-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: , Cc: j@getutm.app Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The maximum TB code gen size is UINT16_MAX, which the current code does not support. Use our utility function to optimally add an arbitrary constant. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index dc90705d02..91d5d95ddf 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2392,9 +2392,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, set_jmp_reset_offset(s, args[0]); if (USE_REG_TB) { /* For the unlinked case, need to reset TCG_REG_TB. */ - c = -tcg_current_code_size(s); - assert(c == (int16_t)c); - tcg_out32(s, ADDI | TAI(TCG_REG_TB, TCG_REG_TB, c)); + tcg_out_mem_long(s, ADDI, ADD, TCG_REG_TB, TCG_REG_TB, + -tcg_current_code_size(s)); } break; case INDEX_op_goto_ptr: