2023-11-15 21:02:38

by Randy Dunlap

[permalink] [raw]
Subject: Re: linux-next: Tree for Nov 15 (RV32: arch/riscv/kernel/tests/module_test/test_uleb128.S)



On 11/14/23 17:27, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20231114:
>

(using gcc 13.2.0 from kernel.org)

on riscv 32-bit:

arch/riscv/kernel/tests/module_test/test_uleb128.S: Assembler messages:
arch/riscv/kernel/tests/module_test/test_uleb128.S:9: Error: unrecognized opcode `ld a0,second'
arch/riscv/kernel/tests/module_test/test_uleb128.S:15: Error: unrecognized opcode `ld a0,fourth'
riscv32-linux-ld: cannot find arch/riscv/kernel/tests/module_test/test_uleb128.o: No such file or directory


Full randconfig file is attached.

Is this a toolchain problem?

thanks.
--
~Randy


Attachments:
config-r1939.gz (27.10 kB)

2023-11-17 17:13:13

by Charlie Jenkins

[permalink] [raw]
Subject: Re: linux-next: Tree for Nov 15 (RV32: arch/riscv/kernel/tests/module_test/test_uleb128.S)

On Wed, Nov 15, 2023 at 01:01:24PM -0800, Randy Dunlap wrote:
>
>
> On 11/14/23 17:27, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20231114:
> >
>
> (using gcc 13.2.0 from kernel.org)
>
> on riscv 32-bit:
>
> arch/riscv/kernel/tests/module_test/test_uleb128.S: Assembler messages:
> arch/riscv/kernel/tests/module_test/test_uleb128.S:9: Error: unrecognized opcode `ld a0,second'
> arch/riscv/kernel/tests/module_test/test_uleb128.S:15: Error: unrecognized opcode `ld a0,fourth'
> riscv32-linux-ld: cannot find arch/riscv/kernel/tests/module_test/test_uleb128.o: No such file or directory
>
>
> Full randconfig file is attached.
>
> Is this a toolchain problem?
>
> thanks.
> --
> ~Randy

I had an assumption when writing this code that uleb128 was only
supported on rv64 toolchains. Since it appears that there do exist rv32
toolchains with uleb128 support I will modify this test to be supported
on rv32 platforms.

The config AS_HAS_ULEB128 in arch/riscv/kernel/tests/Kconfig.debug
should be auto-set to N if the toolchain does not support ULEB128 even though
the randconfig has CONFIG_AS_HAS_ULEB128=y.

There are a couple of sparse warnings in this series that I will fix up
and send out in a new series with this fix.

- Charlie