mbox series

[v3,0/8] RISC-V glibc port for the 32-bit

Message ID cover.1532587497.git.zong@andestech.com
Headers show
Series RISC-V glibc port for the 32-bit | expand

Message

Zong Li July 26, 2018, 2:16 p.m. UTC
This patch set contains the glibc port for the 32-bit RISC-V.

In this version, it is almost similar with version two. I change the
ABI version to 2.29 and re-gen the abilist, additionally, the nofpu
directories is merged. According to Joseph, it doesn't result in a
difference for RV32 versus RV64 in RISC-V port, so I merge them first.

I ran the glibc test suite on QEMU system mode, the test result is
listed below. It's worth noting that the math test cases, there are
some failure in math testing, I can't point out the issue right now,
these math test cases failed for a variety of reasons when 'make check'
and 'make regen-ulps', such as sNaN operation, exception, a big
difference calculated result and so on. On my environment, there are
also failure in some math cases on 64-bit port, I need to check the
glibc port and code generation.

I'm not provide the all *.out and *.test-result files in this version,
because I think there are still some failure in math cases. I think
these patches pick all suggestion in previous version. Palmer will
continue to clean up ABI for next version.

Notice:
This patch set is depend on the patch
'soft-fp: Add the lack of implementation for 128 bit self-contained.',
it is necessary for building 32-bit RISC-V port.

Thanks Joseph, Palmer, DJ and Richard for help and review during
this work.

Following is the testing result:

[FAIL case]
These test cases are clarified on 64-bit in 2.27 release.
 - elf/tst-tls12
 - malloc/tst-malloc-thread-fail
 - malloc/tst-malloc-usable-tunables
 - nptl/test-cond-printers
 - nptl/test-condattr-printers
 - nptl/test-mutex-printers
 - nptl/test-mutexattr-printers
 - nptl/test-rwlock-printers
 - nptl/test-rwlockattr-printers
 - resolv/tst-resolv-res_init
 - resolv/tst-resolv-res_init-thread
These math cases
 - math/test-*

[TIMEOUT case]
These test cases are PASS by adding TIMEOUTFACTOR.
 - elf/tst-tls13
 - iconvdata/tst-loading
 - libio/tst-fopenloc
 - libio/tst-fopenloc-cmp
 - localedata/tst-leaks
 - malloc/tst-dynarray
 - malloc/tst-dynarray-fail
 - malloc/tst-malloc-tcache-leak
 - misc/tst-error1
 - nptl/tst-cond24
 - nptl/tst-rwlock15
 - nptl/tst-stack4
 - nptl/tst-stackguard1
 - nss/tst-nss-files-hosts-multi
 - posix/tst-fnmatch
 - posix/tst-glob-tilde
 - posix/tst-vfork3

[MEMORY LIMITATION]
These test cases need to more memory size, sort-test is PASS
by adding memory size.
 - localedata/sort-test
 - stdio-common/bug22

[PASS case]
All the test cases except list in the fail cases.

Change in V3:
 - Merge rv32/nofpu and rv64/nofpu directories
 - Remove ulp files of nofpu of 32-bit
 - Re-gen abilist for 2.29
 - Change section to 2.29 in NEWS

Change in V2:
 - Only include the ieee754/soft-fp path in rv32/nofpu/Implies.
 - Add lack of implementation for 128 bit in soft-ft/op-8.h.
 - Include the patch which fix the ld flags of tst-execstack-mod.so.
 - Add the modification of URL of gcc's tarball.

Zong Li (8):
  Documentation for the 32 bit RISC-V port
  RISC-V: Add dynamic loader for the 32 bit
  RISC-V: Add path of library directories for the 32 bit
  RISC-V: The ABI implementation for the 32-bit
  RISC-V: Hard float support for the 32 bit
  RISC-V: Add ABI lists
  RISC-V: Build Infastructure for the 32 bit
  Add 32 bit RISC-V to build-many-glibcs.py

 NEWS                                               |   12 +
 README                                             |    1 +
 scripts/build-many-glibcs.py                       |   15 +
 sysdeps/riscv/bits/wordsize.h                      |    4 +-
 sysdeps/riscv/nptl/bits/pthreadtypes-arch.h        |   25 +-
 sysdeps/riscv/preconfigure                         |    6 +-
 sysdeps/riscv/rv32/Implies-after                   |    1 +
 sysdeps/riscv/rv32/rvd/Implies                     |    3 +
 sysdeps/riscv/rv32/rvd/libm-test-ulps              | 1658 ++++++++++++++++
 sysdeps/riscv/rv32/rvd/libm-test-ulps-name         |    1 +
 sysdeps/riscv/rv32/rvd/s_lrint.c                   |   31 +
 sysdeps/riscv/rv32/rvd/s_lround.c                  |   31 +
 sysdeps/riscv/rv32/rvf/Implies                     |    1 +
 sysdeps/riscv/rv32/rvf/s_lrintf.c                  |   31 +
 sysdeps/riscv/rv32/rvf/s_lroundf.c                 |   31 +
 sysdeps/riscv/sfp-machine.h                        |   27 +-
 sysdeps/riscv/sys/asm.h                            |    5 +-
 sysdeps/unix/sysv/linux/riscv/Makefile             |    4 +-
 sysdeps/unix/sysv/linux/riscv/configure            |   39 +
 sysdeps/unix/sysv/linux/riscv/configure.ac         |    8 +
 sysdeps/unix/sysv/linux/riscv/dl-cache.h           |   15 +-
 sysdeps/unix/sysv/linux/riscv/ldconfig.h           |    2 +-
 sysdeps/unix/sysv/linux/riscv/rv32/Implies         |    3 +
 sysdeps/unix/sysv/linux/riscv/rv32/c++-types.data  |   67 +
 .../unix/sysv/linux/riscv/rv32/jmp_buf-macros.h    |   53 +
 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist      |    9 +
 .../sysv/linux/riscv/rv32/libBrokenLocale.abilist  |    1 +
 sysdeps/unix/sysv/linux/riscv/rv32/libanl.abilist  |    4 +
 sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist    | 2099 ++++++++++++++++++++
 .../unix/sysv/linux/riscv/rv32/libcrypt.abilist    |    2 +
 sysdeps/unix/sysv/linux/riscv/rv32/libdl.abilist   |    9 +
 sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist    | 1021 ++++++++++
 sysdeps/unix/sysv/linux/riscv/rv32/libnsl.abilist  |  120 ++
 .../unix/sysv/linux/riscv/rv32/libpthread.abilist  |  235 +++
 .../unix/sysv/linux/riscv/rv32/libresolv.abilist   |   79 +
 sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist   |   35 +
 .../sysv/linux/riscv/rv32/libthread_db.abilist     |   40 +
 sysdeps/unix/sysv/linux/riscv/rv32/libutil.abilist |    6 +
 sysdeps/unix/sysv/linux/riscv/rv32/lockf64.c       |   70 +
 sysdeps/unix/sysv/linux/riscv/shlib-versions       |   10 +-
 40 files changed, 5800 insertions(+), 14 deletions(-)
 create mode 100644 sysdeps/riscv/rv32/Implies-after
 create mode 100644 sysdeps/riscv/rv32/rvd/Implies
 create mode 100644 sysdeps/riscv/rv32/rvd/libm-test-ulps
 create mode 100644 sysdeps/riscv/rv32/rvd/libm-test-ulps-name
 create mode 100644 sysdeps/riscv/rv32/rvd/s_lrint.c
 create mode 100644 sysdeps/riscv/rv32/rvd/s_lround.c
 create mode 100644 sysdeps/riscv/rv32/rvf/Implies
 create mode 100644 sysdeps/riscv/rv32/rvf/s_lrintf.c
 create mode 100644 sysdeps/riscv/rv32/rvf/s_lroundf.c
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/Implies
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/c++-types.data
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/jmp_buf-macros.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libBrokenLocale.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libdl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libnsl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libresolv.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libthread_db.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libutil.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/lockf64.c

Comments

Joseph Myers July 26, 2018, 3:09 p.m. UTC | #1
On Thu, 26 Jul 2018, Zong Li wrote:

>  sysdeps/riscv/rv32/rvd/libm-test-ulps              | 1658 ++++++++++++++++
>  sysdeps/riscv/rv32/rvd/libm-test-ulps-name         |    1 +

I'd expect sysdeps/riscv/rv64/rvd/libm-test-ulps to move to 
sysdeps/riscv/rvd/ instead, unless you have a concrete reason why there 
should be different ulps for 32-bit and 64-bit RISC-V (and as long as you 
have unresolved math test failures, it would be hard to justify such a 
difference).
Zong Li July 27, 2018, 1:09 a.m. UTC | #2
Joseph Myers <joseph@codesourcery.com> 於 2018年7月26日 週四 下午11:09寫道:
>
> On Thu, 26 Jul 2018, Zong Li wrote:
>
> >  sysdeps/riscv/rv32/rvd/libm-test-ulps              | 1658 ++++++++++++++++
> >  sysdeps/riscv/rv32/rvd/libm-test-ulps-name         |    1 +
>
> I'd expect sysdeps/riscv/rv64/rvd/libm-test-ulps to move to
> sysdeps/riscv/rvd/ instead, unless you have a concrete reason why there
> should be different ulps for 32-bit and 64-bit RISC-V (and as long as you
> have unresolved math test failures, it would be hard to justify such a
> difference).
>
Make sense, we need to resolve math and then modify related files.