public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>
Subject: Re: [PATCH 2/2] RISC-V: adjust logic to avoid register name symbols
Date: Thu, 16 Feb 2023 17:36:23 +0800	[thread overview]
Message-ID: <CAPpQWtBuTED50=zbU6qajfbRaWqfJwReR5m3Q5fvjCTTrydUUQ@mail.gmail.com> (raw)
In-Reply-To: <c3df0014-7b23-df06-c321-1a16bd0e034b@suse.com>

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

  reply	other threads:[~2023-02-16  9:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13  8:01 [PATCH 0/2] RISC-V/gas: re-work register named symbols avoidance logic Jan Beulich
2023-02-13  8:02 ` [PATCH 1/2] RISC-V: test for expected / no unexpected symbols Jan Beulich
2023-02-13  8:02 ` [PATCH 2/2] RISC-V: adjust logic to avoid register name symbols Jan Beulich
2023-02-15  3:09   ` Nelson Chu
2023-02-15  8:03     ` Jan Beulich
2023-02-15  8:48       ` Nelson Chu
2023-02-15  9:21         ` Jan Beulich
2023-02-16  9:36           ` Nelson Chu [this message]
2023-02-16 16:49             ` Jan Beulich
2023-02-16 16:54               ` Palmer Dabbelt
2023-03-03 13:52             ` Jan Beulich
2023-03-15 10:07               ` Nelson Chu
2023-03-15 11:49                 ` Jan Beulich
2023-03-16  0:30                   ` Nelson Chu
2023-04-19  9:37                     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPpQWtBuTED50=zbU6qajfbRaWqfJwReR5m3Q5fvjCTTrydUUQ@mail.gmail.com' \
    --to=nelson@rivosinc.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=palmer@dabbelt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).