From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C514FC433E0 for ; Tue, 9 Mar 2021 09:58:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 931DF65268 for ; Tue, 9 Mar 2021 09:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229764AbhCIJ55 (ORCPT ); Tue, 9 Mar 2021 04:57:57 -0500 Received: from muru.com ([72.249.23.125]:41370 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbhCIJ5m (ORCPT ); Tue, 9 Mar 2021 04:57:42 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 17CE9802C; Tue, 9 Mar 2021 09:58:22 +0000 (UTC) Date: Tue, 9 Mar 2021 11:57:37 +0200 From: Tony Lindgren To: Arnd Bergmann List-Id: Cc: Aaro Koskinen , soc@kernel.org, Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: omap1: fix building with clang IAS Message-ID: References: <20210308153430.2530616-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210308153430.2530616-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann [210308 15:35]: > From: Arnd Bergmann > > 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