[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YEdGkZlCDdhKP6cw@atomide.com>
Date: Tue, 9 Mar 2021 11:57:37 +0200
From: Tony Lindgren <tony@...mide.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Aaro Koskinen <aaro.koskinen@....fi>, soc@...nel.org,
Arnd Bergmann <arnd@...db.de>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] ARM: omap1: fix building with clang IAS
* Arnd Bergmann <arnd@...nel.org> [210308 15:35]:
> From: Arnd Bergmann <arnd@...db.de>
>
> The clang integrated assembler fails to build one file with
> a complex asm instruction:
>
> arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: error: invalid instruction, any one of the following would fix this:
> mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
> ^
> arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: armv6t2
> mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
> ^
> arch/arm/mach-omap1/ams-delta-fiq-handler.S:249:2: note: instruction requires: thumb2
> mov r10, #(1 << (((NR_IRQS_LEGACY + 12) - NR_IRQS_LEGACY) % 32)) @ set deferred_fiq bit
> ^
>
> The problem is that 'NR_IRQS_LEGACY' is not defined here. Apparently
> gas does not care because we first add and then subtract this number,
> leading to the immediate value to be the same regardless of the
> specific definition of NR_IRQS_LEGACY.
>
> Neither the way that 'gas' just silently builds this file, nor the
> way that clang IAS makes nonsensical suggestions for how to fix it
> is great. Fortunately there is an easy fix, which is to #include
> the header that contains the definition.
Acked-by: Tony Lindgren <tony@...mide.com>
Powered by blists - more mailing lists