From patchwork Mon Jan 28 15:59:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 156773 Delivered-To: patch@linaro.org Received: by 2002:ac9:7558:0:0:0:0:0 with SMTP id r24csp3533364oct; Mon, 28 Jan 2019 08:12:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IbB4A99UyFDIt6Njwqdo1JTXqI8zd6vZWIpO1Ocit6Nrp0vE1sySx8mnXG3wkw28W6hBgWJ X-Received: by 2002:adf:f3c6:: with SMTP id g6mr18010751wrp.111.1548691961709; Mon, 28 Jan 2019 08:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691961; cv=none; d=google.com; s=arc-20160816; b=M/6mY0Gzw7L01uBn+TXuPD8CqFoIKJi4VM4h8ZQ+++hH1n4vDpQuTDYsagVEdAeRB9 dE8UV/wdjkCUsa4AjszEntKqvJxdHxghTlmwsP9CvXhBqeQmi4ky1VNbnLtv8uVODyXr 8gLvcoTwMIfC8JEMhtEfOOVUb403aWCJSskECxZDRp/fT0m835WLh6MPo4f4wtGaoLfg Kg9P8JOIDCEa/SO1LwUSKmobNNH0+C8DjTmbMBD2jbUlgvQbkMgnAHnhSYMmXODeAcqM b8QexOrP+a4DG3cF/kuxGUvvpkBeb+bw3XpDO2AuZjYxkQtKyYJU74DZQNkkB6BhSkKp p1dA== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=+L0wBkxKTUeVI/04FDDLFSjFaBD1pRVqKJYILvbKu24=; b=J9lcSPHwsJUN9AWFAAqwP2Nf5i5FDo8jVPEZbfUOEfy4ilF/d5J7J6OvXi5D2WNuvd yFSPtlZuLeeVcxglwaOpwQDVeAP50yQuSq0PmF/r1yLty0JGQezgFAWQE2JLNTsKQ3nI mllygLXQ2f7XSuEaqI+2RZU7ZyIt56+031njuRTJZXPpObamaNJX4GBLpctQG3h0Ns4+ ovKp/E77Tjf+vt0+ywbU64FCmlZxSwoaD9t/VUXb/9PL4zav+3wuFA9Auke9GlHo5rWU 7Ts3GPjo93RGXHXfp9xZA/3QRi2FdNoIm5RD0R8W3e9Aw+Oi1riiQ/yJZ6QIY1NwqJ4B pJHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gnLBcltK; 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 g185si49092566wmd.156.2019.01.28.08.12.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:12:41 -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=gnLBcltK; 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 ([127.0.0.1]:34333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9Wa-0005lD-Hq for patch@linaro.org; Mon, 28 Jan 2019 11:12:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9K5-0005Cj-MU for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:59:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go9K4-0007vh-Mf for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:59:45 -0500 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:35951) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1go9K4-0007r7-EQ for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:59:44 -0500 Received: by mail-pf1-x42b.google.com with SMTP id b85so8190205pfc.3 for ; Mon, 28 Jan 2019 07:59:39 -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; bh=+L0wBkxKTUeVI/04FDDLFSjFaBD1pRVqKJYILvbKu24=; b=gnLBcltKUVg11sRq3MtKiFSnchmvi8BpnG0QHM5o0aeSwufE9yDmp+Ppee0Wg03m0U jKMZXcm6LzKLp1wp2x4BkNz59OmAZFLoSK/HthohXhTOhrJ/GRmT3L1GXcg2RpfSSf7X yvhwPmc6Za3duBpjP3A31HzuyIeIl0IMg1EcM= 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; bh=+L0wBkxKTUeVI/04FDDLFSjFaBD1pRVqKJYILvbKu24=; b=XZqMcva5R/40gfU9tXfuBn1OAuOs8W8y2M8pxcLOf06i5Opn+tBM4Xn+/eVzVDHpln xtDGbfRJbVwMjr6MWmK7Mh+glnumnACTW+wmhyShKUkpJZqsrp9E6m1UQkh2t/P+dqzM BuLJoImpu4aOsUpazU+iHW0HctPoWpFqlzt5SGIBPhbPAoMGcxf46iqHktgMvouwCLL8 gKOHEjoQSKeLrN9PRY45AxLTbJpeFhZiTeHcVVLhboTwbYDyo0Fzz6FzB3woGiDoGBa6 s23ijl2YuPbg6jvX3/oq6GrJk9TgMNP1eHY8u8Gniqn7KH2+6Aq+iDCOkPS1EDwh5cvv TGJw== X-Gm-Message-State: AJcUukew72du9Hx2LXf6+13y6Giat6cjQ0hkDEwhfy0rErIHUHUJX2F8 Z02Vy8AdWTmfe6th+tbSRFC7LjpeEik= X-Received: by 2002:a63:9712:: with SMTP id n18mr20015429pge.295.1548691178670; Mon, 28 Jan 2019 07:59:38 -0800 (PST) Received: from cloudburst.twiddle.net (50-233-235-3-static.hfc.comcastbusiness.net. [50.233.235.3]) by smtp.gmail.com with ESMTPSA id p2sm45518687pfp.125.2019.01.28.07.59.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 07:59:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 28 Jan 2019 07:59:04 -0800 Message-Id: <20190128155907.20607-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190128155907.20607-1-richard.henderson@linaro.org> References: <20190128155907.20607-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b Subject: [Qemu-devel] [PULL 20/23] tcg/mips: Fix tcg_out_qemu_ld_slow_path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Patch the branch after it has been emitted rather than before it exists. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.inc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.2 diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c index be0bc92e8e..c5d7067f89 100644 --- a/tcg/mips/tcg-target.inc.c +++ b/tcg/mips/tcg-target.inc.c @@ -1343,8 +1343,9 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l) } } - reloc_pc16(s->code_ptr, l->raddr); tcg_out_opc_br(s, OPC_BEQ, TCG_REG_ZERO, TCG_REG_ZERO); + reloc_pc16(s->code_ptr - 1, l->raddr); + /* delay slot */ if (TCG_TARGET_REG_BITS == 64 && l->type == TCG_TYPE_I32) { /* we always sign-extend 32-bit loads */