From patchwork Sat Jan 8 06:36:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530703 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp999373imp; Sat, 8 Jan 2022 00:02:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFDs6L2KgHN/Zkgn/phoVWTKJc3uLjNhFH8u8WjpoxMIHO6Bashyc6iMQjqpXUQzygTqq7 X-Received: by 2002:a25:6141:: with SMTP id v62mr3341338ybb.457.1641628974272; Sat, 08 Jan 2022 00:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641628974; cv=none; d=google.com; s=arc-20160816; b=R9f74xFmFSBEmh8qVgV/bnGkvZBl1nk1Q4KVQXBQkrwFdpbdToktEv8u+Hp3GdWFE8 5tYlrWLTnuJu+P2qN3s81hHg/DuE2TJHuEY8FLVc7ScO30PFe3y7JHUwoqA+FYr90xAI 7DjUpiCaXb16OwBze5+IiAKa+PaBnX20MGtXF3OT1q5RVI8vjQB+AwF9LuQYZgAeIu8S M8JEYz8fGBsR7E63HzXxRw4IQVzGMUzsiPRjLwgv508BrYzU567JNWhUZkM5tNNpFdwX An3nP3bxW3eRRAzFbSAE/S6tB2NyIQVmW290OegjMI2YTFeMR1LqyRxyim+XTrQoe9T3 qO+g== 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=y8sDBwJK1V/FhZ8YD28+6vGDo+RSEHHSakaI/hkSLk4=; b=GsiQIiv8CT8XfP7A+wS8ARxY1gYOWp3MPRI5Sijb+lCSzkHs/qu8gj1gBirw1U0HFz L548oIy9NNaqSLXdW4XM30YxaXGJSvieRrSwWfkFJB9d6Vq3ai9CZ9opTgFydhQ4rwNI XTQLmJvbtOqvBT8MV/h5KnptMKkabXF0TR4Hri98TjZNce3y3bM/VzLF1naGxdWAzS06 0lU1R9k+YDJ51V6llbThumnhJyJa18Jaa5fm5K/u8F5NIxSbxEjo/i9ce7PSSL/u0MxA xse+F5HTTYV61Tb3u8EKWEykmOIdIeP7DqW83GQB75CIk8EP+vl6N2240UEwMLntaNz7 XoAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Xwa2EcwP; 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=fail (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 f70si654120ybg.446.2022.01.08.00.02.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Jan 2022 00:02:54 -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=fail header.i=@linaro.org header.s=google header.b=Xwa2EcwP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n66gf-0007fg-HK for patch@linaro.org; Sat, 08 Jan 2022 03:02:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n65Lc-0005hH-AO for qemu-devel@nongnu.org; Sat, 08 Jan 2022 01:37:05 -0500 Received: from [2607:f8b0:4864:20::102c] (port=41628 helo=mail-pj1-x102c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n65LS-00047P-Tv for qemu-devel@nongnu.org; Sat, 08 Jan 2022 01:36:56 -0500 Received: by mail-pj1-x102c.google.com with SMTP id b1-20020a17090a990100b001b14bd47532so8976310pjp.0 for ; Fri, 07 Jan 2022 22:36:54 -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=y8sDBwJK1V/FhZ8YD28+6vGDo+RSEHHSakaI/hkSLk4=; b=Xwa2EcwPFc9kSL5RT4ODi22Ne/isCDG/9zDT2bXsJsj2zTAmn24FCik8D+JnrsJyNC +4OLykoDqzIHEpvuQGAO+fqGHEv+xYH84lGQ39B8D6QCc6UFJSoW72tXHLWy1HOZcl2u UPKHn8Tt/ymtPLdnY8L33BuxPJIBHJYL66JpSSk2WBJeglXMlEUFcr9I1enkSVJjaYoS Q/8JaNYfyhryWbaOnICf6iKnGI3CqrCZ4HMsB47nsHIq0RCRYh0sA6TKc+zOT9pEwuy9 j9qIMIuCm8fNhM8pBZRqfN1h7gEpsYzwRKzzK8qqhh8/TuVHGFdMdkDp3b3X9YA+z4FW +mZA== 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=y8sDBwJK1V/FhZ8YD28+6vGDo+RSEHHSakaI/hkSLk4=; b=J9UXyOo4MdzzbUmAETv34SwEXm6dnbL0If86ISkW4FF+VyM9EW0QmQXCu68hNRHcVz oNoVvmsoK64dYGzMiMolsqD0H7BiJiNletAg5vtCbFxmACABAUQ2QATXPNp8Sxh+EZt7 o1oOH1vIH6UemfIUfgCV5JCVu5ehUQh6g4AaGWGUyjwn/q8zFxa31gYN+tPjLMcfQPUS W5e1Rt3vWfO5BXrCyWKEhvSkRNKPWpJsFiMey5w4hlKDhYwKZrR63ooLWwsXhQCYWWB/ VEztV2WBoy/GqUk8vvoNAGIPCku0BUhkOCt0HajKSUlBcmXFCllqqVQ1FM98U4v2Tmvq hr+w== X-Gm-Message-State: AOAM531mlGoJT+jKmAzcyoHwOW2lo9nL3njcm4+pli0KnkFkJEeyfYOM phL/IUU7opmXa7VRvtwn4MPdndKZxxKJ2g== X-Received: by 2002:a17:90b:1651:: with SMTP id il17mr19575999pjb.190.1641623813755; Fri, 07 Jan 2022 22:36:53 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id z4sm840954pfh.215.2022.01.07.22.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 22:36:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 05/12] tcg/mips: Unify TCG_GUEST_BASE_REG tests Date: Fri, 7 Jan 2022 22:36:37 -0800 Message-Id: <20220108063644.478043-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220108063644.478043-1-richard.henderson@linaro.org> References: <20220108063644.478043-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In tcg_out_qemu_ld/st, we already check for guest_base matching int16_t. Mirror that when setting up TCG_GUEST_BASE_REG in the prologue. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/mips/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index 1bfe6aea0e..46616784f8 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -2677,7 +2677,7 @@ static void tcg_target_qemu_prologue(TCGContext *s) } #ifndef CONFIG_SOFTMMU - if (guest_base) { + if (guest_base != (int16_t)guest_base) { tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base); tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG); }