From nobody Tue Feb 10 01:30:47 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1565631098; cv=none; d=zoho.com; s=zohoarc; b=nPm2IxilYmqdX5X+SZRKmi3cYz85MXCL09SQsj7AXi5+lsc7gc2orv5lziY8KqGyEf5ranlPG/5eHmPoJq1HYl4uWWFKB2dcf3U2zWHG8yVtF/vfHFBrYsehdhpf0Qba/E2P/5GB73XLKV8XDyzQNyjO/OJblokeMgF5wnoCOyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565631098; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=kj7gDaBmW9ApnLebCTiEuDAfZEM4LqTFeRGWXdqnJxk=; b=Wzn+27uNtrblEZXJpQQ8V5EST+5YnG2LHTNaB6L04lk2k0hNPcqfVOdTsZAtv4FYl4Q1xz60Fi37MQ3oVbMUyI4jFchLYEaoMYFcIR/ibCCcX921uRTACVy0Ka+eotKEUDDplx2shb03IXxuyI0OcGb7DielMmJPUNjua5glB/M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1565631098578124.41382364749211; Mon, 12 Aug 2019 10:31:38 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxE9V-0006hP-21; Mon, 12 Aug 2019 17:30:37 +0000 Received: from [172.99.69.81] (helo=us1-rack-iad1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxE9T-0006hB-Kf for xen-devel@lists.xenproject.org; Mon, 12 Aug 2019 17:30:35 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id e4367596-bd26-11e9-883b-d7d30b8f119f; Mon, 12 Aug 2019 17:30:34 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 788301993; Mon, 12 Aug 2019 10:30:34 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C6E133F706; Mon, 12 Aug 2019 10:30:33 -0700 (PDT) X-Inumbo-ID: e4367596-bd26-11e9-883b-d7d30b8f119f From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 12 Aug 2019 18:29:59 +0100 Message-Id: <20190812173019.11956-9-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190812173019.11956-1-julien.grall@arm.com> References: <20190812173019.11956-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v3 08/28] xen/arm32: head: Add a macro to move an immediate constant into a 32-bit register X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The current boot code is using the pattern ldr rX, =3D... to move an immediate constant into a 32-bit register. This pattern implies to load the immediate constant from a literal pool, meaning a memory access will be performed. The memory access can be avoided by using movw/movt instructions. A new macro is introduced to move an immediate constant into a 32-bit register without a memory load. Follow-up patches will make use of it. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v3: - Add Stefano's acked-by Changes in v2: - Patch added --- xen/arch/arm/arm32/head.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 18ded49a04..99f4af18d8 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -37,6 +37,15 @@ #endif =20 /* + * Move an immediate constant into a 32-bit register using movw/movt + * instructions. + */ +.macro mov_w reg, word + movw \reg, #:lower16:\word + movt \reg, #:upper16:\word +.endm + +/* * Common register usage in this file: * r0 - * r1 - --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel