[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] xen/x86: always consider '/' as a division in assembly


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 11 Feb 2026 11:01:11 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=citrix.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KboDKz3+vXTC4i8lWnodIs3UqoGQ1nkdDkYcbc7kPDI=; b=dH0Hy45aMNGkB0/OcGs13a3YEZFM5R3PdgDerfz/LUV2ppiSwNZHoPUY/IjyqllqXUJzpWxtlUy+jaIQLWkkdD2vdr4RQlclUou4/2g+FAkQmh7lgflb1NzZFum6yI84Axoyz/S8K5LQ6pHPdRHgElixoYUWhjj2IxT73wSXZqOg5kiMQkft9tZ7ZfhtaoFCj0NoL74GSoaxCa9HZCI7BRH1fdKvYAh7eNjKeQvPU5lULdig9/kjvzYgj+UTwtuyEvfMw0HMWw4q5FXmgmA8uGInrHWj5JojqP0X4hzlY5revTffPVhDSo6WoPK01MWeWkYKNiL/i8ZI6l5EDdTXPw==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KboDKz3+vXTC4i8lWnodIs3UqoGQ1nkdDkYcbc7kPDI=; b=j/aitXf22VU6+SSu7EnjXw/THW6mqETL2wMhlzrA3Gd1yzi8FSXvcMhQebjJae2FzuznwuTDvQNageohd4fg0oqr00bbos4t6ker7NsHnrrywT/vubAcBFPKxGmaJSOMDZ0pHIrugQ/UZTGlWefgrfCcD4Ulrw/wrkzJQbZJ9qB9U1hZsmRuOJKEhGPwUhwCoTip4gKzkvI0oezGaGMH8wtrDC+ru7qWEBoYGrxF1k43eUJ9N887y8kZc8k0TrtyewmTaiz5RBX6QMZbY0Gz4tafO7nT6LqQwUZacfAoFMFiKgUyvVbN3xIBq+zsZVDjRUS6+HRxVZQ3gsv+2ladgg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=rMKB+CcH4H5v0R2gVSsVVLQxbaJKt0OS4sy+lOiDUlgE6y5p2a6EF3dbDD0bVIEBP1wYKwMw9fm0ab3+x2hWR0aJmReRfK/YUJYSB0a6e5ece8HUa7JpMozR6trZgiHujAj3ilG/4Eh03DyZu8jzNlCn/6QSHCRs+Ttg6o6WHFCLVVasNAf1uSxL9/QYi+yDGy6Ji7MOrene6jSY/Lf/zd0FYk0Kie5nF7FxaoUt1rumQU/TGWU3LHPG4xq5WCGy6UFhCwSrUfF7Q4Ntyt2gqfD8hXsj/ngv+biBT8EwwBEEt8uQQ2kaJR9IUGlc/s/N7eEnrKnh7ACa2McgHvyMRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fet6GCTU42F0OjWjoK7SOby8JzIMD3360dhrgyC42GBJ00BkKJbSqQY9PtKv+jDC4gWGtfwYsj/AHMzG+2E1ARTtB10mNM3AG7yDdUDAmcmUVFC4TaaJ4UmndBAuLOnlhftBLovQn/DIaSnWK2DG4dpHmWY3ZGUkCJXH+080uz/1a0BqsUdk776aKhoRC2Y3VLCyNXxo2p6J3HbRzbh6oGpNnCllGGz7FW7FK4TrjqC1OOV0YDN6fARyz4ajwxPHNO5ypWd8E5RTCt0j+pFOMmzraQyBFLLIUbfDnE3vdghiq4PBonYB7YisDqt+ln0m34HHIxLLMaE4/AAhouQCqw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Feb 2026 11:02:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHcm0PRpWbQ66MnpUKRg8FXLXanDLV9VOKA
  • Thread-topic: [PATCH 1/5] xen/x86: always consider '/' as a division in assembly

Hi Roger,

> On 11 Feb 2026, at 11:46, Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote:
> 
> On x86 GNU assembler will consider '/' as the start of comment marker for
> some ELF targets.  This is incorrect with Xen's usage, which does use '/'
> in assembly files as a mathematical operator.
> 
> The behavior of the assembler can be altered by passing the --divide
> option; unconditionally pass this option when available to force the
> expected behavior.

Works to build x86 and arm still working on Mac OS.

> 
> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> Changes since v1:
> - Guard option setting to x86 only.
> - Adjust comment.
> ---
> xen/Makefile | 7 +++++++
> 1 file changed, 7 insertions(+)
> 
> diff --git a/xen/Makefile b/xen/Makefile
> index a054315fa4a2..4c83e2a46477 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -413,6 +413,13 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
> CFLAGS += -Wa,--strip-local-absolute
> endif
> 
> +ifeq ($(CONFIG_X86),y)
> +# The GNU assembler will interpret '/' as a comment start marker instead of a
> +# divide for some ELF targets.  Pass --divide when when available to signal 
> '/'
> +# is always used as an operator in assembly.
> +$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)--divide)
> +endif
> +
> $(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack)
> 
> LDFLAGS-$(call ld-option,--warn-rwx-segments) += --no-warn-rwx-segments
> -- 
> 2.51.0
> 
> 


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.