[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231204195906.GA2045328@dev-arch.thelio-3990X>
Date: Mon, 4 Dec 2023 12:59:06 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
clang-built-linux <llvm@...ts.linux.dev>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>,
Linux Regressions <regressions@...ts.linux.dev>,
lkft-triage@...ts.linaro.org, Arnd Bergmann <arnd@...db.de>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: clang-nightly: vdso/compat_gettimeofday.h:152:15: error:
instruction variant requires ARMv6 or later
On Mon, Dec 04, 2023 at 06:26:15PM +0000, Russell King (Oracle) wrote:
> On Mon, Dec 04, 2023 at 11:13:04AM -0700, Nathan Chancellor wrote:
> > Hi Naresh,
> >
> > On Mon, Dec 04, 2023 at 05:33:26PM +0530, Naresh Kamboju wrote:
> > > Following build errors noticed on Linux next-20231204 tag with clang-nightly
> > > for arm and arm64.
> > >
> > > ## Test Regressions (compared to next-20231201)
> > > * arm64, build
> > > - clang-nightly-defconfig
> > > - clang-nightly-defconfig-40bc7ee5
> > > - clang-nightly-lkftconfig
> > > - clang-nightly-lkftconfig-kselftest
> > >
> > > * arm, build
> > > - clang-nightly-allnoconfig
> > > - clang-nightly-axm55xx_defconfig
> > > - clang-nightly-bcm2835_defconfig
> > > - clang-nightly-clps711x_defconfig
> > > - clang-nightly-defconfig
> > > - clang-nightly-exynos_defconfig
> > > - clang-nightly-imx_v6_v7_defconfig
> > > - clang-nightly-keystone_defconfig
> > > - clang-nightly-lkftconfig
> > > - clang-nightly-lkftconfig-kselftest
> > > - clang-nightly-omap2plus_defconfig
> > > - clang-nightly-pxa910_defconfig
> > > - clang-nightly-s3c6400_defconfig
> > > - clang-nightly-s5pv210_defconfig
> > > - clang-nightly-sama5_defconfig
> > > - clang-nightly-shmobile_defconfig
> > > - clang-nightly-tinyconfig
> > > - clang-nightly-u8500_defconfig
> > > - clang-nightly-vexpress_defconfig
> > >
> > >
> > > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> > >
> > >
> > > Build log on arm64:
> > > ---------
> > > In file included from lib/vdso/gettimeofday.c:5:
> > > In file included from include/vdso/datapage.h:135:
> > > arch/arm64/include/asm/vdso/compat_gettimeofday.h:152:15: error:
> > > instruction variant requires ARMv6 or later
> > > 152 | asm volatile("mov %0, %1" : "=r"(ret) : "r"(_vdso_data));
> > > | ^
> > > <inline asm>:1:2: note: instantiated into assembly here
> > > 1 | mov r4, r1
> > > | ^
>
> I have to wonder why Clang is complaining about "mov r4, r1" because
> that certainly should not require "ARMv6 or later". On the face of it,
> this to me looks like a bug in Clang.
This is because the compat vDSO is compiled with '-mthumb' by default
and Nick helpfully pointed out on IRC that prior to ARMv6, one of the
operands to the mov had to be a HI register, which I do see in the ARM:
Encoding T1 ARMv6*, ARMv7 if <Rd> and <Rm> both from R0-R7
ARMv4T, ARMv5T*, ARMv6*, ARMv7 otherwise
MOV<c> <Rd>, <Rm>
Cheers,
Nathan
Powered by blists - more mailing lists