From patchwork Wed Aug 18 20:19:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 498993 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1014232jab; Wed, 18 Aug 2021 13:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK+4Wc1oAEOn2f/HE1Dh7hhx6vsXT+p0IYd+29hw5EHUjOImZwR/KFfyLxvfi32mskZFw7 X-Received: by 2002:ab0:3303:: with SMTP id r3mr8714711uao.17.1629318736300; Wed, 18 Aug 2021 13:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629318736; cv=none; d=google.com; s=arc-20160816; b=kb2uwCOGwo6+I18UzkyEXDAfIFFiw5TI00+JcjZPgqYs/X1U4x98RMda2UgGYI31w/ Y5fwzz9LtkirVSIkP0B/8ztcAnv+XiasjX1bYLawmCuldDJRwQbUAvh3H4fJqv4l1Rb4 m1nbMFRPcBfj8poTLZ8hLcIg8rK5tKz4L1PJ2uOtYRqSlG8b6dp5T/iWSaoqbO2j83Vf By5UcmDfyT0UjG32JSH8oWg8ltK7LHVHQwMktL00M3UpQgy2vKB6G74lHDWViq0e8O1Y R3uioVjEUstpiYLqyZUFDTEgZw/ILtAWDfzWLIk64rLpf8nA6sAGKLfVba/lxgAjY7oH xgrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=jNjyfYROdoiW+oB5URi9KU06Tz8MB4l7ljtYIqD7XFQ=; b=HxSrbPJrk+G9mazYmLPzOAigRmEXZAcA4bIaeKGStB4M5XfTiswJWcY04MHr6G64XK d1cHEjPhup9l61Fru+aycS/Vowoo+ev8lfIQkT4VGSKTqrTJlNt5DageSg2/eq4AaVWa jrn1NiUJqwXhFf6UYsobC8OSKGTekfGhA0306UboX0WsEyPOQMngnFvY8WFHyBB3JR20 gTL29fQgdylKBFF69RKeKTVczn572A24y6ulnBpC2El9Cno4CInjuNwQpsTjMUcsLuFh hqchOZA1GPXvHqR91Gp4l0ncnchzhyQLv+BjrEWexo/fF04NEcgUArVaK3PAVmV8PZMC RVag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z9SIfqyD; 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 b11si521194vsj.51.2021.08.18.13.32.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Aug 2021 13:32:16 -0700 (PDT) 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=Z9SIfqyD; 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]:46186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGSER-0006xl-KD for patch@linaro.org; Wed, 18 Aug 2021 16:32:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGS2K-00081z-Pp for qemu-devel@nongnu.org; Wed, 18 Aug 2021 16:19:44 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:40602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGS2H-0006AR-FP for qemu-devel@nongnu.org; Wed, 18 Aug 2021 16:19:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id y23so3480985pgi.7 for ; Wed, 18 Aug 2021 13:19:41 -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=jNjyfYROdoiW+oB5URi9KU06Tz8MB4l7ljtYIqD7XFQ=; b=Z9SIfqyDsZYO2wu4hTqa5jTIW9YlfFmN9k5KGHHj48mrfTZD4XW5plU3ubAgwytkdG W05D4/qe+4j6F+PzwBEcbevbEHapr5YiG381r2rKpn5MuOaGG0MBLAp8V2iB9x0ErXUY fy5yxyH0pf+zFqeR0ctbqDmbrPmQ+xggiPiiVpaVfBfSglxxNDO92HoaqpT9qTk+ojn6 KHsixE6qVvDzlQm0JXllPH0RWOr5sL7GC2hHElhWPOU2XCcJ1cjmxUCRJlZKBYl2UzBP xP9X7EUFHuGcGs/6SaI7LLbRDgUEKOx3pQR01oULXPo38IWwgqzVna1ox3hNEU18/d++ 1sfQ== 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=jNjyfYROdoiW+oB5URi9KU06Tz8MB4l7ljtYIqD7XFQ=; b=ImI2M8wHs/BtMN6C6PKTwLADv8Lot6UnL4iP3nuVwuROg3LjpuirMzoN6qdkoT5DTU 6S+gzxwV0+S0q9PWAkEjl/KzErL36oNDExDnTN9+m5h9DpQrVPmnrgY94J4yUl1iZj5A kFNwzK5JKxchBdCtPdF3D0buo8Q+kWJ/MRUKwWtzSS263RxJ41ttEHmlfyN1hQ4xAaE9 iY/t8YenKv0uiKMcpbz3Hnya2zrkDkP8UULAyNBfLYORN127c5bRmoyH/Ys3EFmQM0tB w00ieuTO0l7yAl9VL6N2bbTzMQidS7Bg7QbI7X4oT4PHnK5z8AoKVaT/XsMa2lIjw/LX zF1g== X-Gm-Message-State: AOAM533R/4n+Si1jln8vGOZHGbVgj60QR/2BiqKdAue7L1d+PtRzMnzG zaygSUWHhp+LcGIDxQ+a+wUF5Qj92bIzdA== X-Received: by 2002:a63:fe41:: with SMTP id x1mr10402085pgj.272.1629317980205; Wed, 18 Aug 2021 13:19:40 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id x13sm619621pjh.30.2021.08.18.13.19.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 13:19:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 06/16] tcg/mips: Unify TCG_GUEST_BASE_REG tests Date: Wed, 18 Aug 2021 10:19:21 -1000 Message-Id: <20210818201931.393394-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818201931.393394-1-richard.henderson@linaro.org> References: <20210818201931.393394-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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+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 --- tcg/mips/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index b3a2cc88ab..4019c22f3c 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -2671,7 +2671,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); }