CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Wed Jun 30 21:20:30 UTC 2021 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S src/lib/libc/arch/arm/sys: __clone.S Log Message: Do previous differtly by pushing two registers in the same way as the _INVOKE_CERROR macro To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/arm/gen/swapcontext.S cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/arm/sys/__clone.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.17 src/lib/libc/arch/arm/gen/swapcontext.S:1.18 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.17 Wed Jun 30 00:00:49 2021 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Jun 30 21:20:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.17 2021/06/30 00:00:49 rin Exp $ */ +/* $NetBSD: swapcontext.S,v 1.18 2021/06/30 21:20:29 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.17 2021/06/30 00:00:49 rin Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.18 2021/06/30 21:20:29 skrll Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -84,15 +84,9 @@ ENTRY(swapcontext) #if !defined(__thumb__) || defined(_ARM_ARCH_T2) b PLT_SYM(_C_LABEL(setcontext)) #else - push {lr} - mov r1, sp - subs r1, #4 - mov sp, r1 + push {r3, lr} bl PLT_SYM(_C_LABEL(setcontext)) - mov r1, sp - adds r1, #4 - mov sp, r1 - pop {pc} + pop {r3, pc} #endif #if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_endproc Index: src/lib/libc/arch/arm/sys/__clone.S diff -u src/lib/libc/arch/arm/sys/__clone.S:1.13 src/lib/libc/arch/arm/sys/__clone.S:1.14 --- src/lib/libc/arch/arm/sys/__clone.S:1.13 Wed Jun 30 07:36:05 2021 +++ src/lib/libc/arch/arm/sys/__clone.S Wed Jun 30 21:20:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.13 2021/06/30 07:36:05 skrll Exp $ */ +/* $NetBSD: __clone.S,v 1.14 2021/06/30 21:20:30 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -117,14 +117,8 @@ ENTRY(__clone) b CERROR #else .Lcerror: - push {lr} - mov r1, sp - subs r1, #4 - mov sp, r1 + push {r3, lr} bl CERROR - mov r1, sp - adds r1, #4 - mov sp, r1 - pop {pc} + pop {r3, pc} #endif END(__clone)
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: skrll Date: Wed Jun 30 07:36:05 UTC 2021 Modified Files: src/lib/libc/arch/arm/sys: __clone.S Log Message: The _INVOKE_CERROR macro deals with thumb so simplify the code (at the expense of a couple more instructions). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/sys/__clone.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__clone.S diff -u src/lib/libc/arch/arm/sys/__clone.S:1.12 src/lib/libc/arch/arm/sys/__clone.S:1.13 --- src/lib/libc/arch/arm/sys/__clone.S:1.12 Wed Jun 30 07:34:24 2021 +++ src/lib/libc/arch/arm/sys/__clone.S Wed Jun 30 07:36:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.12 2021/06/30 07:34:24 skrll Exp $ */ +/* $NetBSD: __clone.S,v 1.13 2021/06/30 07:36:05 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -65,11 +65,7 @@ ENTRY(__clone) mov r0, r2 SYSTRAP(__clone) -#if !defined(__thumb__) || defined(_ARM_ARCH_T2) _INVOKE_CERROR() -#else - bcs .Lcerror -#endif /* * r1 and r0 are the same as from fork:
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: skrll Date: Wed Jun 30 07:34:24 UTC 2021 Modified Files: src/lib/libc/arch/arm/sys: __clone.S Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/sys/__clone.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__clone.S diff -u src/lib/libc/arch/arm/sys/__clone.S:1.11 src/lib/libc/arch/arm/sys/__clone.S:1.12 --- src/lib/libc/arch/arm/sys/__clone.S:1.11 Wed Jun 30 00:00:49 2021 +++ src/lib/libc/arch/arm/sys/__clone.S Wed Jun 30 07:34:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.11 2021/06/30 00:00:49 rin Exp $ */ +/* $NetBSD: __clone.S,v 1.12 2021/06/30 07:34:24 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -55,12 +55,12 @@ ENTRY(__clone) /* place the func and its arg onto the child's stack */ #if !defined(__thumb__) || defined(_ARM_ARCH_T2) - stmfd r1!, {r0, r3} + stmfd r1!, {r0, r3} #else subs r1, r1, #8 - stmia r1!, {r0, r3} + stmia r1!, {r0, r3} #endif - + /* syscall expects (flags, stack) */ mov r0, r2
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: rin Date: Wed Jun 30 00:00:49 UTC 2021 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S src/lib/libc/arch/arm/sys: __clone.S Log Message: Fix previous. For Thumb-1: - sp cannot be manipulated directly - {add,sub}s should be used instead of {add,sub} To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/arch/arm/gen/swapcontext.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/sys/__clone.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.16 src/lib/libc/arch/arm/gen/swapcontext.S:1.17 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.16 Tue Jun 29 23:29:12 2021 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Jun 30 00:00:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $ */ +/* $NetBSD: swapcontext.S,v 1.17 2021/06/30 00:00:49 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.17 2021/06/30 00:00:49 rin Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -85,9 +85,13 @@ ENTRY(swapcontext) b PLT_SYM(_C_LABEL(setcontext)) #else push {lr} - sub sp, #4 + mov r1, sp + subs r1, #4 + mov sp, r1 bl PLT_SYM(_C_LABEL(setcontext)) - add sp, #4 + mov r1, sp + adds r1, #4 + mov sp, r1 pop {pc} #endif #if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) Index: src/lib/libc/arch/arm/sys/__clone.S diff -u src/lib/libc/arch/arm/sys/__clone.S:1.10 src/lib/libc/arch/arm/sys/__clone.S:1.11 --- src/lib/libc/arch/arm/sys/__clone.S:1.10 Tue Jun 29 23:29:12 2021 +++ src/lib/libc/arch/arm/sys/__clone.S Wed Jun 30 00:00:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.10 2021/06/29 23:29:12 rin Exp $ */ +/* $NetBSD: __clone.S,v 1.11 2021/06/30 00:00:49 rin Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -122,9 +122,13 @@ ENTRY(__clone) #else .Lcerror: push {lr} - sub sp, #4 + mov r1, sp + subs r1, #4 + mov sp, r1 bl CERROR - add sp, #4 + mov r1, sp + adds r1, #4 + mov sp, r1 pop {pc} #endif END(__clone)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: rin Date: Tue Jun 29 23:29:12 UTC 2021 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S src/lib/libc/arch/arm/sys: __clone.S Log Message: Align sp to 8-byte boundary as required by EABI. IIUC, this change only affects libc compiled for ``Thumb-mode userland'', which we've not officially supported yet. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/arch/arm/gen/swapcontext.S cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/sys/__clone.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.15 src/lib/libc/arch/arm/gen/swapcontext.S:1.16 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.15 Wed Nov 21 21:01:41 2018 +++ src/lib/libc/arch/arm/gen/swapcontext.S Tue Jun 29 23:29:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -85,7 +85,9 @@ ENTRY(swapcontext) b PLT_SYM(_C_LABEL(setcontext)) #else push {lr} + sub sp, #4 bl PLT_SYM(_C_LABEL(setcontext)) + add sp, #4 pop {pc} #endif #if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) Index: src/lib/libc/arch/arm/sys/__clone.S diff -u src/lib/libc/arch/arm/sys/__clone.S:1.9 src/lib/libc/arch/arm/sys/__clone.S:1.10 --- src/lib/libc/arch/arm/sys/__clone.S:1.9 Sat Nov 30 20:20:42 2013 +++ src/lib/libc/arch/arm/sys/__clone.S Tue Jun 29 23:29:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.9 2013/11/30 20:20:42 joerg Exp $ */ +/* $NetBSD: __clone.S,v 1.10 2021/06/29 23:29:12 rin Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -122,7 +122,9 @@ ENTRY(__clone) #else .Lcerror: push {lr} + sub sp, #4 bl CERROR + add sp, #4 pop {pc} #endif END(__clone)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Sat Oct 24 07:03:12 UTC 2020 Modified Files: src/lib/libc/arch/arm: genassym.cf Log Message: Provide _UC_REGS_* defines for all registers To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/arm/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/genassym.cf diff -u src/lib/libc/arch/arm/genassym.cf:1.2 src/lib/libc/arch/arm/genassym.cf:1.3 --- src/lib/libc/arch/arm/genassym.cf:1.2 Tue Apr 30 12:24:31 2013 +++ src/lib/libc/arch/arm/genassym.cf Sat Oct 24 07:03:11 2020 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.2 2013/04/30 12:24:31 skrll Exp $ +# $NetBSD: genassym.cf,v 1.3 2020/10/24 07:03:11 skrll Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -33,5 +33,18 @@ include include define _UC_REGS_R0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R0]) +define _UC_REGS_R1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R1]) +define _UC_REGS_R2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R2]) +define _UC_REGS_R3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R3]) +define _UC_REGS_R4 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R4]) +define _UC_REGS_R5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R5]) +define _UC_REGS_R6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R6]) +define _UC_REGS_R7 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R7]) +define _UC_REGS_R8 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R8]) +define _UC_REGS_R9 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R9]) +define _UC_REGS_R10 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R10]) +define _UC_REGS_R11 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R11]) +define _UC_REGS_R12 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R12]) define _UC_REGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) +define _UC_REGS_LR offsetof(ucontext_t, uc_mcontext.__gregs[_REG_LR]) define _UC_REGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Wed Nov 21 21:01:41 UTC 2018 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Fix a comment To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.14 src/lib/libc/arch/arm/gen/swapcontext.S:1.15 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.14 Sat Nov 30 20:20:42 2013 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Nov 21 21:01:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.14 2013/11/30 20:20:42 joerg Exp $ */ +/* $NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.14 2013/11/30 20:20:42 joerg Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -70,7 +70,7 @@ ENTRY(swapcontext) #endif #if !defined(__thumb__) str sp, [r0, #_UC_REGS_SP] /* Adjust saved SP. */ - str lr, [r0, #_UC_REGS_PC] /* Adjust saved SP. */ + str lr, [r0, #_UC_REGS_PC] /* Adjust saved PC. */ #else mov r2, sp str r2, [r0, #_UC_REGS_SP] /* Adjust saved SP. */
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: pooka Date: Thu Aug 20 16:13:41 UTC 2015 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: In rumprun mode on ARM, don't build syscall or signal code into libc. (like on x86) To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.27 src/lib/libc/arch/arm/Makefile.inc:1.28 --- src/lib/libc/arch/arm/Makefile.inc:1.27 Wed Jan 29 23:37:18 2014 +++ src/lib/libc/arch/arm/Makefile.inc Thu Aug 20 16:13:40 2015 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.27 2014/01/29 23:37:18 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.28 2015/08/20 16:13:40 pooka Exp $ .include +.if ${RUMPRUN} != "yes" SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +.endif .if empty(LIBC_MACHINE_ARCH:Mearmv7*) AFLAGS+= -marm
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: joerg Date: Thu Jan 23 00:00:16 UTC 2014 Modified Files: src/lib/libc/arch/arm/hardfloat: fpsetmask.S Log Message: One vmsr is enough. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/hardfloat/fpsetmask.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/hardfloat/fpsetmask.S diff -u src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.6 src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.7 --- src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.6 Fri Jan 11 13:55:26 2013 +++ src/lib/libc/arch/arm/hardfloat/fpsetmask.S Thu Jan 23 00:00:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.S,v 1.6 2013/01/11 13:55:26 matt Exp $ */ +/* $NetBSD: fpsetmask.S,v 1.7 2014/01/23 00:00:16 joerg Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -52,7 +52,6 @@ ENTRY(fpsetmask) bic r1, r1, #VFP_FPSCR_ESUM orr r1, r1, r2, lsl #8 vmsr fpscr, r1 - mcr p10, 7, r1, c1, c0, 0 and r0, r0, #VFP_FPSCR_CSUM RET END(fpsetmask)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: joerg Date: Fri Jan 17 22:20:04 UTC 2014 Removed Files: src/lib/libc/arch/arm/gen: fabs.c Log Message: GC To generate a diff of this commit: cvs rdiff -u -r1.3 -r0 src/lib/libc/arch/arm/gen/fabs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: joerg Date: Fri Jan 17 22:19:46 UTC 2014 Modified Files: src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: Makefile.inc Added Files: src/lib/libc/arch/arm/hardfloat: fabs_ieee754.S Removed Files: src/lib/libc/arch/arm/hardfloat: fabs.S Log Message: Use generic version of fabs for softfloat. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r1.26 -r1.27 src/lib/libc/arch/arm/gen/Makefile.inc cvs rdiff -u -r1.2 -r0 src/lib/libc/arch/arm/hardfloat/fabs.S cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/hardfloat/fabs_ieee754.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.25 src/lib/libc/arch/arm/Makefile.inc:1.26 --- src/lib/libc/arch/arm/Makefile.inc:1.25 Tue Sep 3 00:30:19 2013 +++ src/lib/libc/arch/arm/Makefile.inc Fri Jan 17 22:19:46 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2013/09/03 00:30:19 matt Exp $ +# $NetBSD: Makefile.inc,v 1.26 2014/01/17 22:19:46 joerg Exp $ .include @@ -30,7 +30,7 @@ SOFTFLOAT_BITS=32 .include .else .PATH : ${ARCHDIR}/hardfloat -SRCS.hardfloat+= fpgetround.c fpgetsticky.S fpgetmask.S +SRCS.hardfloat+= fpgetround.c fpgetsticky.S fpgetmask.S fabs_ieee754.S SRCS.hardfloat+= fpsetround.c fpsetmask.S fpsetsticky.S .for f in ${SRCS.hardfloat} CPPFLAGS.${f} += -mfpu=vfp Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.26 src/lib/libc/arch/arm/gen/Makefile.inc:1.27 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.26 Wed Dec 25 22:05:12 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Fri Jan 17 22:19:46 2014 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.26 2013/12/25 22:05:12 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.27 2014/01/17 22:19:46 joerg Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ - fabs.c flt_rounds.c udivsi3.S + fabs_ieee754.c flt_rounds.c udivsi3.S CPUFLAGS.divide.S+= -marm Added files: Index: src/lib/libc/arch/arm/hardfloat/fabs_ieee754.S diff -u /dev/null src/lib/libc/arch/arm/hardfloat/fabs_ieee754.S:1.1 --- /dev/null Fri Jan 17 22:19:46 2014 +++ src/lib/libc/arch/arm/hardfloat/fabs_ieee754.S Fri Jan 17 22:19:46 2014 @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +RCSID("$NetBSD: fabs_ieee754.S,v 1.1 2014/01/17 22:19:46 joerg Exp $") + + .fpu vfp + +ENTRY(fabsl) +ENTRY(fabs) + vabs.f64 d0, d0 + RET +END(fabs)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: joerg Date: Wed Dec 25 22:05:12 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: Explicitly enable FPU support. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.25 src/lib/libc/arch/arm/gen/Makefile.inc:1.26 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.25 Wed Aug 21 03:09:39 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Wed Dec 25 22:05:12 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2013/08/21 03:09:39 matt Exp $ +# $NetBSD: Makefile.inc,v 1.26 2013/12/25 22:05:12 joerg Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ fabs.c flt_rounds.c udivsi3.S @@ -20,6 +20,9 @@ SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c SRCS+= modsi3.S umodsi3.S .endif +AFLAGS._setjmp.S= -mfpu=vfp +AFLAGS.setjmp.S= -mfpu=vfp + SRCS+= nanf.c SRCS+= setjmp.S
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: joerg Date: Sat Nov 30 22:39:04 UTC 2013 Modified Files: src/lib/libc/arch/arm/hardfloat: fabs.S Log Message: fabsl alias. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/hardfloat/fabs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/hardfloat/fabs.S diff -u src/lib/libc/arch/arm/hardfloat/fabs.S:1.1 src/lib/libc/arch/arm/hardfloat/fabs.S:1.2 --- src/lib/libc/arch/arm/hardfloat/fabs.S:1.1 Sun Feb 3 07:14:41 2013 +++ src/lib/libc/arch/arm/hardfloat/fabs.S Sat Nov 30 22:39:04 2013 @@ -29,10 +29,11 @@ #include -RCSID("$NetBSD: fabs.S,v 1.1 2013/02/03 07:14:41 matt Exp $") +RCSID("$NetBSD: fabs.S,v 1.2 2013/11/30 22:39:04 joerg Exp $") .fpu vfp +ENTRY(fabsl) ENTRY(fabs) vabs.f64 d0, d0 RET
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Mon Oct 21 08:28:14 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S Log Message: Fix bug introduced in revision 1.13 which meant longjmp would never work on EABI where VFP didn't exist. Hi gimpy! To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/arm/gen/_setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.14 src/lib/libc/arch/arm/gen/_setjmp.S:1.15 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.14 Thu Sep 12 15:36:15 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Mon Oct 21 08:28:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.14 2013/09/12 15:36:15 joerg Exp $ */ +/* $NetBSD: _setjmp.S,v 1.15 2013/10/21 08:28:14 skrll Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -135,6 +135,7 @@ ENTRY(_longjmp) vldmia r3, {d8-d15} ldr r3, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r3 +1: #endif /* __ARM_EABI__ && (_ARM_ARCH_T2 || !__thumb__) */ adds r0, r0, #(_JB_REG_R4 * 4)
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: matt Date: Sun Sep 8 13:15:54 UTC 2013 Modified Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: detect whether hw divide is present. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u src/lib/libc/arch/arm/misc/arm_initfini.c:1.6 src/lib/libc/arch/arm/misc/arm_initfini.c:1.7 --- src/lib/libc/arch/arm/misc/arm_initfini.c:1.6 Sun Sep 8 12:11:56 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Sun Sep 8 13:15:53 2013 @@ -29,7 +29,7 @@ #include -__RCSID("$NetBSD: arm_initfini.c,v 1.6 2013/09/08 12:11:56 matt Exp $"); +__RCSID("$NetBSD: arm_initfini.c,v 1.7 2013/09/08 13:15:53 matt Exp $"); #include "namespace.h" @@ -47,7 +47,9 @@ __RCSID("$NetBSD: arm_initfini.c,v 1.6 2 #include __dso_hidden int _libc_arm_fpu_present; +#ifndef __ARM_ARCH_EXT_IDIV__ __dso_hidden int _libc_arm_hwdiv_present; +#endif static bool _libc_aapcs_initialized; void _libc_aapcs_init(void) __attribute__((__constructor__, __used__)); @@ -60,7 +62,9 @@ _libc_aapcs_init(void) _libc_aapcs_initialized = true; (void)sysctlbyname("machdep.fpu_present", &_libc_arm_fpu_present, &len, NULL, 0); +#ifndef __ARM_ARCH_EXT_IDIV__ (void)sysctlbyname("machdep.hwdiv_present", &_libc_arm_hwdiv_present, &len, NULL, 0); +#endif } }
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: matt Date: Sun Sep 8 12:11:56 UTC 2013 Modified Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: Detect presence of hardware divide. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u src/lib/libc/arch/arm/misc/arm_initfini.c:1.5 src/lib/libc/arch/arm/misc/arm_initfini.c:1.6 --- src/lib/libc/arch/arm/misc/arm_initfini.c:1.5 Mon Aug 19 22:14:37 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Sun Sep 8 12:11:56 2013 @@ -29,7 +29,7 @@ #include -__RCSID("$NetBSD: arm_initfini.c,v 1.5 2013/08/19 22:14:37 matt Exp $"); +__RCSID("$NetBSD: arm_initfini.c,v 1.6 2013/09/08 12:11:56 matt Exp $"); #include "namespace.h" @@ -47,6 +47,7 @@ __RCSID("$NetBSD: arm_initfini.c,v 1.5 2 #include __dso_hidden int _libc_arm_fpu_present; +__dso_hidden int _libc_arm_hwdiv_present; static bool _libc_aapcs_initialized; void _libc_aapcs_init(void) __attribute__((__constructor__, __used__)); @@ -59,5 +60,7 @@ _libc_aapcs_init(void) _libc_aapcs_initialized = true; (void)sysctlbyname("machdep.fpu_present", &_libc_arm_fpu_present, &len, NULL, 0); + (void)sysctlbyname("machdep.hwdiv_present", + &_libc_arm_hwdiv_present, &len, NULL, 0); } }
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Sep 4 23:08:29 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Fix the .cfi correctly. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.12 src/lib/libc/arch/arm/gen/swapcontext.S:1.13 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.12 Wed Sep 4 22:38:09 2013 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Sep 4 23:08:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.12 2013/09/04 22:38:09 htodd Exp $ */ +/* $NetBSD: swapcontext.S,v 1.13 2013/09/04 23:08:29 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.12 2013/09/04 22:38:09 htodd Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.13 2013/09/04 23:08:29 matt Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -52,9 +52,11 @@ ENTRY(swapcontext) #endif bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 -#if !defined(__thumb__) && defined(__UNWIND_TABLES__) +#if !defined(__thumb__) pop {r0-r2, lr} +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_def_cfa_offset 0 +#endif RETc(ne) #else pop {r0-r3}
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: htodd Date: Wed Sep 4 22:38:09 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Fix build by matching .cfi/#if. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.11 src/lib/libc/arch/arm/gen/swapcontext.S:1.12 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.11 Wed Sep 4 21:17:15 2013 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Sep 4 22:38:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $ */ +/* $NetBSD: swapcontext.S,v 1.12 2013/09/04 22:38:09 htodd Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.12 2013/09/04 22:38:09 htodd Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -52,7 +52,7 @@ ENTRY(swapcontext) #endif bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 -#if !defined(__thumb__) +#if !defined(__thumb__) && defined(__UNWIND_TABLES__) pop {r0-r2, lr} .cfi_def_cfa_offset 0 RETc(ne)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Wed Sep 4 21:17:15 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S src/lib/libc/arch/arm/sys: cerror.S Log Message: only emit cfi if __ARM_EABI__ && __UNWIND_TABLES__ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/gen/swapcontext.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/sys/cerror.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.10 src/lib/libc/arch/arm/gen/swapcontext.S:1.11 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.10 Tue Sep 3 00:30:19 2013 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Sep 4 21:17:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.10 2013/09/03 00:30:19 matt Exp $ */ +/* $NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,19 +33,23 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.10 2013/09/03 00:30:19 matt Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .fnstart .cfi_startproc +#endif push {r0-r2, lr} /* Must save oucp, ucp, lr. */ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .save {r0-r2, lr} .cfi_def_cfa_offset 16 .cfi_offset 14, -4 .cfi_offset 2, -8 .cfi_offset 1, -12 .cfi_offset 0, -16 +#endif bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 #if !defined(__thumb__) @@ -55,8 +59,10 @@ ENTRY(swapcontext) #else pop {r0-r3} beq 1f +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_def_cfa_offset 0 .cfi_register 14, 3 +#endif RETr(r3) 1: #endif @@ -80,6 +86,8 @@ ENTRY(swapcontext) bl PIC_SYM(_C_LABEL(setcontext), PLT) pop {pc} #endif +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_endproc .fnend +#endif END(swapcontext) Index: src/lib/libc/arch/arm/sys/cerror.S diff -u src/lib/libc/arch/arm/sys/cerror.S:1.10 src/lib/libc/arch/arm/sys/cerror.S:1.11 --- src/lib/libc/arch/arm/sys/cerror.S:1.10 Tue Sep 3 00:30:19 2013 +++ src/lib/libc/arch/arm/sys/cerror.S Wed Sep 4 21:17:15 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.10 2013/09/03 00:30:19 matt Exp $ */ +/* $NetBSD: cerror.S,v 1.11 2013/09/04 21:17:15 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,12 +35,12 @@ ENTRY_NP(CERROR) #ifdef _REENTRANT -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .fnstart .cfi_startproc #endif push {r4, lr} -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .save {r4, lr} .cfi_def_cfa_offset 8 .cfi_offset 14, -4 @@ -57,12 +57,12 @@ ENTRY_NP(CERROR) #endif mov r1, r0 pop {r4, pc} -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_endproc .fnend #endif #else /* !_REENTRANT */ -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .fnstart .cfi_startproc #endif @@ -84,7 +84,7 @@ ENTRY_NP(CERROR) #endif /* __thumb__ */ mov r1, r0 RET -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__) .cfi_endproc .fnend #endif
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Tue Sep 3 00:30:20 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S sigsetjmp.S swapcontext.S src/lib/libc/arch/arm/sys: __clone.S __vfork14.S brk.S cerror.S getcontext.S ptrace.S sbrk.S Log Message: Use less got, add END(), make thumb tolerant. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/arm/gen/setjmp.S cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/sigsetjmp.S cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/gen/swapcontext.S cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/sys/__clone.S cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/sys/__vfork14.S \ src/lib/libc/arch/arm/sys/cerror.S src/lib/libc/arch/arm/sys/getcontext.S \ src/lib/libc/arch/arm/sys/ptrace.S cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/sys/brk.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/sys/sbrk.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.24 src/lib/libc/arch/arm/Makefile.inc:1.25 --- src/lib/libc/arch/arm/Makefile.inc:1.24 Wed Aug 21 03:09:08 2013 +++ src/lib/libc/arch/arm/Makefile.inc Tue Sep 3 00:30:19 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.24 2013/08/21 03:09:08 matt Exp $ +# $NetBSD: Makefile.inc,v 1.25 2013/09/03 00:30:19 matt Exp $ .include @@ -24,6 +24,7 @@ CPPFLAGS += -DSOFTFLOAT # for earm, use the 64-bit softfloat .if ${LIBC_MACHINE_ARCH} == "arm" || ${LIBC_MACHINE_ARCH} == "armeb" SOFTFLOAT_BITS=32 +#SRCS+= floatunsidf_ieee754.c floatunsisf_ieee754.c .endif .include Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.12 src/lib/libc/arch/arm/gen/_setjmp.S:1.13 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.12 Fri Apr 19 13:45:45 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Tue Sep 3 00:30:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.12 2013/04/19 13:45:45 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.13 2013/09/03 00:30:19 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -36,7 +36,7 @@ #error FPA is not supported anymore #endif -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP) .fpu vfp #endif @@ -59,77 +59,135 @@ ENTRY(_setjmp) ldr r1, .L_setjmp_magic -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && (!defined(__thumb__) || defined(_ARM_ARCH_T2)) ldr r2, .Lfpu_present #ifdef PIC - GOT_INIT(r3, .L_setjmp_got, .L_setjmp_gotinit) - ldr r2, [r2, r3] -#else - ldr r2, [r2] + add r2, r2, pc /* pc = &.LPIC0 */ #endif - teq r2, #0 /* do we have a FPU? */ + ldr r2, [r2] +.LPIC0: +#if defined(__thumb__) && defined(_ARM_ARCH_T2) + cbz r2, 1f +#else + cmp r2, #0 /* do we have a FPU? */ beq 1f /* no, don't save VFP registers */ +#endif - orr r1, r1, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) + orrs r1, r1, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) /* change magic to VFP magic */ - add r2, r0, #(_JB_REG_D8 * 4) + adds r2, r0, #(_JB_REG_D8 * 4) vstmia r2, {d8-d15} vmrs r2, fpscr str r2, [r0, #(_JB_REG_FPSCR * 4)] 1: -#endif /* __ARM_EABI__ */ +#endif /* __ARM_EABI__ && (_ARM_ARCH_T2 || !__thumb__) */ str r1, [r0] - add r0, r0, #(_JB_REG_R4 * 4) + adds r0, r0, #(_JB_REG_R4 * 4) /* Store integer registers */ +#if !defined(__thumb__) || defined(_ARCH_ARCH_T2) stmia r0, {r4-r14} +#else +stmia r0!, {r4-r7} + mov r1, r8 + mov r2, r9 + mov r3, r10 + stmia r0!, {r1-r3} + mov r2, r11 + mov r3, r12 + stmia r0!, {r2-r3} + mov r2, sp + mov r3, lr + stmia r0!, {r2-r3} +#endif -mov r0, #0x +movs r0, #0 RET -.L_setjmp_magic: - .word _JB_MAGIC__SETJMP -#ifdef __ARM_EABI__ - GOT_INITSYM(.L_setjmp_got, .L_setjmp_gotinit) +#if defined(__ARM_EABI__) && (!defined(__thumb__) || defined(_ARM_ARCH_T2)) + .align 0 .Lfpu_present: - .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) -#endif /* __ARM_EABI__ */ + .word REL_SYM(_libc_arm_fpu_present, .LPIC0) +#endif /* __ARM_EABI__ && (_ARM_ARCH_T2 || !__thumb__) */ +END(_setjmp) ENTRY(_longjmp) ldr r2, [r0] /* get magic from jmp_buf */ - bic r3, r2, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) +#if !defined(__thumb__) || defined(_ARM_ARCH_T2) + bics r3, r2, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) /* ignore VFP-ness of magic */ ldr ip, .L_setjmp_magic /* load magic */ - teq ip, r3/* magic correct? */ +#else + ldr r3, .L_setjmp_magic /* load magic */ + mov ip, r3 + movs r3, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) + ands r3, r3, r2 + eors r3, r3, r2 /* ignore VFP-ness of magic */ +#endif + cmp ip, r3/* magic correct? */ bne botch/* no, botch */ -#ifdef __ARM_EABI__ - teq r
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Aug 21 03:09:39 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: divide.S need -marm To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.24 src/lib/libc/arch/arm/gen/Makefile.inc:1.25 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.24 Thu Jun 20 17:53:01 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Wed Aug 21 03:09:39 2013 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.24 2013/06/20 17:53:01 msaitoh Exp $ +# $NetBSD: Makefile.inc,v 1.25 2013/08/21 03:09:39 matt Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ fabs.c flt_rounds.c udivsi3.S +CPUFLAGS.divide.S+= -marm + # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c SRCS+= fpclassifyf_ieee754.c fpclassifyd_ieee754.c
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Wed Aug 21 03:09:08 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: If not earmv7, use -marm on all assembly files To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.23 src/lib/libc/arch/arm/Makefile.inc:1.24 --- src/lib/libc/arch/arm/Makefile.inc:1.23 Sun Aug 18 16:55:47 2013 +++ src/lib/libc/arch/arm/Makefile.inc Wed Aug 21 03:09:08 2013 @@ -1,9 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.23 2013/08/18 16:55:47 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.24 2013/08/21 03:09:08 matt Exp $ .include SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +.if empty(LIBC_MACHINE_ARCH:Mearmv7*) +AFLAGS+= -marm +.endif + CPPFLAGS += -I. .if !empty(LIBC_MACHINE_ARCH:Mearm*)
CVS commit: src/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Wed Aug 21 03:05:35 UTC 2013 Modified Files: src/lib/libc/arch/arm/string: Makefile.inc Log Message: Add -marm to those sources who aren't thumb friendly. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/string/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/string/Makefile.inc diff -u src/lib/libc/arch/arm/string/Makefile.inc:1.8 src/lib/libc/arch/arm/string/Makefile.inc:1.9 --- src/lib/libc/arch/arm/string/Makefile.inc:1.8 Thu Jul 30 20:57:15 2009 +++ src/lib/libc/arch/arm/string/Makefile.inc Wed Aug 21 03:05:35 2013 @@ -1,5 +1,29 @@ -# $NetBSD: Makefile.inc,v 1.8 2009/07/30 20:57:15 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.9 2013/08/21 03:05:35 matt Exp $ -SRCS+= memcpy.S bcopy.S memmove.S memset.S bzero.S ffs.S strcmp.S -SRCS+= strncmp.S memcmp.S +SRCS.string+= memcmp.S memcpy.S memmove.S memset.S +SRCS.string+= ffs.S +SRCS.string+= bcopy.S bzero.S +SRCS.string+= strcat.S +SRCS.string+= strcpy.S strlcpy.S strncpy.S +.if empty(LIBC_MACHINE_ARCH:M*v7*) +SRCS.string+= strcmp.S strncmp.S +SRCS.string+= strlen.S strnlen.S +SRCS.string+= strchr.S strrchr.S +.endif +.for f in ${SRCS.string} +CPUFLAGS.${f}+= -marm +.for s in o po pico ln d +${f:.S=.${s}}: ${ARCHDIR}/string/Makefile.inc +.endfor +.endfor + +.if !empty(LIBC_MACHINE_ARCH:M*v7*) +SRCS.string+= strcmp.S strncmp.S +SRCS.string+= strlen.S strnlen.S +SRCS.string+= strchr.S strrchr.S +.endif + +SRCS.string+= strlcat.S + +SRCS+= ${SRCS.string}
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 19 22:13:34 UTC 2013 Modified Files: src/lib/libc/arch/arm: SYS.h Log Message: Group all syscalls together. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.14 src/lib/libc/arch/arm/SYS.h:1.15 --- src/lib/libc/arch/arm/SYS.h:1.14 Fri Aug 16 22:30:28 2013 +++ src/lib/libc/arch/arm/SYS.h Mon Aug 19 22:13:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.14 2013/08/16 22:30:28 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.15 2013/08/19 22:13:34 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -34,6 +34,8 @@ * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 */ +#define _TEXT_SECTION .section .text.hot, "ax" + #include #include #include
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Mon Aug 19 22:10:51 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: __aeabi_read_tp.S Log Message: Always compile as ARM even if -mthumb is given. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__aeabi_read_tp.S diff -u src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.4 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.5 --- src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.4 Sat Aug 17 01:08:35 2013 +++ src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Mon Aug 19 22:10:51 2013 @@ -1,17 +1,14 @@ -/* $NetBSD: __aeabi_read_tp.S,v 1.4 2013/08/17 01:08:35 matt Exp $ */ +/* $NetBSD: __aeabi_read_tp.S,v 1.5 2013/08/19 22:10:51 matt Exp $ */ +#undef __thumb__ #include "SYS.h" -#if defined(__thumb__) && !defined(_ARM_ARCH_T2) -#error Thumb only supported on armv7 -#endif - /* * Implementations of this function should corrupt only the result register * (r0) and the non-parameter integer core registers allowed to be corrupted * by the [AAPCS] (ip, lr, and CPSR). */ -ENTRY(__aeabi_read_tp) +ARM_ENTRY(__aeabi_read_tp) mrc p15, 0, r0, c13, c0, 3 #ifndef _ARM_ARCH_6 cmp r0, #0 /* was it zero? */
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Sun Aug 18 16:55:47 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Revert previous. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.22 src/lib/libc/arch/arm/Makefile.inc:1.23 --- src/lib/libc/arch/arm/Makefile.inc:1.22 Sun Aug 18 07:57:29 2013 +++ src/lib/libc/arch/arm/Makefile.inc Sun Aug 18 16:55:47 2013 @@ -1,13 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.22 2013/08/18 07:57:29 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.23 2013/08/18 16:55:47 skrll Exp $ .include -SRCS+= __sigaction14_sigtramp.c __sigtramp2.S +SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S CPPFLAGS += -I. .if !empty(LIBC_MACHINE_ARCH:Mearm*) -SRCS+= __aeabi_read_tp.S SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Sun Aug 18 07:57:29 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Only add in __aeabi_read_tp.S when building for earm. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.21 src/lib/libc/arch/arm/Makefile.inc:1.22 --- src/lib/libc/arch/arm/Makefile.inc:1.21 Tue Apr 30 01:42:03 2013 +++ src/lib/libc/arch/arm/Makefile.inc Sun Aug 18 07:57:29 2013 @@ -1,12 +1,13 @@ -# $NetBSD: Makefile.inc,v 1.21 2013/04/30 01:42:03 matt Exp $ +# $NetBSD: Makefile.inc,v 1.22 2013/08/18 07:57:29 skrll Exp $ .include -SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +SRCS+= __sigaction14_sigtramp.c __sigtramp2.S CPPFLAGS += -I. .if !empty(LIBC_MACHINE_ARCH:Mearm*) +SRCS+= __aeabi_read_tp.S SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Sat Aug 17 01:08:35 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: __aeabi_read_tp.S Log Message: Enforce that this must be not compiled using Thumb1 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__aeabi_read_tp.S diff -u src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.3 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.4 --- src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.3 Tue Nov 20 22:02:46 2012 +++ src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Sat Aug 17 01:08:35 2013 @@ -1,7 +1,11 @@ -/* $NetBSD: __aeabi_read_tp.S,v 1.3 2012/11/20 22:02:46 matt Exp $ */ +/* $NetBSD: __aeabi_read_tp.S,v 1.4 2013/08/17 01:08:35 matt Exp $ */ #include "SYS.h" +#if defined(__thumb__) && !defined(_ARM_ARCH_T2) +#error Thumb only supported on armv7 +#endif + /* * Implementations of this function should corrupt only the result register * (r0) and the non-parameter integer core registers allowed to be corrupted @@ -17,4 +21,4 @@ ENTRY(__aeabi_read_tp) mov r1, ip /* restore r1 */ #endif RET -_END(__aeabi_read_tp) +END(__aeabi_read_tp)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Sat Aug 17 01:07:45 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: alloca.S Log Message: Thumbify & add END To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/arm/gen/alloca.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/alloca.S diff -u src/lib/libc/arch/arm/gen/alloca.S:1.4 src/lib/libc/arch/arm/gen/alloca.S:1.5 --- src/lib/libc/arch/arm/gen/alloca.S:1.4 Sat Aug 21 11:20:10 2004 +++ src/lib/libc/arch/arm/gen/alloca.S Sat Aug 17 01:07:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: alloca.S,v 1.4 2004/08/21 11:20:10 rearnsha Exp $ */ +/* $NetBSD: alloca.S,v 1.5 2013/08/17 01:07:45 matt Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe @@ -37,8 +37,17 @@ #include ENTRY(alloca) - add r0, r0, #0x0007 /* round up to next 8 byte alignment */ - bic r0, r0, #0x0007 - sub sp, sp, r0 /* Adjust the stack pointer */ - mov r0, sp /* r0 = base of new space */ + adds r0, r0, #7 /* round up to next 8 byte alignment */ +#if !defined(__thumb__) || defined(_ARM_ARCH_T2) + bics r0, r0, #7 + sub sp, sp, r0 /* Adjust the stack pointer */ + mov r0, sp /* r0 = base of new space */ +#else + lsrs r0, r0, #3 + lsls r0, r0, #3 + mov r1, sp + subs r0, r1, r0 /* Adjust the stack pointer */ + mov sp, r0 /* r0 = base of new space */ +#endif RET +END(alloca)
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Fri Aug 16 23:20:59 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: __sigtramp2.S Log Message: Add END To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/arm/sys/__sigtramp2.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__sigtramp2.S diff -u src/lib/libc/arch/arm/sys/__sigtramp2.S:1.2 src/lib/libc/arch/arm/sys/__sigtramp2.S:1.3 --- src/lib/libc/arch/arm/sys/__sigtramp2.S:1.2 Mon Apr 28 20:22:55 2008 +++ src/lib/libc/arch/arm/sys/__sigtramp2.S Fri Aug 16 23:20:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __sigtramp2.S,v 1.2 2008/04/28 20:22:55 martin Exp $ */ +/* $NetBSD: __sigtramp2.S,v 1.3 2013/08/16 23:20:59 matt Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -47,3 +47,4 @@ ENTRY_NP(__sigtramp_siginfo_2) /* If that failed, exit with the error code. */ SYSTRAP(exit) +END(__sigtramp_siginfo_2)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Fri Aug 16 22:30:28 UTC 2013 Modified Files: src/lib/libc/arch/arm: SYS.h Log Message: Save r3 instead of r4 when calling CERROR in thumb mode. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.13 src/lib/libc/arch/arm/SYS.h:1.14 --- src/lib/libc/arch/arm/SYS.h:1.13 Fri Aug 16 22:20:49 2013 +++ src/lib/libc/arch/arm/SYS.h Fri Aug 16 22:30:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.13 2013/08/16 22:20:49 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.14 2013/08/16 22:30:28 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -84,7 +84,7 @@ #define _INVOKE_CERROR() bcs CERROR #else #define _INVOKE_CERROR() \ - bcc 86f; push {r4,lr}; bl CERROR; pop {r4,pc}; 86: + bcc 86f; push {r3,lr}; bl CERROR; pop {r3,pc}; 86: #endif #define _SYSCALL(x, y) \ _SYSCALL_NOERROR(x,y); \
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Fri Aug 16 22:27:32 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: __vfork14.S Log Message: Thumbify & optimize a little To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/sys/__vfork14.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__vfork14.S diff -u src/lib/libc/arch/arm/sys/__vfork14.S:1.8 src/lib/libc/arch/arm/sys/__vfork14.S:1.9 --- src/lib/libc/arch/arm/sys/__vfork14.S:1.8 Thu Aug 1 05:54:24 2013 +++ src/lib/libc/arch/arm/sys/__vfork14.S Fri Aug 16 22:27:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __vfork14.S,v 1.8 2013/08/01 05:54:24 matt Exp $ */ +/* $NetBSD: __vfork14.S,v 1.9 2013/08/16 22:27:32 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,10 +44,10 @@ .align 0 ENTRY(__vfork14) - mov r2, r14 + mov r2, lr SYSTRAP(__vfork14) - bcs CERROR - mov r14, r2 - sub r1, r1, #1 /* r1 == 0x if parent, 0 if child */ - and r0, r0, r1 /* r0 == 0 if child, else unchanged */ - RET + _INVOKE_CERROR() + subs r1, r1, #1 /* r1 == 0x if parent, 0 if child */ + ands r0, r0, r1 /* r0 == 0 if child, else unchanged */ + RETr(r2) +END(__vfork14)
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Fri Aug 16 22:28:06 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: fork.S Log Message: thumbify and add END To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/sys/fork.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/fork.S diff -u src/lib/libc/arch/arm/sys/fork.S:1.6 src/lib/libc/arch/arm/sys/fork.S:1.7 --- src/lib/libc/arch/arm/sys/fork.S:1.6 Sat Aug 21 11:30:17 2004 +++ src/lib/libc/arch/arm/sys/fork.S Fri Aug 16 22:28:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fork.S,v 1.6 2004/08/21 11:30:17 rearnsha Exp $ */ +/* $NetBSD: fork.S,v 1.7 2013/08/16 22:28:05 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -42,6 +42,7 @@ */ _SYSCALL(__fork,fork) - sub r1, r1, #1 /* r1 == 0x if parent, 0 if child */ - and r0, r0, r1 /* r0 == 0 if child, else unchanged */ + subs r1, r1, #1 /* r1 == 0x if parent, 0 if child */ + ands r0, r0, r1 /* r0 == 0 if child, else unchanged */ RET +END(__fork)
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Fri Aug 16 22:21:59 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: pipe.S Log Message: Use _INVOKE_CERROR use stmia instead of two str add END To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/sys/pipe.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/pipe.S diff -u src/lib/libc/arch/arm/sys/pipe.S:1.7 src/lib/libc/arch/arm/sys/pipe.S:1.8 --- src/lib/libc/arch/arm/sys/pipe.S:1.7 Thu Aug 1 05:54:24 2013 +++ src/lib/libc/arch/arm/sys/pipe.S Fri Aug 16 22:21:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pipe.S,v 1.7 2013/08/01 05:54:24 matt Exp $ */ +/* $NetBSD: pipe.S,v 1.8 2013/08/16 22:21:59 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -40,8 +40,8 @@ WEAK_ALIAS(pipe, _pipe) ENTRY(_pipe) mov r2, r0 SYSTRAP(pipe) - bcs CERROR - str r0, [r2, #0x] - str r1, [r2, #0x0004] - mov r0, #0x + _INVOKE_CERROR() + stmia r2!, {r0-r1} + movs r0, #0 RET +END(_pipe)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Fri Aug 16 22:20:49 UTC 2013 Modified Files: src/lib/libc/arch/arm: SYS.h Log Message: Rework SYSTRAP for thumb. Add END to PSEUDO_NOERROR and PSEUDO To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.12 src/lib/libc/arch/arm/SYS.h:1.13 --- src/lib/libc/arch/arm/SYS.h:1.12 Thu Aug 1 05:32:33 2013 +++ src/lib/libc/arch/arm/SYS.h Fri Aug 16 22:20:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.12 2013/08/01 05:32:33 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.13 2013/08/16 22:20:49 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,12 +38,41 @@ #include #include -#ifdef __STDC__ -#define SYSTRAP(x) swi SWI_OS_NETBSD | SYS_ ## x -#else -#define SYSTRAP(x) swi SWI_OS_NETBSD | SYS_/**/x +#ifndef __STDC__ +#error __STDC__ not defined #endif +#if !defined(__thumb__) +#define SYSTRAP(x) svc #SWI_OS_NETBSD | SYS_ ## x +#else +.macro emitsvc x + mov ip, r0 +.ifeq \x / 256 + movs r0, #\x +.else +#if defined(_ARM_ARCH_7) + movw r0, #\x +#else +.ifeq (\x & 3) + movs r0, #(\x / 4) + lsls r0, r0, #3 +.else +.ifeq (\x & 1) + movs r0, #(\x / 2) + lsls r0, r0, #1 +.else + movs r0, #(\x / 256) + lsls r0, r0, #8 + adds r0, r0, #(\x & 255) +.endif +.endif +#endif /* !_ARM_ARCH_7 */ +.endif + svc #255 +.endm +#define SYSTRAP(x) emitsvc SYS_ ## x +#endif /* __thumb__ */ + #define CERROR _C_LABEL(__cerror) #define CURBRK _C_LABEL(__curbrk) @@ -51,9 +80,15 @@ ENTRY(x); \ SYSTRAP(y) +#if !defined(__thumb__) || defined(_ARM_ARCH_T2) +#define _INVOKE_CERROR() bcs CERROR +#else +#define _INVOKE_CERROR() \ + bcc 86f; push {r4,lr}; bl CERROR; pop {r4,pc}; 86: +#endif #define _SYSCALL(x, y) \ _SYSCALL_NOERROR(x,y); \ - bcs CERROR + _INVOKE_CERROR() #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) @@ -64,11 +99,13 @@ #define PSEUDO_NOERROR(x,y) \ _SYSCALL_NOERROR(x,y); \ - RET + RET;\ + END(x) #define PSEUDO(x,y) \ _SYSCALL(x,y); \ - RET + RET;\ + END(x) #define RSYSCALL_NOERROR(x) \
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: matt Date: Fri Aug 16 17:09:27 UTC 2013 Modified Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: Make _libc_arm_fpu_present hidden To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u src/lib/libc/arch/arm/misc/arm_initfini.c:1.3 src/lib/libc/arch/arm/misc/arm_initfini.c:1.4 --- src/lib/libc/arch/arm/misc/arm_initfini.c:1.3 Tue Jul 30 10:47:44 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Fri Aug 16 17:09:27 2013 @@ -29,7 +29,7 @@ #include -__RCSID("$NetBSD: arm_initfini.c,v 1.3 2013/07/30 10:47:44 skrll Exp $"); +__RCSID("$NetBSD: arm_initfini.c,v 1.4 2013/08/16 17:09:27 matt Exp $"); #include "namespace.h" @@ -46,7 +46,7 @@ __RCSID("$NetBSD: arm_initfini.c,v 1.3 2 #include #include -int _libc_arm_fpu_present; +__dso_hidden int _libc_arm_fpu_present; static bool _libc_aapcs_initialized; void _libc_aapcs_init(void) __attribute__((__constructor__, __used__));
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: matt Date: Fri Aug 2 02:07:00 UTC 2013 Modified Files: src/lib/libc/arch/arm/hardfloat: fpgetmask.S Log Message: Use vmrs instead of mrc To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/hardfloat/fpgetmask.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/hardfloat/fpgetmask.S diff -u src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.6 src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.7 --- src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.6 Fri Jan 11 13:55:26 2013 +++ src/lib/libc/arch/arm/hardfloat/fpgetmask.S Fri Aug 2 02:07:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.S,v 1.6 2013/01/11 13:55:26 matt Exp $ */ +/* $NetBSD: fpgetmask.S,v 1.7 2013/08/02 02:07:00 matt Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -45,8 +45,8 @@ WEAK_ALIAS(fpgetmask, _fpgetmask) #endif ENTRY(fpgetmask) - mrc p10, 7, r0, c1, c0, 0 - and r0, r0, #VFP_FPSCR_ESUM + vmrsr0, fpscr mov r0, r0, lsr #8 + and r0, r0, #VFP_FPSCR_CSUM RET END(fpgetmask)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Thu Aug 1 05:32:33 UTC 2013 Modified Files: src/lib/libc/arch/arm: SYS.h src/lib/libc/arch/arm/sys: brk.S sbrk.S Log Message: Make __minbrk, __curbrk, and CERROR hidden and avoid using the GOT to access them. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/SYS.h cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/sys/brk.S \ src/lib/libc/arch/arm/sys/sbrk.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.11 src/lib/libc/arch/arm/SYS.h:1.12 --- src/lib/libc/arch/arm/SYS.h:1.11 Thu Jul 18 12:21:52 2013 +++ src/lib/libc/arch/arm/SYS.h Thu Aug 1 05:32:33 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.11 2013/07/18 12:21:52 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.12 2013/08/01 05:32:33 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -86,4 +86,5 @@ PSEUDO(weak,weak) #endif + .hidden CERROR .globl CERROR Index: src/lib/libc/arch/arm/sys/brk.S diff -u src/lib/libc/arch/arm/sys/brk.S:1.9 src/lib/libc/arch/arm/sys/brk.S:1.10 --- src/lib/libc/arch/arm/sys/brk.S:1.9 Fri May 13 23:14:36 2011 +++ src/lib/libc/arch/arm/sys/brk.S Thu Aug 1 05:32:33 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.9 2011/05/13 23:14:36 nonaka Exp $ */ +/* $NetBSD: brk.S,v 1.10 2013/08/01 05:32:33 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -34,7 +34,7 @@ #include "SYS.h" .globl _C_LABEL(_end) - .globl CURBRK + .globl _C_LABEL(__curbrk) #ifdef WEAK_ALIAS WEAK_ALIAS(brk, _brk) @@ -43,6 +43,7 @@ WEAK_ALIAS(brk, _brk) .data .align 0 .globl _C_LABEL(__minbrk) + .hidden _C_LABEL(__minbrk) .type _C_LABEL(__minbrk),#object _C_LABEL(__minbrk): .word _C_LABEL(_end) @@ -57,7 +58,7 @@ ENTRY(_brk) add r3, pc, r3 .L1: ldr r1, .Lminbrk - ldr r1, [r3, r1] + add r1, r3, r1 #else ldr r1, .Lminbrk #endif @@ -76,7 +77,7 @@ ENTRY(_brk) #ifdef PIC ldr r1, .Lcurbrk - ldr r1, [r3, r1] + add r1, r3, r1 #else ldr r1, .Lcurbrk #endif @@ -93,6 +94,6 @@ ENTRY(_brk) .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (.L1+4)) #endif .Lminbrk: - .word PIC_SYM(_C_LABEL(__minbrk), GOT) + .word PIC_SYM(_C_LABEL(__minbrk), GOTOFF) .Lcurbrk: - .word PIC_SYM(CURBRK, GOT) + .word PIC_SYM(_C_LABEL(__curbrk), GOTOFF) Index: src/lib/libc/arch/arm/sys/sbrk.S diff -u src/lib/libc/arch/arm/sys/sbrk.S:1.9 src/lib/libc/arch/arm/sys/sbrk.S:1.10 --- src/lib/libc/arch/arm/sys/sbrk.S:1.9 Fri May 13 23:14:36 2011 +++ src/lib/libc/arch/arm/sys/sbrk.S Thu Aug 1 05:32:33 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.9 2011/05/13 23:14:36 nonaka Exp $ */ +/* $NetBSD: sbrk.S,v 1.10 2013/08/01 05:32:33 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -41,25 +41,23 @@ WEAK_ALIAS(sbrk, _sbrk) .data .align 0 - .globl CURBRK - .type CURBRK,#object -CURBRK: + .globl _C_LABEL(__curbrk) + .hidden _C_LABEL(__curbrk) + .type _C_LABEL(__curbrk),#object +_C_LABEL(__curbrk): .word _C_LABEL(_end) /* * Change the data segment size */ ENTRY(_sbrk) + /* get address or PC offset to __curbrk */ + ldr r2, .Lcurbrk #ifdef PIC - /* Setup the GOT */ - ldr r3, .Lgot - add r3, pc, r3 + add r2, pc, r2 .L1: - ldr r2, .Lcurbrk - ldr r2, [r3, r2] -#else - ldr r2, .Lcurbrk #endif + /* Get the current brk address */ ldr r1, [r2] @@ -67,7 +65,7 @@ ENTRY(_sbrk) mov r3, r0 add r0, r0, r1 SYSTRAP(break) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR /* Store new curbrk value */ ldr r0, [r2] @@ -78,9 +76,9 @@ ENTRY(_sbrk) RET .align 0 +.Lcurbrk: #ifdef PIC -.Lgot: - .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (.L1+4)) + .word _C_LABEL(__curbrk) - (.L1+4) +#else + .word _C_LABEL(__curbrk) #endif -.Lcurbrk: - .word PIC_SYM(CURBRK, GOT)
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: skrll Date: Tue Jul 30 10:47:44 UTC 2013 Modified Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: include namespace.h - this fixes 48091 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u src/lib/libc/arch/arm/misc/arm_initfini.c:1.2 src/lib/libc/arch/arm/misc/arm_initfini.c:1.3 --- src/lib/libc/arch/arm/misc/arm_initfini.c:1.2 Thu Jan 31 06:47:55 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Tue Jul 30 10:47:44 2013 @@ -29,7 +29,9 @@ #include -__RCSID("$NetBSD: arm_initfini.c,v 1.2 2013/01/31 06:47:55 matt Exp $"); +__RCSID("$NetBSD: arm_initfini.c,v 1.3 2013/07/30 10:47:44 skrll Exp $"); + +#include "namespace.h" /* * To properly implement setjmp/longjmp for the ARM AAPCS ABI, it has to be
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Thu Jul 18 12:21:52 UTC 2013 Modified Files: src/lib/libc/arch/arm: SYS.h Log Message: Remove non-__ELF__ defines To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.10 src/lib/libc/arch/arm/SYS.h:1.11 --- src/lib/libc/arch/arm/SYS.h:1.10 Fri Jan 14 06:12:16 2011 +++ src/lib/libc/arch/arm/SYS.h Thu Jul 18 12:21:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.10 2011/01/14 06:12:16 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.11 2013/07/18 12:21:52 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,13 +44,8 @@ #define SYSTRAP(x) swi SWI_OS_NETBSD | SYS_/**/x #endif -#ifdef __ELF__ #define CERROR _C_LABEL(__cerror) #define CURBRK _C_LABEL(__curbrk) -#else -#define CERROR _ASM_LABEL(cerror) -#define CURBRK _ASM_LABEL(curbrk) -#endif #define _SYSCALL_NOERROR(x,y) \ ENTRY(x); \
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: msaitoh Date: Thu Jun 20 17:53:01 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: Fix compile error. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.23 src/lib/libc/arch/arm/gen/Makefile.inc:1.24 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.23 Thu Jun 20 07:18:40 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Thu Jun 20 17:53:01 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.23 2013/06/20 07:18:40 matt Exp $ +# $NetBSD: Makefile.inc,v 1.24 2013/06/20 17:53:01 msaitoh Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ fabs.c flt_rounds.c udivsi3.S @@ -15,7 +15,7 @@ SRCS+= signbitf_ieee754.c signbitd_ieee7 SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c .else -SRCS+= modsi3.s umodsi3.S +SRCS+= modsi3.S umodsi3.S .endif SRCS+= nanf.c
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Thu Jun 20 07:18:40 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: modsi3/umodsi3 is not needed for earm since __aeabi_*divmod takes care of it. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.22 src/lib/libc/arch/arm/gen/Makefile.inc:1.23 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.22 Tue Apr 30 01:42:04 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Thu Jun 20 07:18:40 2013 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.22 2013/04/30 01:42:04 matt Exp $ +# $NetBSD: Makefile.inc,v 1.23 2013/06/20 07:18:40 matt Exp $ -SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ - fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S +SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ + fabs.c flt_rounds.c udivsi3.S # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c @@ -14,6 +14,8 @@ SRCS+= signbitf_ieee754.c signbitd_ieee7 .if !empty(LIBC_MACHINE_ARCH:Mearm*) SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c +.else +SRCS+= modsi3.s umodsi3.S .endif SRCS+= nanf.c
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: skrll Date: Tue Apr 30 19:42:57 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: getcontext.S Log Message: include assym.h To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/sys/getcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/getcontext.S diff -u src/lib/libc/arch/arm/sys/getcontext.S:1.7 src/lib/libc/arch/arm/sys/getcontext.S:1.8 --- src/lib/libc/arch/arm/sys/getcontext.S:1.7 Tue Apr 30 15:59:34 2013 +++ src/lib/libc/arch/arm/sys/getcontext.S Tue Apr 30 19:42:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: getcontext.S,v 1.7 2013/04/30 15:59:34 skrll Exp $ */ +/* $NetBSD: getcontext.S,v 1.8 2013/04/30 19:42:56 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,9 +30,10 @@ */ #include "SYS.h" +#include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: getcontext.S,v 1.7 2013/04/30 15:59:34 skrll Exp $") + RCSID("$NetBSD: getcontext.S,v 1.8 2013/04/30 19:42:56 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ #ifdef WEAK_ALIAS
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: skrll Date: Tue Apr 30 15:59:34 UTC 2013 Modified Files: src/lib/libc/arch/arm/sys: getcontext.S Log Message: Don't hardcode offset in assembler. This ensures the return value in the context is the correct value (0) on earm* To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/sys/getcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/getcontext.S diff -u src/lib/libc/arch/arm/sys/getcontext.S:1.6 src/lib/libc/arch/arm/sys/getcontext.S:1.7 --- src/lib/libc/arch/arm/sys/getcontext.S:1.6 Mon Apr 28 20:22:55 2008 +++ src/lib/libc/arch/arm/sys/getcontext.S Tue Apr 30 15:59:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: getcontext.S,v 1.6 2008/04/28 20:22:55 martin Exp $ */ +/* $NetBSD: getcontext.S,v 1.7 2013/04/30 15:59:34 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: getcontext.S,v 1.6 2008/04/28 20:22:55 martin Exp $") + RCSID("$NetBSD: getcontext.S,v 1.7 2013/04/30 15:59:34 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ #ifdef WEAK_ALIAS @@ -43,12 +43,12 @@ ENTRY(_getcontext) mov r2, r0 /* Must save argument pointer. */ SYSTRAP (getcontext) bcs PIC_SYM(CERROR, PLT) - str lr, [r2, #(36 + 15*4)] /* Adjust PC. */ + str lr, [r2, #_UC_REGS_PC] /* Adjust PC. */ #ifdef SOFTFLOAT /* Ahem. */ /* Judging from the softfloat code we should at least save the exception codes and rounding mode here. */ #endif mov r0, #0 - str r0, [r2, #(36 + 0*4)] /* Return 0. */ + str r0, [r2, #_UC_REGS_R0] /* Return 0. */ RET
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Tue Apr 30 12:24:32 UTC 2013 Modified Files: src/lib/libc/arch/arm: genassym.cf Log Message: Don't hardcode offset in assembler. This ensures the return value in the context is the correct value (0) on earm* To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/genassym.cf diff -u src/lib/libc/arch/arm/genassym.cf:1.1 src/lib/libc/arch/arm/genassym.cf:1.2 --- src/lib/libc/arch/arm/genassym.cf:1.1 Thu Sep 27 11:20:20 2012 +++ src/lib/libc/arch/arm/genassym.cf Tue Apr 30 12:24:31 2013 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.1 2012/09/27 11:20:20 skrll Exp $ +# $NetBSD: genassym.cf,v 1.2 2013/04/30 12:24:31 skrll Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -32,5 +32,6 @@ include include +define _UC_REGS_R0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R0]) define _UC_REGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) define _UC_REGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])
CVS commit: src/lib/libc/arch/arm/softfloat
Module Name:src Committed By: matt Date: Wed Apr 24 18:04:46 UTC 2013 Modified Files: src/lib/libc/arch/arm/softfloat: softfloat.h Log Message: Add #include To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/softfloat/softfloat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/softfloat/softfloat.h diff -u src/lib/libc/arch/arm/softfloat/softfloat.h:1.9 src/lib/libc/arch/arm/softfloat/softfloat.h:1.10 --- src/lib/libc/arch/arm/softfloat/softfloat.h:1.9 Thu Jul 7 07:14:57 2011 +++ src/lib/libc/arch/arm/softfloat/softfloat.h Wed Apr 24 18:04:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.h,v 1.9 2011/07/07 07:14:57 matt Exp $ */ +/* $NetBSD: softfloat.h,v 1.10 2013/04/24 18:04:46 matt Exp $ */ /* This is a derivative work. */ @@ -44,6 +44,7 @@ the `FLOAT128' macro and the quadruple-p /* #define FLOATX80 */ /* #define FLOAT128 */ +#include #include /*
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Fri Apr 19 16:50:22 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: sigsetjmp.S Log Message: Ignore VFP bit in magic. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/gen/sigsetjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/sigsetjmp.S diff -u src/lib/libc/arch/arm/gen/sigsetjmp.S:1.5 src/lib/libc/arch/arm/gen/sigsetjmp.S:1.6 --- src/lib/libc/arch/arm/gen/sigsetjmp.S:1.5 Sun Oct 16 17:26:24 2005 +++ src/lib/libc/arch/arm/gen/sigsetjmp.S Fri Apr 19 16:50:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sigsetjmp.S,v 1.5 2005/10/16 17:26:24 christos Exp $ */ +/* $NetBSD: sigsetjmp.S,v 1.6 2013/04/19 16:50:22 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -56,6 +56,7 @@ ENTRY(__sigsetjmp14) ENTRY(__siglongjmp14) ldr r2, .L_setjmp_magic ldr r3, [r0] + bic r3, r3, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) teq r2, r3 beq PIC_SYM(_C_LABEL(_longjmp), PLT) b PIC_SYM(_C_LABEL(__longjmp14), PLT)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Fri Apr 19 13:45:46 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: A small optimization To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/arm/gen/setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.11 src/lib/libc/arch/arm/gen/_setjmp.S:1.12 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.11 Fri Apr 19 13:14:10 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Fri Apr 19 13:45:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.11 2013/04/19 13:14:10 skrll Exp $ */ +/* $NetBSD: _setjmp.S,v 1.12 2013/04/19 13:45:45 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -124,8 +124,7 @@ ENTRY(_longjmp) beq botch /* Set return value */ - mov r0, r1 - teq r0, #0x + movs r0, r1 moveq r0, #0x0001 RET Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.13 src/lib/libc/arch/arm/gen/setjmp.S:1.14 --- src/lib/libc/arch/arm/gen/setjmp.S:1.13 Fri Apr 19 13:14:10 2013 +++ src/lib/libc/arch/arm/gen/setjmp.S Fri Apr 19 13:45:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.13 2013/04/19 13:14:10 skrll Exp $ */ +/* $NetBSD: setjmp.S,v 1.14 2013/04/19 13:45:45 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -136,9 +136,7 @@ ENTRY(__longjmp14) beq .Lbotch /* Set return value */ - - mov r0, r1 - teq r0, #0x + movs r0, r1 moveq r0, #0x0001 RET
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Fri Apr 19 13:14:11 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: Actually fail if the magic number is found to be wrong in __longjmp. Avoid overwriting the {,_}longjmp return value in __ARM_EABI__ ok matt@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/gen/setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.10 src/lib/libc/arch/arm/gen/_setjmp.S:1.11 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.10 Tue Jan 29 19:23:09 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Fri Apr 19 13:14:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.10 2013/01/29 19:23:09 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.11 2013/04/19 13:14:10 skrll Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -107,10 +107,10 @@ ENTRY(_longjmp) #ifdef __ARM_EABI__ teq r3, r2/* did magic change? */ beq 1f/* no, don't restore VFP */ - add r1, r0, #(_JB_REG_D8 * 4) - vldmia r1, {d8-d15} - ldr r1, [r0, #(_JB_REG_FPSCR * 4)] - vmsr fpscr, r1 + add ip, r0, #(_JB_REG_D8 * 4) + vldmia ip, {d8-d15} + ldr ip, [r0, #(_JB_REG_FPSCR * 4)] + vmsr fpscr, ip 1: #endif /* __ARM_EABI__ */ Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.12 src/lib/libc/arch/arm/gen/setjmp.S:1.13 --- src/lib/libc/arch/arm/gen/setjmp.S:1.12 Tue Jan 29 19:23:09 2013 +++ src/lib/libc/arch/arm/gen/setjmp.S Fri Apr 19 13:14:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.12 2013/01/29 19:23:09 matt Exp $ */ +/* $NetBSD: setjmp.S,v 1.13 2013/04/19 13:14:10 skrll Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -105,6 +105,7 @@ ENTRY(__longjmp14) ldr ip, .Lsetjmp_magic bic r3, r2, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) teq r3, ip + bne .Lbotch /* Restore the signal mask. */ stmfd sp!, {r0-r2, r14} @@ -118,10 +119,10 @@ ENTRY(__longjmp14) tst r2, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) /* is this a VFP magic? */ beq 1f/* no, don't restore VFP */ - add r1, r0, #(_JB_REG_D8 * 4) - vldmia r1, {d8-d15} - ldr r1, [r0, #(_JB_REG_FPSCR * 4)] - vmsr fpscr, r1 + add ip, r0, #(_JB_REG_D8 * 4) + vldmia ip, {d8-d15} + ldr ip, [r0, #(_JB_REG_FPSCR * 4)] + vmsr fpscr, ip 1: #endif /* __ARM_EABI__ */
CVS commit: src/lib/libc/arch/arm/softfloat
Module Name:src Committed By: matt Date: Tue Apr 16 13:38:34 UTC 2013 Modified Files: src/lib/libc/arch/arm/softfloat: __aeabi_dcmpge.c __aeabi_dcmpgt.c __aeabi_fcmpge.c __aeabi_fcmpgt.c Log Message: Deal with arguments being NaNs To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c diff -u src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c:1.1 src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c:1.2 --- src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c:1.1 Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c Tue Apr 16 13:38:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ +/* $NetBSD: __aeabi_dcmpge.c,v 1.2 2013/04/16 13:38:34 matt Exp $ */ /* * Written by Ben Harris, 2000. This file is in the Public Domain. @@ -10,7 +10,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +__RCSID("$NetBSD: __aeabi_dcmpge.c,v 1.2 2013/04/16 13:38:34 matt Exp $"); #endif /* LIBC_SCCS and not lint */ int __aeabi_dcmpge(float64, float64); @@ -19,5 +19,5 @@ int __aeabi_dcmpge(float64 a, float64 b) { - return !float64_lt(a, b); + return !float64_lt(a, b) && float64_eq(a, a) && float64_eq(b, b); } Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c diff -u src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c:1.1 src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c:1.2 --- src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c:1.1 Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c Tue Apr 16 13:38:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ +/* $NetBSD: __aeabi_dcmpgt.c,v 1.2 2013/04/16 13:38:34 matt Exp $ */ /* * Written by Ben Harris, 2000. This file is in the Public Domain. @@ -10,7 +10,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +__RCSID("$NetBSD: __aeabi_dcmpgt.c,v 1.2 2013/04/16 13:38:34 matt Exp $"); #endif /* LIBC_SCCS and not lint */ int __aeabi_dcmpgt(float64, float64); @@ -19,5 +19,5 @@ int __aeabi_dcmpgt(float64 a, float64 b) { - return !float64_le(a, b); + return !float64_le(a, b) && float64_eq(a, a) && float64_eq(b, b); } Index: src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c diff -u src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c:1.1 src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c:1.2 --- src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c:1.1 Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c Tue Apr 16 13:38:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __aeabi_fcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ +/* $NetBSD: __aeabi_fcmpge.c,v 1.2 2013/04/16 13:38:34 matt Exp $ */ /* * Written by Ben Harris, 2000. This file is in the Public Domain. @@ -10,7 +10,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __aeabi_fcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +__RCSID("$NetBSD: __aeabi_fcmpge.c,v 1.2 2013/04/16 13:38:34 matt Exp $"); #endif /* LIBC_SCCS and not lint */ int __aeabi_fcmpge(float32, float32); @@ -19,5 +19,5 @@ int __aeabi_fcmpge(float32 a, float32 b) { - return !float32_lt(a, b); + return !float32_lt(a, b) && float32_eq(a, a) && float32_eq(b, b); } Index: src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c diff -u src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c:1.1 src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c:1.2 --- src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c:1.1 Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c Tue Apr 16 13:38:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: __aeabi_fcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ +/* $NetBSD: __aeabi_fcmpgt.c,v 1.2 2013/04/16 13:38:34 matt Exp $ */ /* * Written by Ben Harris, 2000. This file is in the Public Domain. @@ -10,7 +10,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: __aeabi_fcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +__RCSID("$NetBSD: __aeabi_fcmpgt.c,v 1.2 2013/04/16 13:38:34 matt Exp $"); #endif /* LIBC_SCCS and not lint */ int __aeabi_fcmpgt(float32, float32); @@ -19,5 +19,5 @@ int __aeabi_fcmpgt(float32 a, float32 b) { - return !float32_le(a, b); + return !float32_le(a, b) && float32_eq(a, a) && float32_eq(b, b); }
CVS commit: src/lib/libc/arch/arm/softfloat
Module Name:src Committed By: matt Date: Tue Apr 16 10:37:39 UTC 2013 Added Files: src/lib/libc/arch/arm/softfloat: __aeabi_dcmpeq.c __aeabi_dcmpge.c __aeabi_dcmpgt.c __aeabi_dcmple.c __aeabi_dcmplt.c __aeabi_dcmpun.c __aeabi_fcmpeq.c __aeabi_fcmpge.c __aeabi_fcmpgt.c __aeabi_fcmple.c __aeabi_fcmplt.c __aeabi_fcmpun.c Log Message: aeabi floating compare ops are different from the normal gcc softfloat ones. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/softfloat/__aeabi_dcmpeq.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmple.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmplt.c \ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpun.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpeq.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpge.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpgt.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmple.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmplt.c \ src/lib/libc/arch/arm/softfloat/__aeabi_fcmpun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmpeq.c diff -u /dev/null src/lib/libc/arch/arm/softfloat/__aeabi_dcmpeq.c:1.1 --- /dev/null Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpeq.c Tue Apr 16 10:37:39 2013 @@ -0,0 +1,23 @@ +/* $NetBSD: __aeabi_dcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ + +/* + * Written by Ben Harris, 2000. This file is in the Public Domain. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_dcmpeq.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +int __aeabi_dcmpeq(float64, float64); + +int +__aeabi_dcmpeq(float64 a, float64 b) +{ + + return float64_eq(a, b); +} Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c diff -u /dev/null src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c:1.1 --- /dev/null Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpge.c Tue Apr 16 10:37:39 2013 @@ -0,0 +1,23 @@ +/* $NetBSD: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ + +/* + * Written by Ben Harris, 2000. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_dcmpge.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +int __aeabi_dcmpge(float64, float64); + +int +__aeabi_dcmpge(float64 a, float64 b) +{ + + return !float64_lt(a, b); +} Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c diff -u /dev/null src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c:1.1 --- /dev/null Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmpgt.c Tue Apr 16 10:37:39 2013 @@ -0,0 +1,23 @@ +/* $NetBSD: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ + +/* + * Written by Ben Harris, 2000. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_dcmpgt.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +int __aeabi_dcmpgt(float64, float64); + +int +__aeabi_dcmpgt(float64 a, float64 b) +{ + + return !float64_le(a, b); +} Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmple.c diff -u /dev/null src/lib/libc/arch/arm/softfloat/__aeabi_dcmple.c:1.1 --- /dev/null Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmple.c Tue Apr 16 10:37:39 2013 @@ -0,0 +1,23 @@ +/* $NetBSD: __aeabi_dcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ + +/* + * Written by Ben Harris, 2000. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_dcmple.c,v 1.1 2013/04/16 10:37:39 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +int __aeabi_dcmple(float64, float64); + +int +__aeabi_dcmple(float64 a, float64 b) +{ + + return float64_le(a, b); +} Index: src/lib/libc/arch/arm/softfloat/__aeabi_dcmplt.c diff -u /dev/null src/lib/libc/arch/arm/softfloat/__aeabi_dcmplt.c:1.1 --- /dev/null Tue Apr 16 10:37:39 2013 +++ src/lib/libc/arch/arm/softfloat/__aeabi_dcmplt.c Tue Apr 16 10:37:39 2013 @@ -0,0 +1,23 @@ +/* $NetBSD: __aeabi_dcmplt.c,v 1.1 2013/04/16 10:37:39 matt Exp $ */ + +/* + * Written by Ben Harris, 2000. This file is in the Public Domain. + */ + +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __ae
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: matt Date: Sun Feb 3 07:14:41 UTC 2013 Added Files: src/lib/libc/arch/arm/hardfloat: fabs.S Log Message: Add hardfloat version of fabs using the vabs.f64 instruction To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/hardfloat/fabs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/hardfloat/fabs.S diff -u /dev/null src/lib/libc/arch/arm/hardfloat/fabs.S:1.1 --- /dev/null Sun Feb 3 07:14:41 2013 +++ src/lib/libc/arch/arm/hardfloat/fabs.S Sun Feb 3 07:14:41 2013 @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +RCSID("$NetBSD: fabs.S,v 1.1 2013/02/03 07:14:41 matt Exp $") + + .fpu vfp + +ENTRY(fabs) + vabs.f64 d0, d0 + RET +END(fabs)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sun Feb 3 01:55:19 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Add support for earmhf and earmhfeb and add SRCS.hardfloat. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.19 src/lib/libc/arch/arm/Makefile.inc:1.20 --- src/lib/libc/arch/arm/Makefile.inc:1.19 Tue Jan 29 19:15:52 2013 +++ src/lib/libc/arch/arm/Makefile.inc Sun Feb 3 01:55:19 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.19 2013/01/29 19:15:52 matt Exp $ +# $NetBSD: Makefile.inc,v 1.20 2013/02/03 01:55:19 matt Exp $ .include @@ -6,7 +6,7 @@ SRCS+= __aeabi_read_tp.S __sigaction14_s CPPFLAGS += -I. -.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" +.if ${MACHINE_ARCH:Mearm*} != "" SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c @@ -23,4 +23,12 @@ SOFTFLOAT_BITS=32 .endif .include +.else +.PATH : ${ARCHDIR}/hardfloat +SRCS.hardfloat+= fpgetround.c fpgetsticky.S fpgetmask.S +SRCS.hardfloat+= fpsetround.c fpsetmask.S fpsetsticky.S +.for f in ${SRCS.hardfloat} +CPPFLAGS.${f} += -mfpu=vfp +.endfor +SRCS+= ${SRCS.hardfloat} .endif
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: matt Date: Sun Feb 3 01:50:54 UTC 2013 Modified Files: src/lib/libc/arch/arm/hardfloat: fpsetround.c Log Message: include To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/hardfloat/fpsetround.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/hardfloat/fpsetround.c diff -u src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.7 src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.8 --- src/lib/libc/arch/arm/hardfloat/fpsetround.c:1.7 Fri Jan 11 13:55:26 2013 +++ src/lib/libc/arch/arm/hardfloat/fpsetround.c Sun Feb 3 01:50:54 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetround.c,v 1.7 2013/01/11 13:55:26 matt Exp $ */ +/* $NetBSD: fpsetround.c,v 1.8 2013/02/03 01:50:54 matt Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.7 2013/01/11 13:55:26 matt Exp $"); +__RCSID("$NetBSD: fpsetround.c,v 1.8 2013/02/03 01:50:54 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -43,6 +43,8 @@ __RCSID("$NetBSD: fpsetround.c,v 1.7 201 #include #include +#include + #ifdef __weak_alias __weak_alias(fpsetround,_fpsetround) #endif
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: matt Date: Thu Jan 31 06:47:55 UTC 2013 Modified Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: Reorganize to appease lint. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u src/lib/libc/arch/arm/misc/arm_initfini.c:1.1 src/lib/libc/arch/arm/misc/arm_initfini.c:1.2 --- src/lib/libc/arch/arm/misc/arm_initfini.c:1.1 Tue Jan 29 19:14:54 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Thu Jan 31 06:47:55 2013 @@ -29,7 +29,7 @@ #include -__RCSID("$NetBSD: arm_initfini.c,v 1.1 2013/01/29 19:14:54 matt Exp $"); +__RCSID("$NetBSD: arm_initfini.c,v 1.2 2013/01/31 06:47:55 matt Exp $"); /* * To properly implement setjmp/longjmp for the ARM AAPCS ABI, it has to be @@ -42,6 +42,7 @@ __RCSID("$NetBSD: arm_initfini.c,v 1.1 2 #include #include +#include int _libc_arm_fpu_present; static bool _libc_aapcs_initialized; @@ -51,11 +52,10 @@ void _libc_aapcs_init(void) __attribute_ void _libc_aapcs_init(void) { - if (_libc_aapcs_initialized) - return; - - _libc_aapcs_initialized = true; - size_t len = sizeof(_libc_arm_fpu_present); - (void)sysctlbyname("machdep.fpu_present", &_libc_arm_fpu_present, &len, - NULL, 0); + if (!_libc_aapcs_initialized) { + size_t len = sizeof(_libc_arm_fpu_present); + _libc_aapcs_initialized = true; + (void)sysctlbyname("machdep.fpu_present", + &_libc_arm_fpu_present, &len, NULL, 0); + } }
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Tue Jan 29 19:23:09 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: AAPCS (EABI) requires that VFP D8-D15 are always saved, regardless whether the soft float or hard float ABI is being used. However, if there isn't a FPU that can't be done. So only save/restore them if a FPU is present. When libc initializes, it does a sysctl to determine if there is a FPU and stores the result which _setjmp/setjmp uses. If there was a FPU, the magic in the jmp_buf is changed to reflect that the VFP registers were saved. longjmp uses the magic to determine if it needs to restore the VFP registers. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/gen/setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.9 src/lib/libc/arch/arm/gen/_setjmp.S:1.10 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.9 Fri Jan 25 08:52:16 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Tue Jan 29 19:23:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.9 2013/01/25 08:52:16 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.10 2013/01/29 19:23:09 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -36,6 +36,10 @@ #error FPA is not supported anymore #endif +#ifdef __ARM_EABI__ + .fpu vfp +#endif + #include #include @@ -49,19 +53,33 @@ * The previous signal state is NOT restored. * * Note: r0 is the return value - * r1-r3 are scratch registers in functions + * r1-r3,ip are scratch registers in functions */ ENTRY(_setjmp) ldr r1, .L_setjmp_magic - str r1, [r0] -#ifdef __ARM_PCS_VFP - add r1, r0, #(_JB_REG_D8 * 4) - vstmia r1, {d8-d15} - vmrs r1, fpscr - str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif /* __ARM_PCS_VFP */ +#ifdef __ARM_EABI__ + ldr r2, .Lfpu_present +#ifdef PIC + GOT_INIT(r3, .L_setjmp_got, .L_setjmp_gotinit) + ldr r2, [r2, r3] +#else + ldr r2, [r2] +#endif + teq r2, #0 /* do we have a FPU? */ + beq 1f /* no, don't save VFP registers */ + + orr r1, r1, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) +/* change magic to VFP magic */ + add r2, r0, #(_JB_REG_D8 * 4) + vstmia r2, {d8-d15} + vmrs r2, fpscr + str r2, [r0, #(_JB_REG_FPSCR * 4)] +1: +#endif /* __ARM_EABI__ */ + + str r1, [r0] add r0, r0, #(_JB_REG_R4 * 4) /* Store integer registers */ @@ -71,24 +89,30 @@ ENTRY(_setjmp) RET .L_setjmp_magic: -#ifdef __ARM_PCS_VFP - .word _JB_MAGIC__SETJMP_VFP -#else .word _JB_MAGIC__SETJMP -#endif +#ifdef __ARM_EABI__ + GOT_INITSYM(.L_setjmp_got, .L_setjmp_gotinit) +.Lfpu_present: + .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) +#endif /* __ARM_EABI__ */ ENTRY(_longjmp) - ldr r2, .L_setjmp_magic - ldr r3, [r0] - teq r2, r3 - bne botch - -#ifdef __ARM_PCS_VFP + ldr r2, [r0] /* get magic from jmp_buf */ + bic r3, r2, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) + /* ignore VFP-ness of magic */ + ldr ip, .L_setjmp_magic /* load magic */ + teq ip, r3/* magic correct? */ + bne botch/* no, botch */ + +#ifdef __ARM_EABI__ + teq r3, r2/* did magic change? */ + beq 1f/* no, don't restore VFP */ add r1, r0, #(_JB_REG_D8 * 4) vldmia r1, {d8-d15} ldr r1, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r1 -#endif /* __ARM_PCS_VFP */ +1: +#endif /* __ARM_EABI__ */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.11 src/lib/libc/arch/arm/gen/setjmp.S:1.12 --- src/lib/libc/arch/arm/gen/setjmp.S:1.11 Fri Jan 25 08:52:16 2013 +++ src/lib/libc/arch/arm/gen/setjmp.S Tue Jan 29 19:23:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.11 2013/01/25 08:52:16 matt Exp $ */ +/* $NetBSD: setjmp.S,v 1.12 2013/01/29 19:23:09 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -36,6 +36,10 @@ #error FPA is not supported anymore #endif +#ifdef __ARM_EABI__ + .fpu vfp +#endif + #include #include @@ -59,14 +63,28 @@ ENTRY(__setjmp14) ldmfd sp!, {r0-r2, r14} ldr r1, .Lsetjmp_magic - str r1, [r0] -#ifdef __ARM_PCS_VFP - add r1, r0, #(_JB_REG_D8 * 4) - vstmia r1, {d8-d15} - vmrs r1, fpscr - str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif /* __ARM_PCS_VFP */ +#ifdef __ARM_EABI__ + ldr r2, .Lfpu_present +#ifdef PIC + GOT_INIT(r3, .Lsetjmp_got, .Lsetjmp_gotinit) + ldr r2, [r2, r3] +#else + ldr r2, [r2] +#endif + teq r2, #0 /* do we have a FPU? */ + beq 1f /* no, don't save VFP registers */ + + orr r1, r1, #(_JB_MAGIC_SETJMP ^ _JB_MAGIC_SETJMP_VFP) +/* change magic to VFP magic */ + add r2, r0, #(_JB_REG_D8 * 4) + vstmia r2, {d8-d15} + vmrs r2, fpscr + str r2, [r0, #(_JB_REG_FPSCR * 4)] +1: +#endif /* __ARM_EABI__ */ + + str r1, [r0] /* store magic */ /* Store integer registers */ add r0,
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Tue Jan 29 19:15:52 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: for earm*, add arm_initfini.c To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.18 src/lib/libc/arch/arm/Makefile.inc:1.19 --- src/lib/libc/arch/arm/Makefile.inc:1.18 Sat Jan 26 07:09:41 2013 +++ src/lib/libc/arch/arm/Makefile.inc Tue Jan 29 19:15:52 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.18 2013/01/26 07:09:41 matt Exp $ +# $NetBSD: Makefile.inc,v 1.19 2013/01/29 19:15:52 matt Exp $ .include @@ -11,6 +11,7 @@ SRCS+= __aeabi_ldivmod.S __aeabi_uldivmo SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c SRCS+= fixunsgen64_ieee754.c fixunsdfsi_ieee754.c +SRCS+= arm_initfini.c .endif .if ${MKSOFTFLOAT} != "no"
CVS commit: src/lib/libc/arch/arm/misc
Module Name:src Committed By: matt Date: Tue Jan 29 19:14:54 UTC 2013 Added Files: src/lib/libc/arch/arm/misc: arm_initfini.c Log Message: Add a constructor for EABI to determine if a FPU is present on the system. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/misc/arm_initfini.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/misc/arm_initfini.c diff -u /dev/null src/lib/libc/arch/arm/misc/arm_initfini.c:1.1 --- /dev/null Tue Jan 29 19:14:54 2013 +++ src/lib/libc/arch/arm/misc/arm_initfini.c Tue Jan 29 19:14:54 2013 @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +__RCSID("$NetBSD: arm_initfini.c,v 1.1 2013/01/29 19:14:54 matt Exp $"); + +/* + * To properly implement setjmp/longjmp for the ARM AAPCS ABI, it has to be + * aware of whether there is a FPU is present or not. Regardless of whether + * the hard-float ABI is being used, setjmp needs to save D8-D15. But it can + * only do this if those instructions won't cause an exception. + */ + +#include +#include + +#include + +int _libc_arm_fpu_present; +static bool _libc_aapcs_initialized; + +void _libc_aapcs_init(void) __attribute__((__constructor__, __used__)); + +void +_libc_aapcs_init(void) +{ + if (_libc_aapcs_initialized) + return; + + _libc_aapcs_initialized = true; + size_t len = sizeof(_libc_arm_fpu_present); + (void)sysctlbyname("machdep.fpu_present", &_libc_arm_fpu_present, &len, + NULL, 0); +}
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sat Jan 26 07:09:42 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: Makefile.inc Log Message: When building for earm*, compile __aeabi_[df]cmpun.c and __aeabi_[il]div0.c To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.17 src/lib/libc/arch/arm/Makefile.inc:1.18 --- src/lib/libc/arch/arm/Makefile.inc:1.17 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/Makefile.inc Sat Jan 26 07:09:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.17 2013/01/11 13:55:25 matt Exp $ +# $NetBSD: Makefile.inc,v 1.18 2013/01/26 07:09:41 matt Exp $ .include @@ -9,7 +9,6 @@ CPPFLAGS += -I. .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c -#SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c SRCS+= fixunsgen64_ieee754.c fixunsdfsi_ieee754.c .endif Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.20 src/lib/libc/arch/arm/gen/Makefile.inc:1.21 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.20 Tue Oct 30 12:42:37 2012 +++ src/lib/libc/arch/arm/gen/Makefile.inc Sat Jan 26 07:09:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.20 2012/10/30 12:42:37 christos Exp $ +# $NetBSD: Makefile.inc,v 1.21 2013/01/26 07:09:41 matt Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S @@ -11,6 +11,11 @@ SRCS+= isinff_ieee754.c isinfd_ieee754.c SRCS+= isnanf_ieee754.c isnand_ieee754.c SRCS+= signbitf_ieee754.c signbitd_ieee754.c +.if ${MACHINE_ARCH:Mearm*} != "" +SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c +SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c +.endif + SRCS+= nanf.c SRCS+= setjmp.S
CVS commit: src/lib/libc/arch/arm/softfloat
Module Name:src Committed By: matt Date: Sat Jan 26 07:08:14 UTC 2013 Modified Files: src/lib/libc/arch/arm/softfloat: arm-gcc.h Log Message: Appease clang by making 64-bit literals use ULL To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/softfloat/arm-gcc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/softfloat/arm-gcc.h diff -u src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.3 src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.4 --- src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.3 Sat Dec 24 21:11:16 2005 +++ src/lib/libc/arch/arm/softfloat/arm-gcc.h Sat Jan 26 07:08:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: arm-gcc.h,v 1.3 2005/12/24 21:11:16 perry Exp $ */ +/* $NetBSD: arm-gcc.h,v 1.4 2013/01/26 07:08:14 matt Exp $ */ /* --- @@ -71,7 +71,7 @@ name for the 64-bit integer type. Some defined as the identity macro: `#define LIT64( a ) a'. --- */ -#define LIT64( a ) a##LL +#define LIT64( a ) a##ULL #endif /*
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Sat Jan 26 07:04:23 UTC 2013 Added Files: src/lib/libc/arch/arm/gen: __aeabi_dcmpun.c __aeabi_fcmpun.c Log Message: Add __aeabi_[fd]cmpun for IEEE unordered compares (requires by ARM RTABI). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c \ src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c diff -u /dev/null src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c:1.1 --- /dev/null Sat Jan 26 07:04:23 2013 +++ src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c Sat Jan 26 07:04:22 2013 @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_dcmpun.c,v 1.1 2013/01/26 07:04:22 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +#include + +/* + * result (1, 0) denotes (?, <=>) [2], use for C99 isunordered() + */ + +int +__aeabi_dcmpun(double x, double y) +{ + const union ieee_double_u ux = { .dblu_d = x }; + const union ieee_double_u uy = { .dblu_d = y }; + + return (ux.dblu_dbl.dbl_exp == DBL_EXP_INFNAN + && (ux.dblu_dbl.dbl_frach|ux.dblu_dbl.dbl_fracl) != 0) + || (uy.dblu_dbl.dbl_exp == DBL_EXP_INFNAN + && (uy.dblu_dbl.dbl_frach|uy.dblu_dbl.dbl_fracl) != 0); +} Index: src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c diff -u /dev/null src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c:1.1 --- /dev/null Sat Jan 26 07:04:23 2013 +++ src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c Sat Jan 26 07:04:22 2013 @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: __aeabi_fcmpun.c,v 1.1 2013/01/26 07:04:22 matt Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +#include + +/* + * result (1, 0) denotes (?, <=>) [2], u
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Fri Jan 25 08:52:16 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: Use __ARM_PCS_VFP to determine whether the VFP is being used. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/gen/setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.8 src/lib/libc/arch/arm/gen/_setjmp.S:1.9 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.8 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Fri Jan 25 08:52:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.8 2013/01/11 13:55:25 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.9 2013/01/25 08:52:16 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -32,7 +32,7 @@ * SUCH DAMAGE. */ -#if !defined(__SOFTFP__) && !defined(__VFP_FP__) +#if !defined(__SOFTFP__) && !defined(__VFP_FP__) && !defined(__ARM_PCS) #error FPA is not supported anymore #endif @@ -56,12 +56,12 @@ ENTRY(_setjmp) ldr r1, .L_setjmp_magic str r1, [r0] -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vstmia r1, {d8-d15} vmrs r1, fpscr str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Store integer registers */ @@ -71,10 +71,10 @@ ENTRY(_setjmp) RET .L_setjmp_magic: -#ifdef __SOFTFP__ - .word _JB_MAGIC__SETJMP -#else +#ifdef __ARM_PCS_VFP .word _JB_MAGIC__SETJMP_VFP +#else + .word _JB_MAGIC__SETJMP #endif ENTRY(_longjmp) @@ -83,12 +83,12 @@ ENTRY(_longjmp) teq r2, r3 bne botch -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vldmia r1, {d8-d15} ldr r1, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r1 -#endif +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.10 src/lib/libc/arch/arm/gen/setjmp.S:1.11 --- src/lib/libc/arch/arm/gen/setjmp.S:1.10 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/gen/setjmp.S Fri Jan 25 08:52:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.10 2013/01/11 13:55:25 matt Exp $ */ +/* $NetBSD: setjmp.S,v 1.11 2013/01/25 08:52:16 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -32,7 +32,7 @@ * SUCH DAMAGE. */ -#if !defined(__SOFTFP__) && !defined(__VFP_FP__) +#if !defined(__SOFTFP__) && !defined(__VFP_FP__) && !defined(__ARM_PCS) #error FPA is not supported anymore #endif @@ -61,12 +61,12 @@ ENTRY(__setjmp14) ldr r1, .Lsetjmp_magic str r1, [r0] -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vstmia r1, {d8-d15} vmrs r1, fpscr str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif /* !__SOFTFP__ */ +#endif /* __ARM_PCS_VFP */ /* Store integer registers */ add r0, r0, #(_JB_REG_R4 * 4) @@ -75,10 +75,10 @@ ENTRY(__setjmp14) RET .Lsetjmp_magic: -#ifdef __SOFTFP__ - .word _JB_MAGIC_SETJMP -#else +#ifdef __ARM_PCS_VFP .word _JB_MAGIC_SETJMP_VFP +#else + .word _JB_MAGIC_SETJMP #endif @@ -96,12 +96,12 @@ ENTRY(__longjmp14) bl PIC_SYM(_C_LABEL(__sigprocmask14), PLT) ldmfd sp!, {r0-r2, r14} -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vldmia r1, {d8-d15} ldr r1, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r1 -#endif /* !__SOFTFP__ */ +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */
CVS commit: src/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Wed Jan 23 05:44:52 UTC 2013 Added Files: src/lib/libc/arch/arm/string: strncat_naive.S Log Message: Add simple version of strncat for ARM. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/string/strncat_naive.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/string/strncat_naive.S diff -u /dev/null src/lib/libc/arch/arm/string/strncat_naive.S:1.1 --- /dev/null Wed Jan 23 05:44:52 2013 +++ src/lib/libc/arch/arm/string/strncat_naive.S Wed Jan 23 05:44:52 2013 @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +RCSID("$NetBSD: strncat_naive.S,v 1.1 2013/01/23 05:44:52 matt Exp $") + +/* LINTSTUB: char *strncat(char *, const char *, size_t) */ +ENTRY(strncat) + teq r2, #0 /* count is 0? */ + RETc(eq) /* yes, just return dst */ + mov ip, r0 /* need to preserve r0 */ +1: ldrb r3, [ip], #1 /* load next byte */ + teq r3, #0 /* was it a NUL? */ + bne 1b /* no, get next byte */ + sub ip, ip, #1 /* back up one to the NUL */ +2: subs r2, r2, #1 /* subtract 1 from the count */ + blt 3f /* <0? write terminating NUL */ + ldrb r3, [r1], #1 /* load next byte from append */ + strb r3, [ip], #1 /* store it */ + teq r3, #0 /* was it a NUL? */ + bne 2b /* no, get next byte */ + RET/* return */ +3: mov r3, #0 /* load a NUL */ + strb r3, [ip] /* store it */ + RET/* return */ +END(strncat)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Nov 28 02:18:25 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Add missing registers. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.8 src/lib/libc/arch/arm/gen/swapcontext.S:1.9 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.8 Thu Sep 27 11:20:20 2012 +++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Nov 28 02:18:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.9 2012/11/28 02:18:24 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,15 +33,15 @@ #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.9 2012/11/28 02:18:24 matt Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) stmfd sp!, {r0-r1, lr} /* Must save oucp, ucp, lr. */ - sub sp, #4 + sub sp, sp, #4 bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 - add sp, #4 + add sp, sp, #4 ldmfd sp!, {r0-r1, lr} RETc(ne) str sp, [r0, #_UC_REGS_SP] /* Adjust saved SP. */
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Tue Nov 20 22:02:46 UTC 2012 Modified Files: src/lib/libc/arch/arm/sys: __aeabi_read_tp.S Log Message: Add $NetBSD$ tag. Use ip to save r1 instead of the stack. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__aeabi_read_tp.S diff -u src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.2 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.3 --- src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.2 Tue Feb 14 17:32:43 2012 +++ src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Tue Nov 20 22:02:46 2012 @@ -1,13 +1,20 @@ +/* $NetBSD: __aeabi_read_tp.S,v 1.3 2012/11/20 22:02:46 matt Exp $ */ + #include "SYS.h" +/* + * Implementations of this function should corrupt only the result register + * (r0) and the non-parameter integer core registers allowed to be corrupted + * by the [AAPCS] (ip, lr, and CPSR). + */ ENTRY(__aeabi_read_tp) - mrc p15, 0, r0, c13, c0, 3 + mrc p15, 0, r0, c13, c0, 3 #ifndef _ARM_ARCH_6 - cmp r0, #0 /* was it zero? */ + cmp r0, #0 /* was it zero? */ RETc(ne) /* return it's not zero */ - push {r1} /* syscall zeroes r1 */ + mov ip, r1 /* syscall zeroes r1 */ SYSTRAP(_lwp_getprivate) /* can't fail */ - pop {r1} /* restore r1 */ + mov r1, ip /* restore r1 */ #endif RET _END(__aeabi_read_tp)
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: christos Date: Tue Oct 30 12:42:37 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: add new files to fix static linking To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.19 src/lib/libc/arch/arm/gen/Makefile.inc:1.20 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.19 Tue Oct 9 22:15:03 2012 +++ src/lib/libc/arch/arm/gen/Makefile.inc Tue Oct 30 08:42:37 2012 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.19 2012/10/10 02:15:03 christos Exp $ +# $NetBSD: Makefile.inc,v 1.20 2012/10/30 12:42:37 christos Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ - fabs.c flt_rounds.c modsi3.S umodsi3.S + fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: christos Date: Wed Oct 10 02:15:03 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: add split files To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.18 src/lib/libc/arch/arm/gen/Makefile.inc:1.19 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.18 Mon Jul 30 08:57:54 2012 +++ src/lib/libc/arch/arm/gen/Makefile.inc Tue Oct 9 22:15:03 2012 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.18 2012/07/30 12:57:54 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.19 2012/10/10 02:15:03 christos Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ - fabs.c flt_rounds.c + fabs.c flt_rounds.c modsi3.S umodsi3.S # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: skrll Date: Thu Sep 27 11:20:21 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: swapcontext.S Added Files: src/lib/libc/arch/arm: genassym.cf Log Message: Remove magic numbers. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/genassym.cf cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.15 src/lib/libc/arch/arm/Makefile.inc:1.16 --- src/lib/libc/arch/arm/Makefile.inc:1.15 Mon Aug 6 07:55:21 2012 +++ src/lib/libc/arch/arm/Makefile.inc Thu Sep 27 11:20:20 2012 @@ -1,10 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.15 2012/08/06 07:55:21 matt Exp $ +# $NetBSD: Makefile.inc,v 1.16 2012/09/27 11:20:20 skrll Exp $ .include SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +CPPFLAGS += -I. CPPFLAGS += -DSOFTFLOAT + .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.7 src/lib/libc/arch/arm/gen/swapcontext.S:1.8 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.7 Thu Sep 27 09:53:53 2012 +++ src/lib/libc/arch/arm/gen/swapcontext.S Thu Sep 27 11:20:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.7 2012/09/27 09:53:53 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,9 +30,10 @@ */ #include "SYS.h" +#include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.7 2012/09/27 09:53:53 skrll Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.8 2012/09/27 11:20:20 skrll Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -43,8 +44,8 @@ ENTRY(swapcontext) add sp, #4 ldmfd sp!, {r0-r1, lr} RETc(ne) - str sp, [r0, #(36 + 13*4)] /* Adjust saved SP. */ - str lr, [r0, #(36 + 15*4)] /* Adjust saved PC. */ + str sp, [r0, #_UC_REGS_SP] /* Adjust saved SP. */ + str lr, [r0, #_UC_REGS_PC] /* Adjust saved PC. */ #ifdef SOFTFLOAT /* Ahem. */ #endif Added files: Index: src/lib/libc/arch/arm/genassym.cf diff -u /dev/null src/lib/libc/arch/arm/genassym.cf:1.1 --- /dev/null Thu Sep 27 11:20:21 2012 +++ src/lib/libc/arch/arm/genassym.cf Thu Sep 27 11:20:20 2012 @@ -0,0 +1,36 @@ +# $NetBSD: genassym.cf,v 1.1 2012/09/27 11:20:20 skrll Exp $ + +# +# Copyright (c) 2012 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Nick Hudson +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +include +include + +define _UC_REGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) +define _UC_REGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Thu Sep 27 09:53:53 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Fixup the stack pointer in the ucontext returned by getcontext. This fixes the following tests lib/libc/sys/t_swapcontext.c lib/libpthread/t_swapcontext.c To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.6 src/lib/libc/arch/arm/gen/swapcontext.S:1.7 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.6 Sun Aug 5 05:10:38 2012 +++ src/lib/libc/arch/arm/gen/swapcontext.S Thu Sep 27 09:53:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.7 2012/09/27 09:53:53 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.7 2012/09/27 09:53:53 skrll Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) @@ -43,6 +43,7 @@ ENTRY(swapcontext) add sp, #4 ldmfd sp!, {r0-r1, lr} RETc(ne) + str sp, [r0, #(36 + 13*4)] /* Adjust saved SP. */ str lr, [r0, #(36 + 15*4)] /* Adjust saved PC. */ #ifdef SOFTFLOAT /* Ahem. */
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 6 07:55:22 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Use the generic fixuns ieee754 instead of the ones from softfloat. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.14 src/lib/libc/arch/arm/Makefile.inc:1.15 --- src/lib/libc/arch/arm/Makefile.inc:1.14 Mon Aug 6 01:54:21 2012 +++ src/lib/libc/arch/arm/Makefile.inc Mon Aug 6 07:55:21 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2012/08/06 01:54:21 matt Exp $ +# $NetBSD: Makefile.inc,v 1.15 2012/08/06 07:55:21 matt Exp $ .include @@ -8,7 +8,8 @@ CPPFLAGS += -DSOFTFLOAT .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c -CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS +SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c +SRCS+= fixunsgen64_ieee754.c fixunsdfsi_ieee754.c .endif # for earm, use the 64-bit softfloat
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 6 01:54:21 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Don't need -I${.CURDIR}/arch/arm anymore To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.13 src/lib/libc/arch/arm/Makefile.inc:1.14 --- src/lib/libc/arch/arm/Makefile.inc:1.13 Sun Aug 5 06:34:44 2012 +++ src/lib/libc/arch/arm/Makefile.inc Mon Aug 6 01:54:21 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.13 2012/08/05 06:34:44 matt Exp $ +# $NetBSD: Makefile.inc,v 1.14 2012/08/06 01:54:21 matt Exp $ .include @@ -7,6 +7,7 @@ SRCS+= __aeabi_read_tp.S __sigaction14_s CPPFLAGS += -DSOFTFLOAT .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S +SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS .endif
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 6 01:53:08 UTC 2012 Removed Files: src/lib/libc/arch/arm: aeabi.h Log Message: Moving this to in sys To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/lib/libc/arch/arm/aeabi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Mon Aug 6 01:49:27 UTC 2012 Added Files: src/lib/libc/arch/arm: aeabi.h Log Message: Mostly for reference, this header defines the "C" portion of the ARM run time API for AAPCS (EABI). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/aeabi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/aeabi.h diff -u /dev/null src/lib/libc/arch/arm/aeabi.h:1.1 --- /dev/null Mon Aug 6 01:49:27 2012 +++ src/lib/libc/arch/arm/aeabi.h Mon Aug 6 01:49:27 2012 @@ -0,0 +1,198 @@ +/* $NetBSD: aeabi.h,v 1.1 2012/08/06 01:49:27 matt Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _ARM_AEABI_H_ +#define _ARM_AEABI_H_ + +#define __value_in_regs /* nothing */ + +/* + * Standard double precision floating-point arithmetic helper functions + */ +double __aeabi_dadd(double, double); // double-precision addition +double __aeabi_ddiv(double n, double d); // double-precision division, n / d +double __aeabi_dmul(double, double); // double-precision multiplication +double __aeabi_drsub(double x, double y); // double-precision reverse subtraction, y - x +double __aeabi_dsub(double x, double y); // double-precision subtraction, x - y +double __aeabi_dneg(double); // double-precision negation (obsolete, to be removed in r2.09) + +/* + * Double precision floating-point comparison helper functions + */ +void __aeabi_cdcmpeq(double, double); // non-excepting equality comparison [1], result in PSR ZC flags +void __aeabi_cdcmple(double, double); // 3-way (<, =, >) compare [1], result in PSR ZC flags +void __aeabi_cdrcmple(double, double); // reversed 3-way (<, =, >) compare [1], result in PSR ZC flags +int __aeabi_dcmpeq(double, double); // result (1, 0) denotes (=, <>) [2], use for C == and != +int __aeabi_dcmplt(double, double); // result (1, 0) denotes (<, >=) [2], use for C < +int __aeabi_dcmple(double, double); // result (1, 0) denotes (<=, >) [2], use for C <= +int __aeabi_dcmpge(double, double); // result (1, 0) denotes (>=, <) [2], use for C >= +int __aeabi_dcmpgt(double, double); // result (1, 0) denotes (>, <=) [2], use for C > +int __aeabi_dcmpun(double, double); // result (1, 0) denotes (?, <=>) [2], use for C99 isunordered() + +/* + * Standard single precision floating-point arithmetic helper functions + */ +float __aeabi_fadd(float, float); // single-precision addition +float __aeabi_fdiv(float n, float d); // single-precision division, n / d +float __aeabi_fmul(float, float); // single-precision multiplication +float __aeabi_frsub(float x, float y); // single-precision reverse subtraction, y - x +float __aeabi_fsub(float x, float y); // single-precision subtraction, x - y +float __aeabi_fneg(float); // single-precision negation (obsolete, to be removed in r2.09) + +/* + * Standard single precision floating-point comparison helper functions + */ +void __aeabi_cfcmpeq(float, float); // non-excepting equality comparison [1], result in PSR ZC flags +void __aeabi_cfcmple(float, float); // 3-way (<, =, ?>) compare [1], result in PSR ZC flags +void __aeabi_cfrcmple(float, float); // reversed 3-way (<, =, ?>) compare [1], result in PSR ZC flags +int __aeabi_fcmpeq(float, float); // result (1, 0) denotes (=, <>) [2], use for C == and != +int __aeabi_fcmplt(float, float); // result (1, 0) denotes (<, >=) [2], use for C < +int __aeabi_fcmple(float, float)
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sun Aug 5 06:34:44 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Only compile __aeabi_*ldivmod for earm/earmeb. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.12 src/lib/libc/arch/arm/Makefile.inc:1.13 --- src/lib/libc/arch/arm/Makefile.inc:1.12 Sun Aug 5 04:54:38 2012 +++ src/lib/libc/arch/arm/Makefile.inc Sun Aug 5 06:34:44 2012 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.12 2012/08/05 04:54:38 matt Exp $ +# $NetBSD: Makefile.inc,v 1.13 2012/08/05 06:34:44 matt Exp $ .include SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S -SRCS+= __aeabi_uldivmod.S CPPFLAGS += -DSOFTFLOAT .if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" +SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS .endif
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Sun Aug 5 05:10:38 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: swapcontext.S Log Message: Ensure stack alignment. "looks fine" matt@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/swapcontext.S diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.5 src/lib/libc/arch/arm/gen/swapcontext.S:1.6 --- src/lib/libc/arch/arm/gen/swapcontext.S:1.5 Mon Apr 28 20:22:55 2008 +++ src/lib/libc/arch/arm/gen/swapcontext.S Sun Aug 5 05:10:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $ */ +/* $NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,13 +32,15 @@ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) -RCSID("$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $") +RCSID("$NetBSD: swapcontext.S,v 1.6 2012/08/05 05:10:38 skrll Exp $") #endif /* LIBC_SCCS && !lint */ ENTRY(swapcontext) stmfd sp!, {r0-r1, lr} /* Must save oucp, ucp, lr. */ + sub sp, #4 bl PIC_SYM(_C_LABEL(_getcontext), PLT) /* getcontext(oucp) */ cmp r0, #0 + add sp, #4 ldmfd sp!, {r0-r1, lr} RETc(ne) str lr, [r0, #(36 + 15*4)] /* Adjust saved PC. */
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sun Aug 5 04:54:39 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: For ARM EABI, we need -DDSOFTFLOAT_NEED_FIXUNS too. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.11 src/lib/libc/arch/arm/Makefile.inc:1.12 --- src/lib/libc/arch/arm/Makefile.inc:1.11 Sun Aug 5 04:30:46 2012 +++ src/lib/libc/arch/arm/Makefile.inc Sun Aug 5 04:54:38 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2012/08/05 04:30:46 matt Exp $ +# $NetBSD: Makefile.inc,v 1.12 2012/08/05 04:54:38 matt Exp $ .include @@ -6,6 +6,9 @@ SRCS+= __aeabi_read_tp.S __sigaction14_s SRCS+= __aeabi_uldivmod.S CPPFLAGS += -DSOFTFLOAT +.if ${MACHINE_ARCH} == "earm" || ${MACHINE_ARCH} == "earmeb" +CPPFLAGS += -DSOFTFLOAT_NEED_FIXUNS +.endif # for earm, use the 64-bit softfloat .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sun Aug 5 04:30:46 UTC 2012 Modified Files: src/lib/libc/arch/arm: Makefile.inc Log Message: Add __aeabi_uldivmod (unsigned long long div/mod). Only use 32-bit softfloat if arm/armeb. earm/earmeb will use the 64-bit softfloat. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.10 src/lib/libc/arch/arm/Makefile.inc:1.11 --- src/lib/libc/arch/arm/Makefile.inc:1.10 Fri Nov 18 16:10:02 2011 +++ src/lib/libc/arch/arm/Makefile.inc Sun Aug 5 04:30:46 2012 @@ -1,10 +1,15 @@ -# $NetBSD: Makefile.inc,v 1.10 2011/11/18 16:10:02 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.11 2012/08/05 04:30:46 matt Exp $ .include SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S +SRCS+= __aeabi_uldivmod.S CPPFLAGS += -DSOFTFLOAT +# for earm, use the 64-bit softfloat +.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb" SOFTFLOAT_BITS=32 +.endif + .include
CVS commit: src/lib/libc/arch/arm/hardfloat
Module Name:src Committed By: matt Date: Wed Aug 1 06:10:21 UTC 2012 Modified Files: src/lib/libc/arch/arm/hardfloat: fpgetmask.S fpgetsticky.S fpsetmask.S fpsetsticky.S Log Message: Error out if compiled with -mfp=vfp and -mhard-float To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/arm/hardfloat/fpgetmask.S \ src/lib/libc/arch/arm/hardfloat/fpgetsticky.S \ src/lib/libc/arch/arm/hardfloat/fpsetmask.S \ src/lib/libc/arch/arm/hardfloat/fpsetsticky.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/hardfloat/fpgetmask.S diff -u src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.4 src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.5 --- src/lib/libc/arch/arm/hardfloat/fpgetmask.S:1.4 Sat Aug 21 11:21:00 2004 +++ src/lib/libc/arch/arm/hardfloat/fpgetmask.S Wed Aug 1 06:10:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.S,v 1.4 2004/08/21 11:21:00 rearnsha Exp $ */ +/* $NetBSD: fpgetmask.S,v 1.5 2012/08/01 06:10:21 matt Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -45,7 +45,11 @@ ENTRY(_fpgetmask) #else ENTRY(fpgetmask) #endif +#ifdef __VFP_FP__ +#error _fpgetmask VFP support missing +#else rfs r0 mov r0, r0, lsr #16 and r0, r0, #0x1f RET +#endif Index: src/lib/libc/arch/arm/hardfloat/fpgetsticky.S diff -u src/lib/libc/arch/arm/hardfloat/fpgetsticky.S:1.4 src/lib/libc/arch/arm/hardfloat/fpgetsticky.S:1.5 --- src/lib/libc/arch/arm/hardfloat/fpgetsticky.S:1.4 Sat Aug 21 11:21:00 2004 +++ src/lib/libc/arch/arm/hardfloat/fpgetsticky.S Wed Aug 1 06:10:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.S,v 1.4 2004/08/21 11:21:00 rearnsha Exp $ */ +/* $NetBSD: fpgetsticky.S,v 1.5 2012/08/01 06:10:21 matt Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -45,6 +45,10 @@ ENTRY(_fpgetsticky) #else ENTRY(fpgetsticky) #endif +#ifdef __VFP_FP__ +#error _fpgetsticky VFP support missing +#else rfs r0 and r0, r0, #0x1f RET +#endif Index: src/lib/libc/arch/arm/hardfloat/fpsetmask.S diff -u src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.4 src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.5 --- src/lib/libc/arch/arm/hardfloat/fpsetmask.S:1.4 Sat Aug 21 11:21:00 2004 +++ src/lib/libc/arch/arm/hardfloat/fpsetmask.S Wed Aug 1 06:10:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.S,v 1.4 2004/08/21 11:21:00 rearnsha Exp $ */ +/* $NetBSD: fpsetmask.S,v 1.5 2012/08/01 06:10:21 matt Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -45,6 +45,9 @@ ENTRY(_fpsetmask) #else ENTRY(fpsetmask) #endif +#ifdef __VFP_FP__ +#error _fpsetmask VFP support missing +#else rfs r1 bic r1, r1, #0x001f and r0, r0, #0x001f @@ -52,3 +55,4 @@ ENTRY(fpsetmask) wfs r0 mov r0, r1, lsr #16 /* Return old mask */ RET +#endif Index: src/lib/libc/arch/arm/hardfloat/fpsetsticky.S diff -u src/lib/libc/arch/arm/hardfloat/fpsetsticky.S:1.4 src/lib/libc/arch/arm/hardfloat/fpsetsticky.S:1.5 --- src/lib/libc/arch/arm/hardfloat/fpsetsticky.S:1.4 Sat Aug 21 11:21:00 2004 +++ src/lib/libc/arch/arm/hardfloat/fpsetsticky.S Wed Aug 1 06:10:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.S,v 1.4 2004/08/21 11:21:00 rearnsha Exp $ */ +/* $NetBSD: fpsetsticky.S,v 1.5 2012/08/01 06:10:21 matt Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -45,6 +45,9 @@ ENTRY(_fpsetsticky) #else ENTRY(fpsetsticky) #endif +#ifdef __VFP_FP__ +#error _fpsetsticky VFP support missing +#else rfs r1 bic r1, r1, #0x1f and r0, r0, #0x1f @@ -52,3 +55,4 @@ ENTRY(fpsetsticky) wfs r0 mov r0, r1 /* Return old mask */ RET +#endif
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Wed Aug 1 06:02:13 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: Add #error cases in case someone tries to compile hardfloat VFP libraries. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/gen/setjmp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.6 src/lib/libc/arch/arm/gen/_setjmp.S:1.7 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.6 Sat Aug 21 11:20:10 2004 +++ src/lib/libc/arch/arm/gen/_setjmp.S Wed Aug 1 06:02:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.6 2004/08/21 11:20:10 rearnsha Exp $ */ +/* $NetBSD: _setjmp.S,v 1.7 2012/08/01 06:02:13 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -53,6 +53,8 @@ ENTRY(_setjmp) str r1, [r0], #4 #ifdef SOFTFLOAT add r0, r0, #52 +#elif defined(__VFP_FP__) +#error _setjmp VFP support missing #else /* Store fp registers */ sfm f4, 4, [r0], #48 @@ -77,6 +79,8 @@ ENTRY(_longjmp) #ifdef SOFTFLOAT add r0, r0, #52 +#elif defined(__VFP_FP__) +#error _longjmp VFP support missing #else /* Restore fp registers */ lfm f4, 4, [r0], #48 Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.8 src/lib/libc/arch/arm/gen/setjmp.S:1.9 --- src/lib/libc/arch/arm/gen/setjmp.S:1.8 Sun Oct 16 17:26:24 2005 +++ src/lib/libc/arch/arm/gen/setjmp.S Wed Aug 1 06:02:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.8 2005/10/16 17:26:24 christos Exp $ */ +/* $NetBSD: setjmp.S,v 1.9 2012/08/01 06:02:13 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -59,6 +59,8 @@ ENTRY(__setjmp14) #ifdef SOFTFLOAT add r0, r0, #52 +#elif defined(__VFP_FP__) +#error __setjmp14 VFP support missing #else /* Store fp registers */ sfm f4, 4, [r0], #48 @@ -92,6 +94,8 @@ ENTRY(__longjmp14) add r0, r0, #4 #ifdef SOFTFLOAT add r0, r0, #52 +#elif defined(__VFP_FP__) +#error __longjmp14 VFP support missing #else /* Restore fp registers */ lfm f4, 4, [r0], #48
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: skrll Date: Mon Jul 30 12:57:55 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: Backout previous. ld.so requires the division routines so this needs more thought. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.17 src/lib/libc/arch/arm/gen/Makefile.inc:1.18 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.17 Wed Jul 11 18:24:27 2012 +++ src/lib/libc/arch/arm/gen/Makefile.inc Mon Jul 30 12:57:54 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.17 2012/07/11 18:24:27 reinoud Exp $ +# $NetBSD: Makefile.inc,v 1.18 2012/07/30 12:57:54 skrll Exp $ -SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c \ +SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ fabs.c flt_rounds.c # Common ieee754 constants and functions
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: reinoud Date: Wed Jul 11 18:24:27 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: On the libc/libgcc clashes cleanup that removed divsi3.o from libc, ARM/evbarm was forgotten. This patch fixes it making static binaries possible again! To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/arch/arm/gen/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.16 src/lib/libc/arch/arm/gen/Makefile.inc:1.17 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.16 Sun Dec 6 07:12:17 2009 +++ src/lib/libc/arch/arm/gen/Makefile.inc Wed Jul 11 18:24:27 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.16 2009/12/06 07:12:17 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.17 2012/07/11 18:24:27 reinoud Exp $ -SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ +SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c \ fabs.c flt_rounds.c # Common ieee754 constants and functions
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: he Date: Wed Mar 21 20:04:57 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: flt_rounds.c Log Message: Use c89 function declaration. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/gen/flt_rounds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/flt_rounds.c diff -u src/lib/libc/arch/arm/gen/flt_rounds.c:1.3 src/lib/libc/arch/arm/gen/flt_rounds.c:1.4 --- src/lib/libc/arch/arm/gen/flt_rounds.c:1.3 Sat Feb 25 00:58:35 2006 +++ src/lib/libc/arch/arm/gen/flt_rounds.c Wed Mar 21 20:04:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $ */ +/* $NetBSD: flt_rounds.c,v 1.4 2012/03/21 20:04:57 he Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -33,7 +33,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: flt_rounds.c,v 1.3 2006/02/25 00:58:35 wiz Exp $"); +__RCSID("$NetBSD: flt_rounds.c,v 1.4 2012/03/21 20:04:57 he Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -75,7 +75,7 @@ static const int map[] = { int __flt_rounds(void); int -__flt_rounds() +__flt_rounds(void) { return(map[fpgetround()]); }
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: christos Date: Wed Mar 21 14:03:06 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: _lwp.c makecontext.c Log Message: no need for linted annotations To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/_lwp.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/gen/makecontext.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_lwp.c diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.6 src/lib/libc/arch/arm/gen/_lwp.c:1.7 --- src/lib/libc/arch/arm/gen/_lwp.c:1.6 Wed Mar 21 05:05:35 2012 +++ src/lib/libc/arch/arm/gen/_lwp.c Wed Mar 21 10:03:06 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $ */ +/* $NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -37,7 +37,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -58,22 +58,15 @@ _lwp_makecontext(ucontext_t *u, void (*s u->uc_stack.ss_sp = stack_base; u->uc_stack.ss_size = stack_size; - /* LINTED - alignment is fixed below. */ - sp = (void **) (stack_base + stack_size); - + sp = (void *) (stack_base + stack_size); /* * Note: We make sure the stack is 8-byte aligned, here. */ - /* LINTED - doesn't lose any bits by this conversion */ - u->uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg; - /* LINTED - doesn't lose any bits by this conversion */ - u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp) & ~7; - /* LINTED - doesn't lose any bits by this conversion */ - u->uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit; - /* LINTED - doesn't lose any bits by this conversion */ - u->uc_mcontext.__gregs[_REG_PC] = (__greg_t) start; - /* LINTED - unsinged long and unsigned int are same size */ - u->uc_mcontext._mc_tlsbase = (uintptr_t)private; + u->uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg; + u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t)(uintptr_t)sp) & ~7; + u->uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit; + u->uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start; + u->uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private; u->uc_flags |= _UC_TLSBASE; } Index: src/lib/libc/arch/arm/gen/makecontext.c diff -u src/lib/libc/arch/arm/gen/makecontext.c:1.3 src/lib/libc/arch/arm/gen/makecontext.c:1.4 --- src/lib/libc/arch/arm/gen/makecontext.c:1.3 Mon Apr 28 16:22:55 2008 +++ src/lib/libc/arch/arm/gen/makecontext.c Wed Mar 21 10:03:06 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $ */ +/* $NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $"); +__RCSID("$NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $"); #endif #include @@ -55,12 +55,12 @@ makecontext(ucontext_t *ucp, void (*func /* Allocate necessary stack space for arguments exceeding r0-3. */ if (argc > 4) sp -= argc - 4; - gr[_REG_SP] = (__greg_t)sp; + gr[_REG_SP] = (__greg_t)(uintptr_t)sp; /* Wipe out frame pointer. */ gr[_REG_FP] = 0; /* Arrange for return via the trampoline code. */ - gr[_REG_LR] = (__greg_t)_resumecontext; - gr[_REG_PC] = (__greg_t)func; + gr[_REG_LR] = (__greg_t)(uintptr_t)_resumecontext; + gr[_REG_PC] = (__greg_t)(uintptr_t)func; va_start(ap, argc); /* Pass up to four arguments in r0-3. */
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: bsh Date: Wed Mar 21 09:05:36 UTC 2012 Modified Files: src/lib/libc/arch/arm/gen: _lwp.c Log Message: shut up lint(1) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/arm/gen/_lwp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/gen/_lwp.c diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.5 src/lib/libc/arch/arm/gen/_lwp.c:1.6 --- src/lib/libc/arch/arm/gen/_lwp.c:1.5 Thu Feb 24 04:28:41 2011 +++ src/lib/libc/arch/arm/gen/_lwp.c Wed Mar 21 09:05:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $ */ +/* $NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -37,7 +37,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:41 joerg Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -58,16 +58,22 @@ _lwp_makecontext(ucontext_t *u, void (*s u->uc_stack.ss_sp = stack_base; u->uc_stack.ss_size = stack_size; + /* LINTED - alignment is fixed below. */ sp = (void **) (stack_base + stack_size); /* * Note: We make sure the stack is 8-byte aligned, here. */ + /* LINTED - doesn't lose any bits by this conversion */ u->uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg; + /* LINTED - doesn't lose any bits by this conversion */ u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp) & ~7; + /* LINTED - doesn't lose any bits by this conversion */ u->uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit; + /* LINTED - doesn't lose any bits by this conversion */ u->uc_mcontext.__gregs[_REG_PC] = (__greg_t) start; + /* LINTED - unsinged long and unsigned int are same size */ u->uc_mcontext._mc_tlsbase = (uintptr_t)private; u->uc_flags |= _UC_TLSBASE; }
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: matt Date: Tue Feb 14 17:32:43 UTC 2012 Modified Files: src/lib/libc/arch/arm/sys: __aeabi_read_tp.S Log Message: Add workaround for ARM cores that don't properly implement the MRC instruction used for reading the thread pointer. This is the corresponding change which was made to To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/__aeabi_read_tp.S diff -u src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.1 src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.2 --- src/lib/libc/arch/arm/sys/__aeabi_read_tp.S:1.1 Fri Nov 18 16:10:02 2011 +++ src/lib/libc/arch/arm/sys/__aeabi_read_tp.S Tue Feb 14 17:32:43 2012 @@ -2,4 +2,12 @@ ENTRY(__aeabi_read_tp) mrc p15, 0, r0, c13, c0, 3 +#ifndef _ARM_ARCH_6 + cmp r0, #0 /* was it zero? */ + RETc(ne) /* return it's not zero */ + push {r1} /* syscall zeroes r1 */ + SYSTRAP(_lwp_getprivate) /* can't fail */ + pop {r1} /* restore r1 */ +#endif RET +_END(__aeabi_read_tp)
CVS commit: src/lib/libc/arch/arm/sys
Module Name:src Committed By: nonaka Date: Fri May 13 23:14:36 UTC 2011 Modified Files: src/lib/libc/arch/arm/sys: brk.S sbrk.S Log Message: Use "_end" instead of "end" for consistency with other architectures. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/sys/brk.S \ src/lib/libc/arch/arm/sys/sbrk.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/sys/brk.S diff -u src/lib/libc/arch/arm/sys/brk.S:1.8 src/lib/libc/arch/arm/sys/brk.S:1.9 --- src/lib/libc/arch/arm/sys/brk.S:1.8 Sat Aug 21 11:30:17 2004 +++ src/lib/libc/arch/arm/sys/brk.S Fri May 13 23:14:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.8 2004/08/21 11:30:17 rearnsha Exp $ */ +/* $NetBSD: brk.S,v 1.9 2011/05/13 23:14:36 nonaka Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -33,7 +33,7 @@ #include "SYS.h" - .globl _C_LABEL(end) + .globl _C_LABEL(_end) .globl CURBRK #ifdef WEAK_ALIAS @@ -45,7 +45,7 @@ .globl _C_LABEL(__minbrk) .type _C_LABEL(__minbrk),#object _C_LABEL(__minbrk): - .word _C_LABEL(end) + .word _C_LABEL(_end) /* * Change the data segment size Index: src/lib/libc/arch/arm/sys/sbrk.S diff -u src/lib/libc/arch/arm/sys/sbrk.S:1.8 src/lib/libc/arch/arm/sys/sbrk.S:1.9 --- src/lib/libc/arch/arm/sys/sbrk.S:1.8 Sat Aug 21 11:30:17 2004 +++ src/lib/libc/arch/arm/sys/sbrk.S Fri May 13 23:14:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.8 2004/08/21 11:30:17 rearnsha Exp $ */ +/* $NetBSD: sbrk.S,v 1.9 2011/05/13 23:14:36 nonaka Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -33,7 +33,7 @@ #include "SYS.h" - .globl _C_LABEL(end) + .globl _C_LABEL(_end) #ifdef WEAK_ALIAS WEAK_ALIAS(sbrk, _sbrk) @@ -44,7 +44,7 @@ .globl CURBRK .type CURBRK,#object CURBRK: - .word _C_LABEL(end) + .word _C_LABEL(_end) /* * Change the data segment size
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Fri Jan 14 06:12:17 UTC 2011 Modified Files: src/lib/libc/arch/arm: SYS.h src/lib/libc/arch/arm/sys: cerror.S Log Message: Change __cerror to be marked hidden and change callers to avoid the PLT. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/arm/SYS.h cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/sys/cerror.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.9 src/lib/libc/arch/arm/SYS.h:1.10 --- src/lib/libc/arch/arm/SYS.h:1.9 Sat Aug 21 11:18:40 2004 +++ src/lib/libc/arch/arm/SYS.h Fri Jan 14 06:12:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.9 2004/08/21 11:18:40 rearnsha Exp $ */ +/* $NetBSD: SYS.h,v 1.10 2011/01/14 06:12:16 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -58,7 +58,7 @@ #define _SYSCALL(x, y) \ _SYSCALL_NOERROR(x,y); \ - bcs PIC_SYM(CERROR, PLT) + bcs CERROR #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) Index: src/lib/libc/arch/arm/sys/cerror.S diff -u src/lib/libc/arch/arm/sys/cerror.S:1.6 src/lib/libc/arch/arm/sys/cerror.S:1.7 --- src/lib/libc/arch/arm/sys/cerror.S:1.6 Sat Aug 21 11:30:17 2004 +++ src/lib/libc/arch/arm/sys/cerror.S Fri Jan 14 06:12:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.6 2004/08/21 11:30:17 rearnsha Exp $ */ +/* $NetBSD: cerror.S,v 1.7 2011/01/14 06:12:17 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -33,6 +33,10 @@ #include "SYS.h" +#ifdef PIC + .hidden CERROR +#endif + ASENTRY(CERROR) #ifdef _REENTRANT stmfd sp!, {r4, lr}