Message ID | 20200522113633.209664-1-shorne@gmail.com (mailing list archive) |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2D9DC385DC1C; Fri, 22 May 2020 11:36:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D9DC385DC1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1590147406; bh=2GJr+O6nbmus8RxYs9i3CZ/8vMiZZK9SfKHXeD5y8OM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=s38s173A5FWW6pMlq7OO/BvGa3EXwJrt0C/kAh+oZMWYx9OWgENthM2DZDtYOmtV4 ZtqH+45N9UaMhL14eYuUbEOEBJ8aWT9l/ntY/RLzpsGn52Om7hSdhKXJ4BBbZLvDkZ EHUEcLE/EB/3vBlWtMTTrNNpYaTjoG7kObeFCsDs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by sourceware.org (Postfix) with ESMTPS id 42B5F385DC1C for <libc-alpha@sourceware.org>; Fri, 22 May 2020 11:36:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 42B5F385DC1C Received: by mail-pg1-x542.google.com with SMTP id f6so4900061pgm.1 for <libc-alpha@sourceware.org>; Fri, 22 May 2020 04:36:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2GJr+O6nbmus8RxYs9i3CZ/8vMiZZK9SfKHXeD5y8OM=; b=RWN/K9XQVu8qViuhTdtJSMfGKcpREmY3aIpL/HEfKp6PYhV1cuRSPMSH/29+9uI/1B UPJ9kOScENNIv2ZKW5B/isbYCbmuv6qvhr+gVyiOhd4nQeE3KKjN6cdozJDp8Vlo6zyf WfMvJixmZTzs5CHowuL3c+vahcSF6qyig4YDKKOG0gvWH1IMTG800oE8THdH8xGi2pzL 3lQWuUvZAUR1FyCYx0P1W34GClj2udL4BLjFR6dTPZVE97Iz8QZyV0cvOClwjavL57xj +gnbcFV7HhCkk7pmCuQl4aj7TTY6a4n3GyfRB7UgP1I32qI+ecsNQrDUUQqj67HFp1qJ mrXA== X-Gm-Message-State: AOAM531p/qLjBlw/QCyIfJ1+W/BZ4yfmh1uHRzzzhG1hWG1abpdlpbuC S6tViF+86iEabobpgZSogF1lbB3G X-Google-Smtp-Source: ABdhPJz+W8+WMLXJL81tV7ysWCeEgJQYVbi0u9EH+XivZggagLKC4TZy29wV5YRtNO2lFXhJg7ruxA== X-Received: by 2002:a05:6a00:843:: with SMTP id q3mr3369215pfk.107.1590147398769; Fri, 22 May 2020 04:36:38 -0700 (PDT) Received: from localhost (g228.115-65-196.ppp.wakwak.ne.jp. [115.65.196.228]) by smtp.gmail.com with ESMTPSA id 1sm6948760pff.180.2020.05.22.04.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 04:36:37 -0700 (PDT) To: GLIBC patches <libc-alpha@sourceware.org> Subject: [PATCH 0/1] OpenRISC port Date: Fri, 22 May 2020 20:36:32 +0900 Message-Id: <20200522113633.209664-1-shorne@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <http://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <http://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Stafford Horne via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Stafford Horne <shorne@gmail.com> Cc: Openrisc <openrisc@lists.librecores.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
OpenRISC port
|
|
Message
Stafford Horne
May 22, 2020, 11:36 a.m. UTC
Hi All, This is the patch for the OpenRISC port of glibc. DEVELOPMENT The original patch was put together by Christian Scensson a few years ago. I have taken the patch and finished all of the TODO items and run and fixed all of the test failures. BUILDING and TESTING Testing has been done with the qemu OpenRISC simulator using the build and run scripts found here: - https://github.com/stffrdhrn/or1k-utils/tree/master/glibc Running the tests I found a few issues with binutils, gcc and the OpenRISC architecture as well, patches for binutils are upstream and gcc should be upstream soon: - Binutils: use latest master - GCC: https://github.com/stffrdhrn/gcc/commits/or1k-glibc-1 - QEMU: https://github.com/stffrdhrn/qemu/commits/or1k-glibc (FPU issues) TEST RESULTS Pretty much all tests are passing however there are several math (fpu) tests which are failing due to issues with setting underflow/overflow flags. These seem consistent with issues reported by other architectures. Is there a known issue here? I can provide more details. -Stafford Christian Svensson (1): Initial support for OpenRISC elf/elf.h | 37 + sysdeps/or1k/Implies | 4 + sysdeps/or1k/Makefile | 7 + sysdeps/or1k/__longjmp.S | 55 + sysdeps/or1k/atomic-machine.h | 77 + sysdeps/or1k/bits/atomic.h | 51 + sysdeps/or1k/bits/endianness.h | 11 + sysdeps/or1k/bits/fenv.h | 79 + sysdeps/or1k/bits/link.h | 51 + sysdeps/or1k/bits/setjmp.h | 36 + sysdeps/or1k/bsd-_setjmp.S | 1 + sysdeps/or1k/bsd-setjmp.S | 1 + sysdeps/or1k/dl-machine.h | 339 +++ sysdeps/or1k/dl-start.S | 101 + sysdeps/or1k/dl-tls.h | 28 + sysdeps/or1k/dl-trampoline.S | 82 + sysdeps/or1k/fpu/fclrexcpt.c | 41 + sysdeps/or1k/fpu/fegetenv.c | 32 + sysdeps/or1k/fpu/fegetmode.c | 27 + sysdeps/or1k/fpu/fegetround.c | 34 + sysdeps/or1k/fpu/feholdexcpt.c | 41 + sysdeps/or1k/fpu/fesetenv.c | 35 + sysdeps/or1k/fpu/fesetexcept.c | 32 + sysdeps/or1k/fpu/fesetmode.c | 42 + sysdeps/or1k/fpu/fesetround.c | 44 + sysdeps/or1k/fpu/feupdateenv.c | 44 + sysdeps/or1k/fpu/fgetexcptflg.c | 37 + sysdeps/or1k/fpu/fraiseexcpt.c | 82 + sysdeps/or1k/fpu/fsetexcptflg.c | 40 + sysdeps/or1k/fpu/ftestexcept.c | 32 + sysdeps/or1k/fpu/get-rounding-mode.h | 38 + sysdeps/or1k/fpu_control.h | 49 + sysdeps/or1k/jmpbuf-offsets.h | 23 + sysdeps/or1k/jmpbuf-unwind.h | 35 + sysdeps/or1k/ldsodefs.h | 40 + sysdeps/or1k/libc-tls.c | 32 + sysdeps/or1k/libm-test-ulps | 1107 +++++++++ sysdeps/or1k/libm-test-ulps-name | 1 + sysdeps/or1k/machine-gmon.h | 24 + sysdeps/or1k/math-tests-trap.h | 27 + sysdeps/or1k/memusage.h | 20 + sysdeps/or1k/nofpu/Implies | 1 + sysdeps/or1k/nofpu/math-tests-exceptions.h | 29 + sysdeps/or1k/nofpu/math-tests-rounding.h | 28 + sysdeps/or1k/nptl/Makefile | 21 + sysdeps/or1k/nptl/bits/pthreadtypes-arch.h | 48 + sysdeps/or1k/nptl/bits/semaphore.h | 34 + sysdeps/or1k/nptl/pthreaddef.h | 32 + sysdeps/or1k/nptl/tcb-offsets.sym | 6 + sysdeps/or1k/nptl/tls.h | 193 ++ sysdeps/or1k/preconfigure | 38 + sysdeps/or1k/setjmp.S | 56 + sysdeps/or1k/sfp-machine.h | 102 + sysdeps/or1k/sotruss-lib.c | 51 + sysdeps/or1k/stackinfo.h | 33 + sysdeps/or1k/start.S | 116 + sysdeps/or1k/sysdep.h | 77 + sysdeps/or1k/tininess.h | 1 + sysdeps/or1k/tls-macros.h | 82 + sysdeps/or1k/tst-audit.h | 24 + sysdeps/unix/sysv/linux/or1k/Implies | 3 + sysdeps/unix/sysv/linux/or1k/Makefile | 12 + sysdeps/unix/sysv/linux/or1k/arch-syscall.h | 315 +++ sysdeps/unix/sysv/linux/or1k/bits/fcntl.h | 49 + sysdeps/unix/sysv/linux/or1k/bits/mman.h | 44 + sysdeps/unix/sysv/linux/or1k/c++-types.data | 67 + sysdeps/unix/sysv/linux/or1k/clone.c | 59 + sysdeps/unix/sysv/linux/or1k/configure | 4 + sysdeps/unix/sysv/linux/or1k/configure.ac | 4 + sysdeps/unix/sysv/linux/or1k/getcontext.S | 72 + sysdeps/unix/sysv/linux/or1k/ioctl.c | 40 + sysdeps/unix/sysv/linux/or1k/jmp_buf-macros.h | 41 + .../unix/sysv/linux/or1k/kernel-features.h | 24 + sysdeps/unix/sysv/linux/or1k/ld.abilist | 5 + .../sysv/linux/or1k/libBrokenLocale.abilist | 1 + sysdeps/unix/sysv/linux/or1k/libanl.abilist | 4 + sysdeps/unix/sysv/linux/or1k/libc.abilist | 2081 +++++++++++++++++ sysdeps/unix/sysv/linux/or1k/libcrypt.abilist | 2 + sysdeps/unix/sysv/linux/or1k/libdl.abilist | 9 + sysdeps/unix/sysv/linux/or1k/libm.abilist | 699 ++++++ sysdeps/unix/sysv/linux/or1k/libnsl.abilist | 121 + .../unix/sysv/linux/or1k/libpthread.abilist | 216 ++ .../unix/sysv/linux/or1k/libresolv.abilist | 79 + sysdeps/unix/sysv/linux/or1k/librt.abilist | 35 + .../unix/sysv/linux/or1k/libthread_db.abilist | 40 + sysdeps/unix/sysv/linux/or1k/libutil.abilist | 6 + sysdeps/unix/sysv/linux/or1k/localplt.data | 13 + sysdeps/unix/sysv/linux/or1k/lowlevellock.h | 23 + sysdeps/unix/sysv/linux/or1k/makecontext.c | 77 + sysdeps/unix/sysv/linux/or1k/mmap_internal.h | 29 + sysdeps/unix/sysv/linux/or1k/or1k_clone.S | 112 + sysdeps/unix/sysv/linux/or1k/prctl.c | 41 + sysdeps/unix/sysv/linux/or1k/pt-vfork.c | 30 + sysdeps/unix/sysv/linux/or1k/setcontext.S | 110 + sysdeps/unix/sysv/linux/or1k/shlib-versions | 2 + sysdeps/unix/sysv/linux/or1k/sigcontextinfo.h | 28 + sysdeps/unix/sysv/linux/or1k/swapcontext.S | 116 + sysdeps/unix/sysv/linux/or1k/sys/procfs.h | 120 + sysdeps/unix/sysv/linux/or1k/sys/ucontext.h | 48 + sysdeps/unix/sysv/linux/or1k/sys/user.h | 1 + sysdeps/unix/sysv/linux/or1k/syscall.c | 45 + sysdeps/unix/sysv/linux/or1k/sysdep.c | 33 + sysdeps/unix/sysv/linux/or1k/sysdep.h | 167 ++ sysdeps/unix/sysv/linux/or1k/ucontext_i.sym | 26 + sysdeps/unix/sysv/linux/syscall-names.list | 1 + 105 files changed, 8945 insertions(+) create mode 100644 sysdeps/or1k/Implies create mode 100644 sysdeps/or1k/Makefile create mode 100644 sysdeps/or1k/__longjmp.S create mode 100644 sysdeps/or1k/atomic-machine.h create mode 100644 sysdeps/or1k/bits/atomic.h create mode 100644 sysdeps/or1k/bits/endianness.h create mode 100644 sysdeps/or1k/bits/fenv.h create mode 100644 sysdeps/or1k/bits/link.h create mode 100644 sysdeps/or1k/bits/setjmp.h create mode 100644 sysdeps/or1k/bsd-_setjmp.S create mode 100644 sysdeps/or1k/bsd-setjmp.S create mode 100644 sysdeps/or1k/dl-machine.h create mode 100644 sysdeps/or1k/dl-start.S create mode 100644 sysdeps/or1k/dl-tls.h create mode 100644 sysdeps/or1k/dl-trampoline.S create mode 100644 sysdeps/or1k/fpu/fclrexcpt.c create mode 100644 sysdeps/or1k/fpu/fegetenv.c create mode 100644 sysdeps/or1k/fpu/fegetmode.c create mode 100644 sysdeps/or1k/fpu/fegetround.c create mode 100644 sysdeps/or1k/fpu/feholdexcpt.c create mode 100644 sysdeps/or1k/fpu/fesetenv.c create mode 100644 sysdeps/or1k/fpu/fesetexcept.c create mode 100644 sysdeps/or1k/fpu/fesetmode.c create mode 100644 sysdeps/or1k/fpu/fesetround.c create mode 100644 sysdeps/or1k/fpu/feupdateenv.c create mode 100644 sysdeps/or1k/fpu/fgetexcptflg.c create mode 100644 sysdeps/or1k/fpu/fraiseexcpt.c create mode 100644 sysdeps/or1k/fpu/fsetexcptflg.c create mode 100644 sysdeps/or1k/fpu/ftestexcept.c create mode 100644 sysdeps/or1k/fpu/get-rounding-mode.h create mode 100644 sysdeps/or1k/fpu_control.h create mode 100644 sysdeps/or1k/jmpbuf-offsets.h create mode 100644 sysdeps/or1k/jmpbuf-unwind.h create mode 100644 sysdeps/or1k/ldsodefs.h create mode 100644 sysdeps/or1k/libc-tls.c create mode 100644 sysdeps/or1k/libm-test-ulps create mode 100644 sysdeps/or1k/libm-test-ulps-name create mode 100644 sysdeps/or1k/machine-gmon.h create mode 100644 sysdeps/or1k/math-tests-trap.h create mode 100644 sysdeps/or1k/memusage.h create mode 100644 sysdeps/or1k/nofpu/Implies create mode 100644 sysdeps/or1k/nofpu/math-tests-exceptions.h create mode 100644 sysdeps/or1k/nofpu/math-tests-rounding.h create mode 100644 sysdeps/or1k/nptl/Makefile create mode 100644 sysdeps/or1k/nptl/bits/pthreadtypes-arch.h create mode 100644 sysdeps/or1k/nptl/bits/semaphore.h create mode 100644 sysdeps/or1k/nptl/pthreaddef.h create mode 100644 sysdeps/or1k/nptl/tcb-offsets.sym create mode 100644 sysdeps/or1k/nptl/tls.h create mode 100644 sysdeps/or1k/preconfigure create mode 100644 sysdeps/or1k/setjmp.S create mode 100644 sysdeps/or1k/sfp-machine.h create mode 100644 sysdeps/or1k/sotruss-lib.c create mode 100644 sysdeps/or1k/stackinfo.h create mode 100644 sysdeps/or1k/start.S create mode 100644 sysdeps/or1k/sysdep.h create mode 100644 sysdeps/or1k/tininess.h create mode 100644 sysdeps/or1k/tls-macros.h create mode 100644 sysdeps/or1k/tst-audit.h create mode 100644 sysdeps/unix/sysv/linux/or1k/Implies create mode 100644 sysdeps/unix/sysv/linux/or1k/Makefile create mode 100644 sysdeps/unix/sysv/linux/or1k/arch-syscall.h create mode 100644 sysdeps/unix/sysv/linux/or1k/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/or1k/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/or1k/c++-types.data create mode 100644 sysdeps/unix/sysv/linux/or1k/clone.c create mode 100644 sysdeps/unix/sysv/linux/or1k/configure create mode 100644 sysdeps/unix/sysv/linux/or1k/configure.ac create mode 100644 sysdeps/unix/sysv/linux/or1k/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/or1k/ioctl.c create mode 100644 sysdeps/unix/sysv/linux/or1k/jmp_buf-macros.h create mode 100644 sysdeps/unix/sysv/linux/or1k/kernel-features.h create mode 100644 sysdeps/unix/sysv/linux/or1k/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/or1k/localplt.data create mode 100644 sysdeps/unix/sysv/linux/or1k/lowlevellock.h create mode 100644 sysdeps/unix/sysv/linux/or1k/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/or1k/mmap_internal.h create mode 100644 sysdeps/unix/sysv/linux/or1k/or1k_clone.S create mode 100644 sysdeps/unix/sysv/linux/or1k/prctl.c create mode 100644 sysdeps/unix/sysv/linux/or1k/pt-vfork.c create mode 100644 sysdeps/unix/sysv/linux/or1k/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/or1k/shlib-versions create mode 100644 sysdeps/unix/sysv/linux/or1k/sigcontextinfo.h create mode 100644 sysdeps/unix/sysv/linux/or1k/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/or1k/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/or1k/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/or1k/sys/user.h create mode 100644 sysdeps/unix/sysv/linux/or1k/syscall.c create mode 100644 sysdeps/unix/sysv/linux/or1k/sysdep.c create mode 100644 sysdeps/unix/sysv/linux/or1k/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/or1k/ucontext_i.sym
Comments
On Fri, 22 May 2020, Stafford Horne via Libc-alpha wrote: > Hi All, > > This is the patch for the OpenRISC port of glibc. Please see <https://sourceware.org/glibc/wiki/NewPorts> for information to include in a new port submission. That includes pointing to architecture and ABI manuals. > The original patch was put together by Christian Scensson a few years ago. I > have taken the patch and finished all of the TODO items and run and fixed all of > the test failures. Do you mean Christian Svensson? (There's a copyright assignment from Christian Svensson for GCC GLIBC BINUTILS from 2014.) > TEST RESULTS > > Pretty much all tests are passing however there are several math (fpu) tests > which are failing due to issues with setting underflow/overflow flags. These There should not be any such failures with a correct port and architecture implementation. > I can provide more details. Full test results should be provided (see the above mentioned wiki page).
On Fri, May 22, 2020 at 06:52:20PM +0000, Joseph Myers wrote: > On Fri, 22 May 2020, Stafford Horne via Libc-alpha wrote: > > > Hi All, > > > > This is the patch for the OpenRISC port of glibc. > > Please see <https://sourceware.org/glibc/wiki/NewPorts> for information to > include in a new port submission. That includes pointing to architecture > and ABI manuals. Thank you for the pointers, I will include this in v2. But the architecture manual is here: - Page: https://openrisc.io/architecture - PDF: https://raw.githubusercontent.com/openrisc/doc/master/openrisc-arch-1.3-rev1.pdf - Architecture Revision Required for Full Hard Float support: - https://openrisc.io/proposals/p17-user-mode-fpcsr > > The original patch was put together by Christian Scensson a few years ago. I > > have taken the patch and finished all of the TODO items and run and fixed all of > > the test failures. > > Do you mean Christian Svensson? (There's a copyright assignment from > Christian Svensson for GCC GLIBC BINUTILS from 2014.) Yes Christian Svensson, sorry for the typo. He is listed in the changelog on the patch. > > > TEST RESULTS > > > > Pretty much all tests are passing however there are several math (fpu) tests > > which are failing due to issues with setting underflow/overflow flags. These > > There should not be any such failures with a correct port and architecture > implementation. OK, I will look into it again. The last I remember there was somethign strange happening with underflow exception not being set in the GCC FPU emulation code. Note, the OpenRISC implementation I tested with has only 32-bit FPU hard support. This meant that C API for log/cos/sin etc which internally are defined to use 64-bit double's all end up using emulation. > > I can provide more details. > > Full test results should be provided (see the above mentioned wiki page). I will do with the next round of patches. This is all very helpful. -Stafford