summaryrefslogtreecommitdiff
path: root/libc/string
diff options
context:
space:
mode:
authorVincent Ren-Wei Chen <vincentc@andestech.com>2017-01-17 07:31:24 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-22 10:06:29 +0100
commit6af3332a4cbd1ffbc81f74759ef7c5e1a87d2e10 (patch)
tree4deae5f23fd1e2664f21c09dfb57fda799dffd10 /libc/string
parent82af21a60bc6e53dd92c1c140f20179d2ae4ad40 (diff)
nds32: add NPTL/TLS, *context function, libm changes and code cleanup
This commit includes following features. 1. Support NPTL/TLS 2. Add libm function which is used to handle FP rounding and excpetions (ex: fclrexcpt,fedisblxcpti,feenablxcpt... ) 3. Add *context function for operating user context (ex: setcontext,getcontext,makecontext... ) 4. Change the return flow from signal handler 5. Cleanup of old code The testsuite only has 2 errors, tst-cpuclock1 and tst-cputimer1, which are related to timing accuracy. (math and locale tests are disabled) Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
Diffstat (limited to 'libc/string')
-rw-r--r--libc/string/nds32/memcpy.S22
-rw-r--r--libc/string/nds32/memset.S2
2 files changed, 22 insertions, 2 deletions
diff --git a/libc/string/nds32/memcpy.S b/libc/string/nds32/memcpy.S
index 4f285b5ee..4da2c83ea 100644
--- a/libc/string/nds32/memcpy.S
+++ b/libc/string/nds32/memcpy.S
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Andes Technology, Inc.
+ * Copyright (C) 2016-2017 Andes Technology, Inc.
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
@@ -54,12 +54,32 @@ ENTRY(memcpy)
srli $r3, $r2, #5
beqz $r3, .Lword_copy_entry
pushm $r6, $r13
+ cfi_adjust_cfa_offset(32)
+ cfi_rel_offset(r6, 0)
+ cfi_rel_offset(r7, 4)
+ cfi_rel_offset(r8, 8)
+ cfi_rel_offset(r9, 12)
+ cfi_rel_offset(r10, 16)
+ cfi_rel_offset(r11, 20)
+ cfi_rel_offset(r12, 24)
+ cfi_rel_offset(r13, 28)
+
.L3:
lmw.bim $r6, [$r1], $r13
addi $r3, $r3, #-1
smw.bim $r6, [$r0], $r13
bnez $r3, .L3
popm $r6, $r13
+ cfi_adjust_cfa_offset(-32)
+ cfi_restore(r6)
+ cfi_restore(r7)
+ cfi_restore(r8)
+ cfi_restore(r9)
+ cfi_restore(r10)
+ cfi_restore(r11)
+ cfi_restore(r12)
+ cfi_restore(r13)
+
.Lword_copy_entry:
andi $r2, $r2, #31
diff --git a/libc/string/nds32/memset.S b/libc/string/nds32/memset.S
index edd15a410..ba208f6cf 100644
--- a/libc/string/nds32/memset.S
+++ b/libc/string/nds32/memset.S
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Andes Technology, Inc.
+ * Copyright (C) 2016-2017 Andes Technology, Inc.
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/