From patchwork Fri Dec 31 06:44:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: caiyinyu X-Patchwork-Id: 49419 Return-Path: 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 2650D3858038 for ; Fri, 31 Dec 2021 06:46:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 22ABE3858D39 for ; Fri, 31 Dec 2021 06:44:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 22ABE3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from 5.5.5 (unknown [10.2.5.5]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxn9Pops5hVAMAAA--.150S2; Fri, 31 Dec 2021 14:44:56 +0800 (CST) From: caiyinyu To: libc-alpha@sourceware.org Subject: [PATCH v2 00/14] GLIBC LoongArch PATCHES Date: Fri, 31 Dec 2021 14:44:41 +0800 Message-Id: <20211231064455.1030051-1-caiyinyu@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf9Dxn9Pops5hVAMAAA--.150S2 X-Coremail-Antispam: 1UD129KBjvAXoWfXr4rJw17JF45tFW8tw4fZrb_yoW5Xry3Ao WF9FW5Wr48uwsIkw1SganrX347Kr1xCa1UAay3Za98JF1rCayjgFyjkan09r9xAr98Gr45 Ga42grsrtrZrZrnxn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUY37AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xva j40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2 x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWx JVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc7CjxVAaw2AFwI0_ JF0_Jw1lc2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6Fyj6rWUJwCI42IY6I8E 87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73Uj IFyTuYvjfU5oGQDUUUU X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xuchenghua@loongson.cn, joseph_myers@mentor.com, caiyinyu@loongson.cn Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Hello, the answers are as follows, and we really need your futher suggestions: LoongArch patches v1: https://sourceware.org/pipermail/libc-alpha/2021-August/130262.html 1. Is there ABI documentation for the function-calling ABI? The ELF ABI document you link to says essentially nothing about that. LoongArch-Doc: https://github.com/loongson/LoongArch-Documentation We add new section: procedure calling convention. https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_procedure_calling_convention 2. Please provide details of the test results for the port with the glibc testsuite and the binutils / GCC / Linux kernel ports as submitted upstream (the exact versions of those components proposed for upstream, not some other version). You might need to work around some of the issues currently present building glibc with GCC mainline; if so, please state the exact patches you are using for that workaround on top of the proposed port version (you might need to use , for example). It's required that the compilation parts of the testsuite must have fully clean results. For any test failures in the rest of the testsuite, make the .out and .test-result files available, along with any analysis you have done of why those tests are failing. Source code: linux: https://github.com/loongson/linux/tree/loongarch-next binutils: https://github.com/loongson/binutils-gdb/tree/upstream_v3.1 glibc: https://github.com/loongson/glibc/tree/loongarch_2_34_for_upstream_v2.0 gcc: https://github.com/loongson/gcc/tree/loongarch_upstream_v4 test result: a. XPASS: conform/UNIX98/ndbm.h/linknamespace XPASS: conform/XOPEN2K/ndbm.h/linknamespace XPASS: conform/XOPEN2K8/ndbm.h/linknamespace XPASS: conform/XPG42/ndbm.h/linknamespace UNSUPPORTED: crypt/cert FAIL: elf/ifuncmain1 FAIL: elf/ifuncmain1pic FAIL: elf/ifuncmain1pie FAIL: elf/ifuncmain1staticpic FAIL: elf/ifuncmain1staticpie FAIL: elf/ifuncmain1vis FAIL: elf/ifuncmain1vispic FAIL: elf/ifuncmain1vispie FAIL: elf/ifuncmain3 FAIL: elf/ifuncmain4 FAIL: elf/ifuncmain6pie FAIL: elf/ifuncmain7 FAIL: elf/ifuncmain7pic FAIL: elf/ifuncmain7pie UNSUPPORTED: elf/tst-env-setuid UNSUPPORTED: elf/tst-env-setuid-tunables FAIL: elf/tst-ifunc-fault-bindnow FAIL: elf/tst-ifunc-fault-lazy XPASS: elf/tst-protected1a XPASS: elf/tst-protected1b FAIL: math/test-double-acos FAIL: math/test-double-asin FAIL: math/test-float32x-acos FAIL: math/test-float32x-asin FAIL: math/test-float64-acos FAIL: math/test-float64-asin UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: misc/tst-rseq UNSUPPORTED: misc/tst-rseq-disable UNSUPPORTED: nptl/test-cond-printers UNSUPPORTED: nptl/test-condattr-printers UNSUPPORTED: nptl/test-mutex-printers UNSUPPORTED: nptl/test-mutexattr-printers UNSUPPORTED: nptl/test-rwlock-printers UNSUPPORTED: nptl/test-rwlockattr-printers UNSUPPORTED: nptl/tst-rseq-nptl UNSUPPORTED: stdlib/tst-secure-getenv UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 22 FAIL 4488 PASS 19 UNSUPPORTED 12 XFAIL 6 XPASS b. FAIL: elf/ifuncmain1 FAIL: elf/ifuncmain1pic FAIL: elf/ifuncmain1pie FAIL: elf/ifuncmain1staticpic FAIL: elf/ifuncmain1staticpie FAIL: elf/ifuncmain1vis FAIL: elf/ifuncmain1vispic FAIL: elf/ifuncmain1vispie FAIL: elf/ifuncmain3 FAIL: elf/ifuncmain4 FAIL: elf/ifuncmain6pie FAIL: elf/ifuncmain7 FAIL: elf/ifuncmain7pic FAIL: elf/ifuncmain7pie FAIL: elf/tst-ifunc-fault-bindnow FAIL: elf/tst-ifunc-fault-lazy ifunc functions are not support yet c. FAIL: math/test-double-acos FAIL: math/test-double-asin FAIL: math/test-float32x-acos FAIL: math/test-float32x-asin FAIL: math/test-float64-acos FAIL: math/test-float64-asin These fails are caused by gcc optimizations. if we use -O0 options, these fails will pass. sysdeps/ieee754/dbl-64/e_asin.c: 343 =================================================================== 337 if (k>0x7ff00000 || (k == 0x7ff00000 && u.i[LOW_HALF] != 0)) return x + x; 0x00007ffff7f4daac <+1388>: lu12i.w $t0, 524032(0x7ff00) 0x00007ffff7f4dab0 <+1392>: blt $t0, $t2, 20(0x14) # 0x7ffff7f4dac4 <__ieee754_acos+1412> 0x00007ffff7f4dab4 <+1396>: bne $t2, $t0, 36(0x24) # 0x7ffff7f4dad8 <__ieee754_acos+1432> 0x00007ffff7f4dab8 <+1400>: ld.d $t0, $sp, 8(0x8) 0x00007ffff7f4dabc <+1404>: slli.w $t0, $t0, 0x0 0x00007ffff7f4dac0 <+1408>: beqz $t0, 24(0x18) # 0x7ffff7f4dad8 <__ieee754_acos+1432> 0x00007ffff7f4dac4 <+1412>: fld.d $fa0, $sp, 8(0x8) 0x00007ffff7f4dac8 <+1416>: fadd.d $fa0, $fa0, $fa0 0x00007ffff7f4dacc <+1420>: b -788(0xffffcec) # 0x7ffff7f4d7b8 <__ieee754_acos+632> 338 else { 339 u.i[HIGH_HALF]=0x7ff00000; 340 v.i[HIGH_HALF]=0x7ff00000; 341 u.i[LOW_HALF]=0; 342 v.i[LOW_HALF]=0; 343 return u.x/v.x; ///////// optimized out 0x00007ffff7f4dad8 <+1432>: pcaddu12i $t0, 63(0x3f) 0x00007ffff7f4dadc <+1436>: addi.d $t0, $t0, -1248(0xb20) 0x00007ffff7f4dae0 <+1440>: fld.d $fa0, $t0, 0 0x00007ffff7f4dae4 <+1444>: b -812(0xffffcd4) # 0x7ffff7f4d7b8 <__ieee754_acos+632> 344 } 345 } 0x00007ffff7f4d7b8 <+632>: addi.d $sp, $sp, 16(0x10) 0x00007ffff7f4d7bc <+636>: jirl $zero, $ra, 0 0x00007ffff7f4d7cc <+652>: addi.d $sp, $sp, 16(0x10) 0x00007ffff7f4d7d0 <+656>: jirl $zero, $ra, 0 0x00007ffff7f4d8bc <+892>: addi.d $sp, $sp, 16(0x10) 0x00007ffff7f4d8c0 <+896>: jirl $zero, $ra, 0 =================================================================== 3. I see there's an upstream submission (not yet committed upstream) of QEMU support for LoongArch, could you describe the status of that? (See "There is no requirement for a CPU simulator (free software, e.g. QEMU, or otherwise) to be available, but if one is available, it is useful to mention in the summary message (along with any information on available OS etc. that might help people set up an environment for testing things about the port)." on the NewPorts page.) We are donating machine to the GCC Compile Farm Project 4. What ABIs are supported for the port? You mention 32-bit doesn't work (so it would be best to remove that code until it's ready), so only 64-bit ABIs are supported. Is a soft-float ABI supported, or only hard-float? You have __loongarch_soft_float or __loongarch_hard_float conditionals in some places, but other things suggest only hard float is supported (the lack of any with_fp_cond definition in your preconfigure fragment, in particular). Apart from conventional 32-bit and 64-bit ABIs, there's the question of whether you have or intend to have an ILP32 ABI that uses 64-bit registers and the 64-bit instruction set (like x32 for x86_64); there's no need to have such an ABI, but if you do plan to have one, you need to be very careful about what you mean when you say "32-bit" or "64-bit", to make it clear whether such an ILP32 ABI is included or not. add loongarch 5. There needs to be at least one entry added to build-many-glibcs.py for each ABI supported by the port. Now we only support 64-bit hard-float ABI. 6. You're making local changes to config.sub and config.guess. Don't do that; the latest versions from config.git should be imported instead, with no local changes, outside of the patch series adding the port. corrected 7. This patch series is missing NEWS and README updates. corrected 8. We don't use "Contributed by" any more in new source files. You can put such information in the NEWS entry for the addition of the port, and in contrib.texi (the latter listing relevant individuals, not companies), instead. corrected 9. Note that new source files should have a one-line description above the copyright notice. corrected 10. Note the need for a manual/math.texi update in the list of configurations supporting _Float128. not support yet 11. Florian has already noted that GLIBC_2.35 should be the minimum ABI version for the port. This has other implications beyond the DEFAULT setting in shlib-versions. You're adding some entries to sysdeps/unix/sysv/linux/loongarch/Versions with old symbol versions; those should not be present (some of the GLIBC_2.0 entries are for libgcc functions only relevant for extremely old glibc ports). If you need any Versions entries at all, they should be either GLIBC_PRIVATE or GLIBC_2.35, and you should be able to give an explicit justification for why such an entry is needed (i.e. the function would not be exported at all without the entry, and either is part of the architecture-independent glibc API, or is needed as an architecture-specific function or a GLIBC_PRIVATE function). corrected 12. For each ABI supported by the port (see point 4 above) you need a unique dynamic linker name (not used by any existing ABI listed at ; probably mentioning the architecture name somewhere in the dynamic linker name), as specified with ld= in shlib-versions. You have an ldd_rewrite_script setting that only makes sense with such names (and only makes sense when multiple ABIs are supported in the same root filesystem, see for more details of what's needed for such support), but I don't see anything to actually implement such names. Note the need for the dynamic linker names to be consistent in GCC and glibc. corrected 13. arch_minimum_kernel should be set to 10.0.0 until the actual upstream kernel version that gets the port is known, and then to the actual upstream version (so 5.14.0 or later). Accordingly, kernel-features.h should not have any "before 4.20" conditionals in it (so you don't need an architecture-specific kernel-features.h at all). corrected 14. Regarding the optimized functions in patches 12 to 14, see the last point on the NewPorts page regarding considering carefully (possibly with benchmarking) whether such functions are actually beneficial compared to the current generic C versions - and, if beneficial compared to the current generic C versions, whether helping to get the improved generic functions linked from that page into glibc would avoid the need for some or all of the architecture-specific implementations. optimized function string/memset/memcpy/memmove/sinf/cosf removed Source code: LoongArch-Doc: https://github.com/loongson/LoongArch-Documentation linux: https://github.com/loongson/linux/tree/loongarch-next binutils: https://github.com/loongson/binutils-gdb/tree/upstream_v3.1 glibc: https://github.com/loongson/glibc/tree/loongarch_2_34_for_upstream_v2.0 gcc: https://github.com/loongson/gcc/tree/loongarch_upstream_v4 caiyinyu (14): LoongArch: Update NEWS and README for the LoongArch port. LoongArch: Add LoongArch entries to config.h.in LoongArch: Add relocations and ELF flags to elf.h LoongArch: ABI Implementation LoongArch: Thread-Local Storage Support LoongArch: Generic and soft-fp Routines LoongArch: Atomic and Locking Routines LoongArch: Linux Syscall Interface LoongArch: Linux ABI LoongArch: Linux Startup and Dynamic Loading Code LoongArch: Add ABI Lists LoongArch: Build Infastructure LoongArch: Hard Float Support LoongArch: Update build-many-glibcs.py for the LoongArch Port. NEWS | 2 + README | 1 + config.h.in | 6 + elf/elf.h | 72 +- scripts/build-many-glibcs.py | 5 + sysdeps/loongarch/Implies | 5 + sysdeps/loongarch/Makefile | 15 + sysdeps/loongarch/__longjmp.S | 52 + sysdeps/loongarch/abort-instr.h | 2 + sysdeps/loongarch/bits/endianness.h | 11 + sysdeps/loongarch/bits/fenv.h | 90 + sysdeps/loongarch/bits/link.h | 58 + sysdeps/loongarch/bits/setjmp.h | 42 + sysdeps/loongarch/bits/wordsize.h | 25 + sysdeps/loongarch/bsd-_setjmp.c | 1 + sysdeps/loongarch/bsd-setjmp.c | 1 + sysdeps/loongarch/configure | 4 + sysdeps/loongarch/configure.ac | 6 + sysdeps/loongarch/dl-irel.h | 48 + sysdeps/loongarch/dl-machine.h | 368 +++ sysdeps/loongarch/dl-tls.h | 46 + sysdeps/loongarch/dl-trampoline.S | 103 + sysdeps/loongarch/e_sqrtl.c | 38 + sysdeps/loongarch/fpu/e_sqrt.c | 26 + sysdeps/loongarch/fpu/e_sqrtf.c | 26 + sysdeps/loongarch/fpu/fclrexcpt.c | 46 + sysdeps/loongarch/fpu/fedisblxcpt.c | 39 + sysdeps/loongarch/fpu/feenablxcpt.c | 39 + sysdeps/loongarch/fpu/fegetenv.c | 31 + sysdeps/loongarch/fpu/fegetexcept.c | 32 + sysdeps/loongarch/fpu/fegetmode.c | 27 + sysdeps/loongarch/fpu/fegetround.c | 33 + sysdeps/loongarch/fpu/feholdexcpt.c | 40 + sysdeps/loongarch/fpu/fenv_libc.h | 30 + sysdeps/loongarch/fpu/fesetenv.c | 42 + sysdeps/loongarch/fpu/fesetexcept.c | 32 + sysdeps/loongarch/fpu/fesetmode.c | 38 + sysdeps/loongarch/fpu/fesetround.c | 44 + sysdeps/loongarch/fpu/feupdateenv.c | 43 + sysdeps/loongarch/fpu/fgetexcptflg.c | 38 + sysdeps/loongarch/fpu/fraiseexcpt.c | 75 + sysdeps/loongarch/fpu/fsetexcptflg.c | 41 + sysdeps/loongarch/fpu/ftestexcept.c | 32 + sysdeps/loongarch/fpu_control.h | 102 + sysdeps/loongarch/gccframe.h | 21 + sysdeps/loongarch/hp-timing.h | 42 + sysdeps/loongarch/jmpbuf-offsets.h | 22 + sysdeps/loongarch/jmpbuf-unwind.h | 45 + sysdeps/loongarch/ldsodefs.h | 41 + sysdeps/loongarch/libc-start.h | 25 + sysdeps/loongarch/libc-tls.c | 32 + sysdeps/loongarch/linkmap.h | 4 + sysdeps/loongarch/lp64/Implies-after | 1 + sysdeps/loongarch/lp64/libm-test-ulps | 1411 +++++++++++ sysdeps/loongarch/lp64/libm-test-ulps-name | 1 + sysdeps/loongarch/machine-gmon.h | 37 + sysdeps/loongarch/math_private.h | 248 ++ sysdeps/loongarch/memusage.h | 25 + sysdeps/loongarch/nptl/Makefile | 26 + .../loongarch/nptl/bits/pthreadtypes-arch.h | 41 + sysdeps/loongarch/nptl/bits/semaphore.h | 32 + sysdeps/loongarch/nptl/bits/struct_rwlock.h | 44 + sysdeps/loongarch/nptl/libc-lowlevellock.c | 8 + sysdeps/loongarch/nptl/nptl-sysdep.S | 2 + sysdeps/loongarch/nptl/pthread-offsets.h | 15 + sysdeps/loongarch/nptl/pthreaddef.h | 32 + sysdeps/loongarch/nptl/tcb-offsets.sym | 6 + sysdeps/loongarch/nptl/tls.h | 138 ++ sysdeps/loongarch/preconfigure | 47 + sysdeps/loongarch/setjmp.S | 66 + sysdeps/loongarch/sfp-machine.h | 102 + sysdeps/loongarch/sotruss-lib.c | 50 + sysdeps/loongarch/stackinfo.h | 33 + sysdeps/loongarch/start.S | 70 + sysdeps/loongarch/sys/asm.h | 58 + sysdeps/loongarch/sys/regdef.h | 98 + sysdeps/loongarch/tininess.h | 1 + sysdeps/loongarch/tls-macros.h | 49 + sysdeps/loongarch/tst-audit.h | 23 + sysdeps/unix/sysv/linux/loongarch/Implies | 1 + sysdeps/unix/sysv/linux/loongarch/Makefile | 11 + .../unix/sysv/linux/loongarch/arch-syscall.h | 302 +++ .../sysv/linux/loongarch/atomic-machine.h | 196 ++ .../unix/sysv/linux/loongarch/bits/fcntl.h | 61 + sysdeps/unix/sysv/linux/loongarch/bits/mman.h | 42 + .../linux/loongarch/bits/pthread_stack_min.h | 20 + .../sysv/linux/loongarch/bits/sigcontext.h | 54 + .../unix/sysv/linux/loongarch/bits/signum.h | 58 + .../unix/sysv/linux/loongarch/bits/sigstack.h | 32 + sysdeps/unix/sysv/linux/loongarch/clone.S | 100 + sysdeps/unix/sysv/linux/loongarch/clone3.S | 87 + sysdeps/unix/sysv/linux/loongarch/configure | 199 ++ .../unix/sysv/linux/loongarch/configure.ac | 27 + sysdeps/unix/sysv/linux/loongarch/dl-static.c | 80 + .../unix/sysv/linux/loongarch/getcontext.S | 74 + sysdeps/unix/sysv/linux/loongarch/ipc_priv.h | 22 + sysdeps/unix/sysv/linux/loongarch/ldconfig.h | 30 + .../unix/sysv/linux/loongarch/ldd-rewrite.sed | 3 + sysdeps/unix/sysv/linux/loongarch/ldsodefs.h | 33 + .../unix/sysv/linux/loongarch/localplt.data | 12 + .../unix/sysv/linux/loongarch/lp64/Implies | 3 + .../sysv/linux/loongarch/lp64/c++-types.data | 67 + .../linux/loongarch/lp64/fpu/jmp_buf-macros.h | 44 + .../unix/sysv/linux/loongarch/lp64/ld.abilist | 8 + .../loongarch/lp64/libBrokenLocale.abilist | 1 + .../sysv/linux/loongarch/lp64/libanl.abilist | 1 + .../sysv/linux/loongarch/lp64/libc.abilist | 2137 +++++++++++++++++ .../loongarch/lp64/libc_malloc_debug.abilist | 26 + .../linux/loongarch/lp64/libcrypt.abilist | 2 + .../sysv/linux/loongarch/lp64/libdl.abilist | 0 .../sysv/linux/loongarch/lp64/libm.abilist | 1033 ++++++++ .../sysv/linux/loongarch/lp64/libnsl.abilist | 120 + .../linux/loongarch/lp64/libpthread.abilist | 0 .../linux/loongarch/lp64/libresolv.abilist | 55 + .../sysv/linux/loongarch/lp64/librt.abilist | 0 .../linux/loongarch/lp64/libthread_db.abilist | 40 + .../sysv/linux/loongarch/lp64/libutil.abilist | 1 + .../loongarch/lp64/nofpu/jmp_buf-macros.h | 41 + .../unix/sysv/linux/loongarch/makecontext.c | 79 + .../unix/sysv/linux/loongarch/register-dump.h | 61 + .../unix/sysv/linux/loongarch/setcontext.S | 115 + .../unix/sysv/linux/loongarch/shlib-versions | 7 + .../sysv/linux/loongarch/sigcontextinfo.h | 32 + .../unix/sysv/linux/loongarch/swapcontext.S | 123 + .../unix/sysv/linux/loongarch/sys/procfs.h | 134 ++ .../unix/sysv/linux/loongarch/sys/ucontext.h | 90 + sysdeps/unix/sysv/linux/loongarch/sys/user.h | 32 + sysdeps/unix/sysv/linux/loongarch/syscall.c | 35 + sysdeps/unix/sysv/linux/loongarch/sysdep.S | 53 + sysdeps/unix/sysv/linux/loongarch/sysdep.h | 321 +++ .../sysv/linux/loongarch/ucontext-macros.h | 42 + .../unix/sysv/linux/loongarch/ucontext_i.sym | 33 + sysdeps/unix/sysv/linux/loongarch/vfork.S | 50 + 133 files changed, 10982 insertions(+), 1 deletion(-) create mode 100644 sysdeps/loongarch/Implies create mode 100644 sysdeps/loongarch/Makefile create mode 100644 sysdeps/loongarch/__longjmp.S create mode 100644 sysdeps/loongarch/abort-instr.h create mode 100644 sysdeps/loongarch/bits/endianness.h create mode 100644 sysdeps/loongarch/bits/fenv.h create mode 100644 sysdeps/loongarch/bits/link.h create mode 100644 sysdeps/loongarch/bits/setjmp.h create mode 100644 sysdeps/loongarch/bits/wordsize.h create mode 100644 sysdeps/loongarch/bsd-_setjmp.c create mode 100644 sysdeps/loongarch/bsd-setjmp.c create mode 100644 sysdeps/loongarch/configure create mode 100644 sysdeps/loongarch/configure.ac create mode 100644 sysdeps/loongarch/dl-irel.h create mode 100644 sysdeps/loongarch/dl-machine.h create mode 100644 sysdeps/loongarch/dl-tls.h create mode 100644 sysdeps/loongarch/dl-trampoline.S create mode 100644 sysdeps/loongarch/e_sqrtl.c create mode 100644 sysdeps/loongarch/fpu/e_sqrt.c create mode 100644 sysdeps/loongarch/fpu/e_sqrtf.c create mode 100644 sysdeps/loongarch/fpu/fclrexcpt.c create mode 100644 sysdeps/loongarch/fpu/fedisblxcpt.c create mode 100644 sysdeps/loongarch/fpu/feenablxcpt.c create mode 100644 sysdeps/loongarch/fpu/fegetenv.c create mode 100644 sysdeps/loongarch/fpu/fegetexcept.c create mode 100644 sysdeps/loongarch/fpu/fegetmode.c create mode 100644 sysdeps/loongarch/fpu/fegetround.c create mode 100644 sysdeps/loongarch/fpu/feholdexcpt.c create mode 100644 sysdeps/loongarch/fpu/fenv_libc.h create mode 100644 sysdeps/loongarch/fpu/fesetenv.c create mode 100644 sysdeps/loongarch/fpu/fesetexcept.c create mode 100644 sysdeps/loongarch/fpu/fesetmode.c create mode 100644 sysdeps/loongarch/fpu/fesetround.c create mode 100644 sysdeps/loongarch/fpu/feupdateenv.c create mode 100644 sysdeps/loongarch/fpu/fgetexcptflg.c create mode 100644 sysdeps/loongarch/fpu/fraiseexcpt.c create mode 100644 sysdeps/loongarch/fpu/fsetexcptflg.c create mode 100644 sysdeps/loongarch/fpu/ftestexcept.c create mode 100644 sysdeps/loongarch/fpu_control.h create mode 100644 sysdeps/loongarch/gccframe.h create mode 100644 sysdeps/loongarch/hp-timing.h create mode 100644 sysdeps/loongarch/jmpbuf-offsets.h create mode 100644 sysdeps/loongarch/jmpbuf-unwind.h create mode 100644 sysdeps/loongarch/ldsodefs.h create mode 100644 sysdeps/loongarch/libc-start.h create mode 100644 sysdeps/loongarch/libc-tls.c create mode 100644 sysdeps/loongarch/linkmap.h create mode 100644 sysdeps/loongarch/lp64/Implies-after create mode 100644 sysdeps/loongarch/lp64/libm-test-ulps create mode 100644 sysdeps/loongarch/lp64/libm-test-ulps-name create mode 100644 sysdeps/loongarch/machine-gmon.h create mode 100644 sysdeps/loongarch/math_private.h create mode 100644 sysdeps/loongarch/memusage.h create mode 100644 sysdeps/loongarch/nptl/Makefile create mode 100644 sysdeps/loongarch/nptl/bits/pthreadtypes-arch.h create mode 100644 sysdeps/loongarch/nptl/bits/semaphore.h create mode 100644 sysdeps/loongarch/nptl/bits/struct_rwlock.h create mode 100644 sysdeps/loongarch/nptl/libc-lowlevellock.c create mode 100644 sysdeps/loongarch/nptl/nptl-sysdep.S create mode 100644 sysdeps/loongarch/nptl/pthread-offsets.h create mode 100644 sysdeps/loongarch/nptl/pthreaddef.h create mode 100644 sysdeps/loongarch/nptl/tcb-offsets.sym create mode 100644 sysdeps/loongarch/nptl/tls.h create mode 100644 sysdeps/loongarch/preconfigure create mode 100644 sysdeps/loongarch/setjmp.S create mode 100644 sysdeps/loongarch/sfp-machine.h create mode 100644 sysdeps/loongarch/sotruss-lib.c create mode 100644 sysdeps/loongarch/stackinfo.h create mode 100644 sysdeps/loongarch/start.S create mode 100644 sysdeps/loongarch/sys/asm.h create mode 100644 sysdeps/loongarch/sys/regdef.h create mode 100644 sysdeps/loongarch/tininess.h create mode 100644 sysdeps/loongarch/tls-macros.h create mode 100644 sysdeps/loongarch/tst-audit.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/Implies create mode 100644 sysdeps/unix/sysv/linux/loongarch/Makefile create mode 100644 sysdeps/unix/sysv/linux/loongarch/arch-syscall.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/atomic-machine.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/mman.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/pthread_stack_min.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/sigcontext.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/signum.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/sigstack.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/clone.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/clone3.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/configure create mode 100644 sysdeps/unix/sysv/linux/loongarch/configure.ac create mode 100644 sysdeps/unix/sysv/linux/loongarch/dl-static.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/ipc_priv.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ldd-rewrite.sed create mode 100644 sysdeps/unix/sysv/linux/loongarch/ldsodefs.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/localplt.data create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/Implies create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/c++-types.data create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/fpu/jmp_buf-macros.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libc_malloc_debug.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libnsl.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libutil.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/jmp_buf-macros.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/register-dump.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/shlib-versions create mode 100644 sysdeps/unix/sysv/linux/loongarch/sigcontextinfo.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/sys/procfs.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/sys/user.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/syscall.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ucontext-macros.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ucontext_i.sym create mode 100644 sysdeps/unix/sysv/linux/loongarch/vfork.S