[PATCH 2/2] RISC-V: adjust logic to avoid register name symbols
Nelson Chu
nelson@rivosinc.com
Thu Feb 16 09:36:23 GMT 2023
Yeah the logs are too big, so not sure where can be uploaded these
kind of huge files. However, we should get the same result if we just
run the gcc upstream testsuites. Seems many errors but a quick
review, most of them are,
*Assembler messages:
*Error: register value used as expression
...
Here are some details,
Executing on host:
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/xgcc
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/
-march=rv64gc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output
-O1 -w -c -o pr79780.o
/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/gcc.c-torture/compile/pr79780.c
(timeout = 600)
spawn -ignore SIGHUP
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/xgcc
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/
-march=rv64gc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output
-O1 -w -c -o pr79780.o
/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/gcc.c-torture/compile/pr79780.c
/tmp/cc1LYHhd.s: Assembler messages:
/tmp/cc1LYHhd.s:17: Error: register value used as expression
/tmp/cc1LYHhd.s:18: Error: register value used as expression
/tmp/cc1LYHhd.s:28: Error: register value used as expression
/tmp/cc1LYHhd.s:29: Error: register value used as expression
/tmp/cc1LYHhd.s:54: Error: register value used as expression
/tmp/cc1LYHhd.s:55: Error: register value used as expression
/tmp/cc1LYHhd.s:61: Error: register value used as expression
/tmp/cc1LYHhd.s:62: Error: register value used as expression
/tmp/cc1LYHhd.s:65: Error: register value used as expression
compiler exited with status 1
FAIL: gcc.c-torture/compile/pr79780.c -O1 (test for excess errors)
...
Executing on host:
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/xgcc
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/
-march=rv64gc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output
-O0 -w -c -o funcptr-1.o
/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/gcc.c-torture/compile/funcptr-1.c
(timeout = 600)
spawn -ignore SIGHUP
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/xgcc
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/
-march=rv64gc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output
-O0 -w -c -o funcptr-1.o
/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/gcc.c-torture/compile/funcptr-1.c
/tmp/cc1RjV1g.s: Assembler messages:
/tmp/cc1RjV1g.s:34: Error: register value used as expression
/tmp/cc1RjV1g.s:35: Error: register value used as expression
compiler exited with status 1
FAIL: gcc.c-torture/compile/funcptr-1.c -O0 (test for excess errors)
...
Executing on host:
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/../../xg++
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/../../
-march=rv64gc -mabi=lp64d -mcmodel=medlow
-fdiagnostics-plain-output -nostdinc++
-I/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/libstdc++-v3/include/riscv64-unknown-linux-gnu
-I/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/libstdc++-v3/include
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/libsupc++
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/include/backward
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++17 -DCXX14_VS_CXX17 -w
-I/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/compat
-Wno-abi -c -o cp_compat_y_tst.o
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/g++.dg-struct-layout-1//t032_y.C
(timeout = 600)
spawn -ignore SIGHUP
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/../../xg++
-B/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/../../
-march=rv64gc -mabi=lp64d -mcmodel=medlow -fdiagnostics-plain-output
-nostdinc++ -I/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/libstdc++-v3/include/riscv64-unknown-linux-gnu
-I/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/libstdc++-v3/include
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/libsupc++
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/include/backward
-I/scratch/riscv-gnu-toolchain/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++17 -DCXX14_VS_CXX17 -w
-I/scratch/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/compat
-Wno-abi -c -o cp_compat_y_tst.o
/scratch/build-toolchains/rv64gc-linux/build-gcc-linux-stage2/gcc/testsuite/g++/g++.dg-struct-layout-1//t032_y.C
/tmp/cci191w8.s: Assembler messages:
/tmp/cci191w8.s:50: Error: register value used as expression
/tmp/cci191w8.s:51: Error: register value used as expression
... too many...
compiler exited with status 1
FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_y_tst.o compile
...
Sorry that I only extracted some small snippets, since there are too
many. It would be better to just run the gcc testsuite again, with
any environments.
Hope these information are helpful, thanks
Nelson
On Wed, Feb 15, 2023 at 5:21 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 15.02.2023 09:48, Nelson Chu wrote:
> > Thanks for the detailed clarify :-)
> >
> > A quick update, I just use riscv-gnu-toolchain to build a linux toolchain with,
> > gcc (releases/gcc-12.2.0) + binutils (master + these two patches) +
> > glibc (release/2.37/master),
> > and then I get some unexpected errors from gcc testsuite, which won't
> > occurred without these patches.
> >
> > ========= Summary of gcc testsuite =========
> > | # of unexpected case / # of unique unexpected case
> > | gcc | g++ | gfortran |
> > rv64gc/ lp64d/ medlow | 347 / 62 | 29 / 9 | 0 / 0 |
> >
> > I haven't tested the elf regressions, and the whole linux regression,
> > but it seems that there are some unexpected situations that we have
> > not considered in this patch.
>
> Hmm, this suggests to me that testcases are missing in the gas testsuite.
>
> > Reproduce commands,
> > 1. git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git --recursive
> > 2. need to install some tools before build,
> > https://github.com/riscv-collab/riscv-gnu-toolchain#prerequisites
> > 3. git checkout branches of gcc, binutils and glibc to the branches
> > mentioned above
> > 4. cd <patch-to-build-folder>
> > 5. <patch-to-riscv-gnu-toolchain>configure
> > --prefix=<patch-to-build-folder>build-install --with-arch=rv64gc
> > 6. make report-gcc-linux -j32
>
> Instead of me trying to go through this (at least part of which looks like
> it won't really fit my normal environment; among other things I would also
> prefer to work from upstream gcc, not any RISC-V clone thereof), could you
> provide me with the detailed gcc.log and g++.log from the run (I know
> they're huge, so you may want to upload them somewhere, or you might simply
> extract relevant fragments)? Of course if it would be the complete logs,
> then I would also need to know which, if any, FAILs are pre-existing.
>
> From what you write it also doesn't look as if glibc was necessary to
> include.
>
> Jan
More information about the Binutils
mailing list