From patchwork Tue Apr 7 15:51:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 185252 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp5017978ilr; Tue, 7 Apr 2020 08:58:27 -0700 (PDT) X-Google-Smtp-Source: APiQypJnx2FLl1j19Q88/tKBcwKc8RBJq10fzvz+ZZTzFW3pPtjNbmS+nHqlpRiMfZaU97JhIy7I X-Received: by 2002:ae9:c319:: with SMTP id n25mr2710557qkg.79.1586275107012; Tue, 07 Apr 2020 08:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586275107; cv=none; d=google.com; s=arc-20160816; b=qaeuZJ10TbLmjrXzP92ZmEe5DJcF5zY5NX11TNXmzeUAqv5hnCC1Mgt/hOR7qxQh30 fsBHt9jbgQBXH1Yhbmie/QHZOhsPfGOyuCwuPjqOq5ndnwsrDDqg+gabMcJAVq8dixxC UCuR7tPJFQBYj78cGKygS0+/VHI9+Y6xBRIcVwP3HFJHTLtbKyn03yZeG8iH31siOBKg XD4SgX0zBbAjN/163gubyd1q3LdYrFPRAgknJwxzTiMfyqtGdT6/oruqY172XJ2LD89D sonqCc1q2CdNUAT6FAOj0VakMsvjUvX2TsdKkkRfUPono68CC5ZzfNPndVI1SPILa26O gUWQ== 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=+Dj9bvmQD1l5de8jG8VJF31FLCLEGTP0nVDrh17bTiY=; b=acTaMiGl3ReJxUO5JOrH/2haxrN61eez/skYyfnQE7wyDjnymcYH+iVHttYqSftztQ 7P2FY/M9ZJm3PMd/JX+qfDS6hcYvz4w380NkMVCvquA+ycLENaQo+MsJo2YJb85zrDiL TFhpIFIqYOHGtO43kWYPmY5Aa2rVT+Mi29WL0+8NR2QB/r/NVqCsxeNoiKeOe/MYOow3 EtVmb6C/j6bf2j2+TvBLjlRhSYlldxXMMsk1Bx6R4IY27WTLPq4E1kYI4Tn/XezCk1jv MvWfK4B+5SYBVNmpsbQSPMozqEe7ll0zlNSCXCRp7CtQpkxuJ9gi3ibBAplkXVfPi08V wpow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wn3u4hXo; 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 a13si2201183qvf.210.2020.04.07.08.58.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 08:58:26 -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=fail header.i=@linaro.org header.s=google header.b=wn3u4hXo; 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]:49812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqcM-0006ye-Fg for patch@linaro.org; Tue, 07 Apr 2020 11:58:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqVo-0003rq-F3 for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLqVm-0004Ts-IE for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:39 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:53352) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLqVm-0004TF-BT for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:38 -0400 Received: by mail-wm1-x32b.google.com with SMTP id d77so2250804wmd.3 for ; Tue, 07 Apr 2020 08:51:38 -0700 (PDT) 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=+Dj9bvmQD1l5de8jG8VJF31FLCLEGTP0nVDrh17bTiY=; b=wn3u4hXoejvD+TBBFVuquKqc7FHlfav1FYlvJdTory5jgXqTZt6EOTc3eHrcblqs++ oMBEvm4HFNeaKpkU19bdg2gzOiHjtbFRlQW7enV5FueUPCwvRmsu/1MsVRSddjXb5VM8 FBJbvlhRjnQ/3TdY/6/NDB/NuM4/sBg5pWUt2DSWtrOt6dupLil9mwi363vQBu7eYDzc xitJGkR8TjtmYFS8eG4RpgtEH8nIeZAe3CV4k8QW8z0375jWq+4AjYe6R3AvbprCFtxw SHMOVrjo3cC1IclJreMpJxWvFwfK9aUXR34zWJP1eysCQs43mawDuHCBLF1W+xArl3Zg hskw== 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=+Dj9bvmQD1l5de8jG8VJF31FLCLEGTP0nVDrh17bTiY=; b=k0nKjYOsoAjNRqjX1ToWhzo9QMNKyliCGb0uZxr6jPhCNlkzoQEzfrNE3VF+Z8Y0jT tW6qIjCAOCsrVF9zbQKxCuHu4nLjId1Noy9P5+WyGAqSNkGSxktSZ8Cqwd1ZSWXmvZof AC4bRPtSXp/p+oEkwNSdmwv+DSR+OacRyD+4A/Sz+mLIKbW16iXSTQW2aBLcgtPPDJye LDLbyrtuGkUl2CYTygB14eNq0uUaAwZrSC91MhV/SZuTucZYwU+hNqVeGpOye7XUZzAh M/1KkOMAE0GlpDT71mlfdpOYlv/JVBRA+9UabX9chndt5iDJnhZ9+zDxgV8tUPfnFpmh wVAQ== X-Gm-Message-State: AGi0PuY91bKmVxKIn0d8z/R459tB9pWoAt9Q2ohm0M/Yt0WhANx86mhx aDuatBCYqccZ7hWGlNaqUWZTag== X-Received: by 2002:a1c:4b1a:: with SMTP id y26mr1448584wma.130.1586274697219; Tue, 07 Apr 2020 08:51:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e23sm21278552wra.43.2020.04.07.08.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 08:51:33 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 66BC41FF9C; Tue, 7 Apr 2020 16:51:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/13] tcg/i386: Fix %r12 guest_base initialization Date: Tue, 7 Apr 2020 16:51:18 +0100 Message-Id: <20200407155118.20139-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407155118.20139-1-alex.bennee@linaro.org> References: <20200407155118.20139-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b 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: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , qemu-devel@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson When %gs cannot be used, we use register offset addressing. This path is almost never used, so it was clearly not tested. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20200406174803.8192-1-richard.henderson@linaro.org> Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 7f61eeedd09..ec083bddcfb 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -3737,7 +3737,7 @@ static void tcg_target_qemu_prologue(TCGContext *s) } else { /* Choose R12 because, as a base, it requires a SIB byte. */ x86_guest_base_index = TCG_REG_R12; - tcg_out_mov(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base); + tcg_out_movi(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base); tcg_regset_set_reg(s->reserved_regs, x86_guest_base_index); } }