CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: christos Date: Sun Apr 25 23:45:58 UTC 2021 Modified Files: src/lib/libc/arch/mips: Makefile.inc src/lib/libc/arch/mips/gdtoa: Makefile.inc Log Message: Use ${MACHINE_MIPS64} To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/mips/Makefile.inc cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/gdtoa/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/mips/Makefile.inc diff -u src/lib/libc/arch/mips/Makefile.inc:1.14 src/lib/libc/arch/mips/Makefile.inc:1.15 --- src/lib/libc/arch/mips/Makefile.inc:1.14 Sun Jan 24 10:55:34 2016 +++ src/lib/libc/arch/mips/Makefile.inc Sun Apr 25 19:45:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2016/01/24 15:55:34 christos Exp $ +# $NetBSD: Makefile.inc,v 1.15 2021/04/25 23:45:58 christos Exp $ .include @@ -14,13 +14,11 @@ CPPFLAGS+= -DSOFTFLOAT SRCS+= fixunsgen_ieee754.c SRCS+= fixunsgen64_ieee754.c #fixunssfdi.c fixunsdfdi.c -.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \ -&& (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) +.if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) SRCS+= fixunstfsi_ieee754.c fixunstfdi_ieee754.c .endif .endif -.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \ -&& (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) +.if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) SRCS+= floatunditf_ieee754.c .endif Index: src/lib/libc/arch/mips/gdtoa/Makefile.inc diff -u src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.4 src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.5 --- src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.4 Thu Jan 20 13:41:39 2011 +++ src/lib/libc/arch/mips/gdtoa/Makefile.inc Sun Apr 25 19:45:58 2021 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.4 2011/01/20 18:41:39 matt Exp $ +# $NetBSD: Makefile.inc,v 1.5 2021/04/25 23:45:58 christos Exp $ SRCS+= strtof.c -.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") +.if ${MACHINE_MIPS64} .if !defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32) SRCS+= strtold_pQ.c SRCS+= strtopQ.c
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: simonb Date: Fri Feb 19 08:33:02 UTC 2021 Modified Files: src/lib/libc/arch/mips/sys: __syscall.S Log Message: Remove the incorrect register shuffle - we pass SYS___syscall as the syscall number in v0 and pass all the original __syscall() args in their original slots/regs. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/mips/sys/__syscall.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/mips/sys/__syscall.S diff -u src/lib/libc/arch/mips/sys/__syscall.S:1.3 src/lib/libc/arch/mips/sys/__syscall.S:1.4 --- src/lib/libc/arch/mips/sys/__syscall.S:1.3 Sat Apr 18 23:55:51 2020 +++ src/lib/libc/arch/mips/sys/__syscall.S Fri Feb 19 08:33:02 2021 @@ -1,31 +1,10 @@ -/* $NetBSD: __syscall.S,v 1.3 2020/04/18 23:55:51 thorpej Exp $ */ +/* $NetBSD: __syscall.S,v 1.4 2021/02/19 08:33:02 simonb Exp $ */ #include "SYS.h" -#ifdef __mips_o32 - RSYSCALL(__syscall) -#else /* ! __mips_o32 */ - -LEAF(__syscall) -PIC_PROLOGUE(__syscall) - move v0, a0 - move a0, a1 - move a1, a2 - move a2, a3 - move a3, a4 - move a4, a5 - move a5, a6 - move a6, a7 - REG_L a7, (sp) -SYSTRAP(__syscall) -bne a3,zero,1f -PIC_RETURN() -1: -PIC_TAILCALL(__cerror) -END(__syscall) +#ifndef __mips_o32 STRONG_ALIAS(_syscall,__syscall) WEAK_ALIAS(syscall,__syscall) - -#endif /* __mips_o32 */ +#endif /* ! __mips_o32 */
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: simonb Date: Sat Feb 6 06:58:59 UTC 2021 Modified Files: src/lib/libc/arch/mips/sys: cerror.S Log Message: For mips n32/n64 explicitly save the GP reg on the stack, and restore it _after_ the call to __errno(). Fixes sending the __errno() call off to nowhereland when this code is included in another library (eg __posix_cerror() in libposix). Failure picked up by the ATF lib/libposix/posix1/t_rename test. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/arch/mips/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/mips/sys/cerror.S diff -u src/lib/libc/arch/mips/sys/cerror.S:1.19 src/lib/libc/arch/mips/sys/cerror.S:1.20 --- src/lib/libc/arch/mips/sys/cerror.S:1.19 Thu Sep 12 15:36:15 2013 +++ src/lib/libc/arch/mips/sys/cerror.S Sat Feb 6 06:58:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.19 2013/09/12 15:36:15 joerg Exp $ */ +/* $NetBSD: cerror.S,v 1.20 2021/02/06 06:58:59 simonb Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)cerror.s 8.1 (Berkeley) 6/16/93") #else - RCSID("$NetBSD: cerror.S,v 1.19 2013/09/12 15:36:15 joerg Exp $") + RCSID("$NetBSD: cerror.S,v 1.20 2021/02/06 06:58:59 simonb Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -50,24 +50,33 @@ .globl _C_LABEL(__errno) NESTED_NOPROFILE(__cerror, CALLFRAME_SIZ, ra) .mask 0x8000, (CALLFRAME_RA - CALLFRAME_SIZ) - PIC_PROLOGUE(__cerror) + PIC_PROLOGUE(__cerror) # saves caller gp in t3 (n32/n64) PTR_SUBU sp, CALLFRAME_SIZ PTR_S ra, CALLFRAME_RA(sp) INT_S v0, CALLFRAME_S0(sp) # save errno value +#if defined(__mips_n32) || defined(__mips_n64) + PTR_S t3, CALLFRAME_GP(sp) # save caller gp (in t3) +#endif SAVE_GP(CALLFRAME_GP) PTR_LA t9, _C_LABEL(__errno) # locate address of errno - RESTORE_GP64# restore GP (from t3) + jalr t9 # __errno() +#if defined(__mips_n32) || defined(__mips_n64) + PTR_L gp, CALLFRAME_GP(sp) # restore caller gp +#endif INT_L t0, CALLFRAME_S0(sp) PTR_L ra, CALLFRAME_RA(sp) INT_S t0, 0(v0) # update errno value PTR_ADDU sp, CALLFRAME_SIZ li v0, -1 li v1, -1 - j ra # GP has been restored. + + # Note we don't use PIC_RETURN() here as the GP is stored + # on the stack and not in the t3 reg (for the n32/n64 case). + j ra END(__cerror) #else .globl _C_LABEL(errno)
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: chs Date: Mon Feb 27 06:55:26 UTC 2017 Modified Files: src/lib/libc/arch/mips/gen: fpsetmask.c fpsetround.c fpsetsticky.c Log Message: fix asm operands: "ctc1" uses the register as an input, not an output. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.c cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/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/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 src/lib/libc/arch/mips/gen/fpsetmask.c:1.10 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetmask(fp_except mask) new = old & ~(0x1f << 7); new |= ((mask & 0x1f) << 7); - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return (old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.10 --- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetsticky.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetsticky(fp_except sticky) new = old & ~(0x1f << 2); new |= (sticky & 0x1f) << 2; - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return (old >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetround.c diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.7 src/lib/libc/arch/mips/gen/fpsetround.c:1.8 --- src/lib/libc/arch/mips/gen/fpsetround.c:1.7 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetround.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetround(fp_rnd rnd_dir) new = old & ~0x03; new |= rnd_dir & 0x03; - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return old & 0x03; }
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Wed Sep 21 06:49:40 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: _resumecontext.S swapcontext.S Log Message: Fix for [on]{32,64} /usr/tests/lib/libc/sys/t_getcontext /usr/tests/lib/libc/sys/t_swapcontext /usr/tests/lib/libc/sys/t_ucontext /usr/tests/lib/libpthread/t_swapcontext All pass now. Changes amount to - saving GP from caller in context for n{32,64} - performing (the equivalient of) PIC_PROLOGUE for swapcontext and __resumecontext - Call setcontext via the PLT in __resumecontext To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/mips/gen/_resumecontext.S cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/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/mips/gen/_resumecontext.S diff -u src/lib/libc/arch/mips/gen/_resumecontext.S:1.10 src/lib/libc/arch/mips/gen/_resumecontext.S:1.11 --- src/lib/libc/arch/mips/gen/_resumecontext.S:1.10 Sat Aug 13 08:09:17 2016 +++ src/lib/libc/arch/mips/gen/_resumecontext.S Wed Sep 21 06:49:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $ */ +/* $NetBSD: _resumecontext.S,v 1.11 2016/09/21 06:49:39 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $") + RCSID("$NetBSD: _resumecontext.S,v 1.11 2016/09/21 06:49:39 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder @@ -44,17 +44,36 @@ LEAF_NOPROFILE(__resumecontext) /* * We get here not by a call through $t9 but thru $ra after the - * function passed to makecontext returns. + * function passed to makecontext returns. Therefore, we need + * to recover gp from ra */ +#if defined(__mips_o32) || defined(__mips_o64) + .set push + .set noreorder + .cpload ra + .set pop +#endif +#if defined(__mips_n32) || defined(__mips_n64) + .cpsetup ra, t3, __resumecontext +#endif + PTR_SUBU sp, sp, UCONTEXT_SIZE # get space for ucontext move a0, sp# arg0 for getcontext PTR_S zero, _OFFSETOF_UC_LINK(a0) # make sure uc_link is 0 SYSTRAP(getcontext)# get context + +#if defined(__mips_n32) || defined(__mips_n64) + REG_PROLOGUE + /* We saved gp in t2 above */ + REG_S t3, _OFFSETOF_UC_GREGS_GP(a0) + REG_EPILOGUE +#endif + PTR_L a0, _OFFSETOF_UC_LINK(a0) # linked context? NOP_L beq a0, zero, 1f # nope, exit process nop - SYSTRAP(setcontext)# yes, become it. + PIC_TAILCALL(setcontext) # yes, become it. /* NOTREACHED (in theory) */ li a0, -1# failure, 1: Index: src/lib/libc/arch/mips/gen/swapcontext.S diff -u src/lib/libc/arch/mips/gen/swapcontext.S:1.6 src/lib/libc/arch/mips/gen/swapcontext.S:1.7 --- src/lib/libc/arch/mips/gen/swapcontext.S:1.6 Wed Sep 21 06:41:42 2016 +++ src/lib/libc/arch/mips/gen/swapcontext.S Wed Sep 21 06:49:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.7 2016/09/21 06:49:39 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,13 +33,14 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $") + RCSID("$NetBSD: swapcontext.S,v 1.7 2016/09/21 06:49:39 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder NESTED(swapcontext, CALLFRAME_SIZ, ra) .mask 0x8030, (CALLFRAME_RA - CALLFRAME_SIZ) + PIC_PROLOGUE(swapcontext) PTR_SUBU sp, sp, CALLFRAME_SIZ PTR_S ra, CALLFRAME_RA(sp) # save ra PTR_S a0, 0(sp) # stash away oucp @@ -53,6 +54,10 @@ NESTED(swapcontext, CALLFRAME_SIZ, ra) PTR_ADDIU v0, sp, CALLFRAME_SIZ REG_PROLOGUE REG_S zero, _OFFSETOF_UC_GREGS_V0(v1) +#if defined(__mips_n32) || defined(__mips_n64) + /* PIC_PROLOGUE saved gp in t3 */ + REG_S t3, _OFFSETOF_UC_GREGS_GP(v1) +#endif REG_S ra, _OFFSETOF_UC_GREGS_EPC(v1) REG_S v0, _OFFSETOF_UC_GREGS_SP(v1) REG_EPILOGUE
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Wed Sep 21 06:41:42 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: swapcontext.S Log Message: Trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/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/mips/gen/swapcontext.S diff -u src/lib/libc/arch/mips/gen/swapcontext.S:1.5 src/lib/libc/arch/mips/gen/swapcontext.S:1.6 --- src/lib/libc/arch/mips/gen/swapcontext.S:1.5 Wed Sep 12 02:00:52 2012 +++ src/lib/libc/arch/mips/gen/swapcontext.S Wed Sep 21 06:41:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $ */ +/* $NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,11 +33,11 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $") + RCSID("$NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder - + NESTED(swapcontext, CALLFRAME_SIZ, ra) .mask 0x8030, (CALLFRAME_RA - CALLFRAME_SIZ) PTR_SUBU sp, sp, CALLFRAME_SIZ
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Sat Aug 13 08:09:17 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: _resumecontext.S Log Message: Add a NOP_L To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/gen/_resumecontext.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/mips/gen/_resumecontext.S diff -u src/lib/libc/arch/mips/gen/_resumecontext.S:1.9 src/lib/libc/arch/mips/gen/_resumecontext.S:1.10 --- src/lib/libc/arch/mips/gen/_resumecontext.S:1.9 Sat Aug 13 07:49:32 2016 +++ src/lib/libc/arch/mips/gen/_resumecontext.S Sat Aug 13 08:09:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _resumecontext.S,v 1.9 2016/08/13 07:49:32 skrll Exp $ */ +/* $NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: _resumecontext.S,v 1.9 2016/08/13 07:49:32 skrll Exp $") + RCSID("$NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder @@ -51,6 +51,7 @@ LEAF_NOPROFILE(__resumecontext) PTR_S zero, _OFFSETOF_UC_LINK(a0) # make sure uc_link is 0 SYSTRAP(getcontext)# get context PTR_L a0, _OFFSETOF_UC_LINK(a0) # linked context? + NOP_L beq a0, zero, 1f # nope, exit process nop SYSTRAP(setcontext)# yes, become it.
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Sat Aug 13 07:49:32 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: _resumecontext.S Log Message: PIC_TAILCALL on n32/n64 would mess up GP, so just use SYSTRAP to call setcontext. Fixes tests/lib/libc/sys/t_getcontext.c:setcontext_link To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/mips/gen/_resumecontext.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/mips/gen/_resumecontext.S diff -u src/lib/libc/arch/mips/gen/_resumecontext.S:1.8 src/lib/libc/arch/mips/gen/_resumecontext.S:1.9 --- src/lib/libc/arch/mips/gen/_resumecontext.S:1.8 Fri Aug 12 15:21:25 2016 +++ src/lib/libc/arch/mips/gen/_resumecontext.S Sat Aug 13 07:49:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _resumecontext.S,v 1.8 2016/08/12 15:21:25 skrll Exp $ */ +/* $NetBSD: _resumecontext.S,v 1.9 2016/08/13 07:49:32 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: _resumecontext.S,v 1.8 2016/08/12 15:21:25 skrll Exp $") + RCSID("$NetBSD: _resumecontext.S,v 1.9 2016/08/13 07:49:32 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder @@ -53,7 +53,7 @@ LEAF_NOPROFILE(__resumecontext) PTR_L a0, _OFFSETOF_UC_LINK(a0) # linked context? beq a0, zero, 1f # nope, exit process nop - PIC_TAILCALL(setcontext) # yes, become it. + SYSTRAP(setcontext)# yes, become it. /* NOTREACHED (in theory) */ li a0, -1# failure, 1:
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Fri Aug 12 15:21:25 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: _resumecontext.S Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/_resumecontext.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/mips/gen/_resumecontext.S diff -u src/lib/libc/arch/mips/gen/_resumecontext.S:1.7 src/lib/libc/arch/mips/gen/_resumecontext.S:1.8 --- src/lib/libc/arch/mips/gen/_resumecontext.S:1.7 Wed Sep 12 02:00:52 2012 +++ src/lib/libc/arch/mips/gen/_resumecontext.S Fri Aug 12 15:21:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _resumecontext.S,v 1.7 2012/09/12 02:00:52 manu Exp $ */ +/* $NetBSD: _resumecontext.S,v 1.8 2016/08/12 15:21:25 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,12 +35,12 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: _resumecontext.S,v 1.7 2012/09/12 02:00:52 manu Exp $") + RCSID("$NetBSD: _resumecontext.S,v 1.8 2016/08/12 15:21:25 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder .hidden _C_LABEL(__resumecontext) - + LEAF_NOPROFILE(__resumecontext) /* * We get here not by a call through $t9 but thru $ra after the @@ -55,7 +55,7 @@ LEAF_NOPROFILE(__resumecontext) nop PIC_TAILCALL(setcontext) # yes, become it. /* NOTREACHED (in theory) */ - li a0, -1# failure, + li a0, -1# failure, 1: SYSTRAP(exit) # all hope is lost. /* NOTREACHED */
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: skrll Date: Fri Aug 12 15:26:04 UTC 2016 Modified Files: src/lib/libc/arch/mips: genassym.cf src/lib/libc/arch/mips/sys: getcontext.S Log Message: Provide _OFFSETOF_UC_GREGS_GP and use _OFFSETOF_UC_GREGS_* in getcontext To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/mips/genassym.cf cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/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/mips/genassym.cf diff -u src/lib/libc/arch/mips/genassym.cf:1.2 src/lib/libc/arch/mips/genassym.cf:1.3 --- src/lib/libc/arch/mips/genassym.cf:1.2 Mon Dec 14 01:07:41 2009 +++ src/lib/libc/arch/mips/genassym.cf Fri Aug 12 15:26:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.2 2009/12/14 01:07:41 matt Exp $ +# $NetBSD: genassym.cf,v 1.3 2016/08/12 15:26:04 skrll Exp $ # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -36,8 +36,8 @@ include include include -define _OFFSETOF_UC_GREGS offsetof(ucontext_t, uc_mcontext.__gregs[0]) define _OFFSETOF_UC_GREGS_V0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_V0]) +define _OFFSETOF_UC_GREGS_GP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_GP]) define _OFFSETOF_UC_GREGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) define _OFFSETOF_UC_GREGS_EPC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_EPC]) define _OFFSETOF_UC_LINK offsetof(ucontext_t, uc_link) Index: src/lib/libc/arch/mips/sys/getcontext.S diff -u src/lib/libc/arch/mips/sys/getcontext.S:1.5 src/lib/libc/arch/mips/sys/getcontext.S:1.6 --- src/lib/libc/arch/mips/sys/getcontext.S:1.5 Wed Aug 10 16:45:24 2016 +++ src/lib/libc/arch/mips/sys/getcontext.S Fri Aug 12 15:26:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $ */ +/* $NetBSD: getcontext.S,v 1.6 2016/08/12 15:26:04 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $") + RCSID("$NetBSD: getcontext.S,v 1.6 2016/08/12 15:26:04 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ #ifdef WEAK_ALIAS @@ -47,12 +47,12 @@ LEAF(_getcontext) SYSTRAP(getcontext) bne a3, zero, 1f REG_PROLOGUE - REG_S zero, (_OFFSETOF_UC_GREGS + _REG_V0 * SZREG)(a0) + REG_S zero, _OFFSETOF_UC_GREGS_V0(a0) #if !defined(__mips_o32) /* PIC_PROLOGUE saved gp in t3 */ - REG_S t3, (_OFFSETOF_UC_GREGS + _REG_GP * SZREG)(a0) + REG_S t3, _OFFSETOF_UC_GREGS_GP(a0) #endif - REG_S ra, (_OFFSETOF_UC_GREGS + _REG_EPC * SZREG)(a0) + REG_S ra, _OFFSETOF_UC_GREGS_EPC(a0) REG_EPILOGUE PIC_RETURN() 1:
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: skrll Date: Wed Aug 10 16:45:24 UTC 2016 Modified Files: src/lib/libc/arch/mips/sys: getcontext.S Log Message: We need to save the GP of the caller in the context for n32/n64 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/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/mips/sys/getcontext.S diff -u src/lib/libc/arch/mips/sys/getcontext.S:1.4 src/lib/libc/arch/mips/sys/getcontext.S:1.5 --- src/lib/libc/arch/mips/sys/getcontext.S:1.4 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/sys/getcontext.S Wed Aug 10 16:45:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: getcontext.S,v 1.4 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: getcontext.S,v 1.4 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: getcontext.S,v 1.5 2016/08/10 16:45:24 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ #ifdef WEAK_ALIAS @@ -48,6 +48,10 @@ LEAF(_getcontext) bne a3, zero, 1f REG_PROLOGUE REG_S zero, (_OFFSETOF_UC_GREGS + _REG_V0 * SZREG)(a0) +#if !defined(__mips_o32) + /* PIC_PROLOGUE saved gp in t3 */ + REG_S t3, (_OFFSETOF_UC_GREGS + _REG_GP * SZREG)(a0) +#endif REG_S ra, (_OFFSETOF_UC_GREGS + _REG_EPC * SZREG)(a0) REG_EPILOGUE PIC_RETURN()
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Wed Aug 10 16:40:24 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: makecontext.c Log Message: Fix comments To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/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/mips/gen/makecontext.c diff -u src/lib/libc/arch/mips/gen/makecontext.c:1.7 src/lib/libc/arch/mips/gen/makecontext.c:1.8 --- src/lib/libc/arch/mips/gen/makecontext.c:1.7 Tue Sep 20 08:42:29 2011 +++ src/lib/libc/arch/mips/gen/makecontext.c Wed Aug 10 16:40:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: makecontext.c,v 1.7 2011/09/20 08:42:29 joerg Exp $ */ +/* $NetBSD: makecontext.c,v 1.8 2016/08/10 16:40:24 skrll 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.7 2011/09/20 08:42:29 joerg Exp $"); +__RCSID("$NetBSD: makecontext.c,v 1.8 2016/08/10 16:40:24 skrll Exp $"); #endif #include @@ -85,9 +85,8 @@ makecontext(ucontext_t *ucp, void (*func for (i = 0; i < argc && i < 8; i++) /* LINTED __greg_t is safe */ gr[_REG_A0 + i] = va_arg(ap, __greg_t); - /* Pass remaining arguments on the stack above the $a0-3 gap. */ + /* Pass remaining arguments on the stack */ #endif - /* Pass remaining arguments on the stack above the $a0-3 gap. */ for (; i < argc; i++) /* LINTED uintptr_t is safe */ *sp++ = va_arg(ap, __greg_t);
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: christos Date: Sun Jan 24 16:01:56 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: Makefile.inc Log Message: cache stuff needs _KERNTYPES To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libc/arch/mips/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/mips/gen/Makefile.inc diff -u src/lib/libc/arch/mips/gen/Makefile.inc:1.33 src/lib/libc/arch/mips/gen/Makefile.inc:1.34 --- src/lib/libc/arch/mips/gen/Makefile.inc:1.33 Tue Mar 15 03:40:18 2011 +++ src/lib/libc/arch/mips/gen/Makefile.inc Sun Jan 24 11:01:56 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.33 2011/03/15 07:40:18 matt Exp $ +# $NetBSD: Makefile.inc,v 1.34 2016/01/24 16:01:56 christos Exp $ .if ${MKSOFTFLOAT} == "no" SRCS+= fabs.S ldexp.S modf.S @@ -33,6 +33,7 @@ SRCS+= makecontext.c resumecontext.c _re SRCS+= cacheflush.c CPPFLAGS._lwp.c += -D_LIBC_SOURCE +CPPFLAGS.cacheflush.c += -D_KERNTYPES LSRCS.mips.gen= Lint__setjmp.c Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c LSRCS+= ${LSRCS.mips.gen}
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: christos Date: Sun Jan 24 16:01:43 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: longjmp.c Log Message: Use namespace protected types. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/longjmp.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/mips/gen/longjmp.c diff -u src/lib/libc/arch/mips/gen/longjmp.c:1.5 src/lib/libc/arch/mips/gen/longjmp.c:1.6 --- src/lib/libc/arch/mips/gen/longjmp.c:1.5 Thu Mar 29 15:27:05 2012 +++ src/lib/libc/arch/mips/gen/longjmp.c Sun Jan 24 11:01:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: longjmp.c,v 1.5 2012/03/29 19:27:05 christos Exp $ */ +/* $NetBSD: longjmp.c,v 1.6 2016/01/24 16:01:43 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ __longjmp14(jmp_buf env, int val) ucontext_t uc; /* Ensure non-zero SP and sigcontext magic number is present */ - if (sc->sc_regs[_R_SP] == 0 || sc->sc_regs[_R_ZERO] != (mips_reg_t)0xACEDBADEU) + if (sc->sc_regs[_R_SP] == 0 || sc->sc_regs[_R_ZERO] != (__register_t)0xACEDBADEU) goto err; /* Ensure non-zero return value */
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: christos Date: Sun Jan 24 15:55:34 UTC 2016 Modified Files: src/lib/libc/arch/mips: Makefile.inc Log Message: assym.h needs _KERNTYPES To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/mips/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/mips/Makefile.inc diff -u src/lib/libc/arch/mips/Makefile.inc:1.13 src/lib/libc/arch/mips/Makefile.inc:1.14 --- src/lib/libc/arch/mips/Makefile.inc:1.13 Thu Jan 30 10:05:49 2014 +++ src/lib/libc/arch/mips/Makefile.inc Sun Jan 24 10:55:34 2016 @@ -1,16 +1,17 @@ -# $NetBSD: Makefile.inc,v 1.13 2014/01/30 15:05:49 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.14 2016/01/24 15:55:34 christos Exp $ .include SRCS+= __sigaction14_sigtramp.c __sigtramp2.S CPPFLAGS+= -I. -CPPFLAGS.assym.h+=-D__LIBC12_SOURCE__ +CPPFLAGS.assym.h+=-D__LIBC12_SOURCE__ -D_KERNTYPES .if ${MKSOFTFLOAT} != "no" .include CPPFLAGS+= -DSOFTFLOAT + SRCS+= fixunsgen_ieee754.c SRCS+= fixunsgen64_ieee754.c #fixunssfdi.c fixunsdfdi.c .if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: joerg Date: Wed Sep 17 11:02:55 UTC 2014 Modified Files: src/lib/libc/arch/mips/gen: flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c Log Message: Explicitly set noat around instructions using $at. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/flt_rounds.c cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/gen/fpgetround.c \ src/lib/libc/arch/mips/gen/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/mips/gen/flt_rounds.c diff -u src/lib/libc/arch/mips/gen/flt_rounds.c:1.7 src/lib/libc/arch/mips/gen/flt_rounds.c:1.8 --- src/lib/libc/arch/mips/gen/flt_rounds.c:1.7 Sun Jun 24 15:26:02 2012 +++ src/lib/libc/arch/mips/gen/flt_rounds.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: flt_rounds.c,v 1.7 2012/06/24 15:26:02 christos Exp $ */ +/* $NetBSD: flt_rounds.c,v 1.8 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: flt_rounds.c,v 1.7 2012/06/24 15:26:02 christos Exp $"); +__RCSID("$NetBSD: flt_rounds.c,v 1.8 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -28,7 +28,7 @@ __flt_rounds(void) #else int x; - __asm("cfc1\t%0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return map[x & 0x03]; #endif } Index: src/lib/libc/arch/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.8 src/lib/libc/arch/mips/gen/fpgetmask.c:1.9 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpgetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -23,6 +23,6 @@ fpgetmask(void) { fp_except x; - __asm("cfc1 %0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return (x >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.8 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.9 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpgetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -23,6 +23,6 @@ fpgetsticky(void) { fp_except x; - __asm("cfc1 %0,$31" : "=r" (x)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (x)); return (x >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.8 src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.8 Tue Mar 20 16:19:56 2012 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Wed Sep 17 11:02:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,12 +24,12 @@ fpsetmask(fp_except mask) fp_except old; fp_except new; - __asm("cfc1 %0,$31" : "=r" (old)); + __asm(".set push; .set noat; cfc1 %0,$31; .set pop" : "=r" (old)); new = old & ~(0x1f << 7); new |= ((mask & 0x1f) << 7); - __asm("ctc1 %0,$31" : : "r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); return (old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.8 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 --- src/lib
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: joerg Date: Wed Sep 17 11:01:05 UTC 2014 Modified Files: src/lib/libc/arch/mips/gen: ldexp.S Log Message: Use canonical three operand form of add.d. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/gen/ldexp.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/mips/gen/ldexp.S diff -u src/lib/libc/arch/mips/gen/ldexp.S:1.9 src/lib/libc/arch/mips/gen/ldexp.S:1.10 --- src/lib/libc/arch/mips/gen/ldexp.S:1.9 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/gen/ldexp.S Wed Sep 17 11:01:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ldexp.S,v 1.9 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: ldexp.S,v 1.10 2014/09/17 11:01:05 joerg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)ldexp.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: ldexp.S,v 1.9 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: ldexp.S,v 1.10 2014/09/17 11:01:05 joerg Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -209,7 +209,7 @@ LEAF(ldexp) bge v1, zero, 1f # should result be negative infinity? neg.d $f0, $f0 # result is negative infinity 1: - add.d $f0, $f0 # cause overflow faults if enabled + add.d $f0, $f0, $f0 # cause overflow faults if enabled j ra 9: mov.d $f0, $f12 # yes, result is just x
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: matt Date: Fri Jan 31 18:06:26 UTC 2014 Modified Files: src/lib/libc/arch/mips/sys: __syscall.S syscall.S Log Message: Since N32/N64 pass the first 8 arguments in registers, we can load all the arguments into those registers before invoking the syscall having the kernel syscall handler from having to do that. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/mips/sys/__syscall.S cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/sys/syscall.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/mips/sys/__syscall.S diff -u src/lib/libc/arch/mips/sys/__syscall.S:1.1 src/lib/libc/arch/mips/sys/__syscall.S:1.2 --- src/lib/libc/arch/mips/sys/__syscall.S:1.1 Wed Dec 13 23:18:40 2000 +++ src/lib/libc/arch/mips/sys/__syscall.S Fri Jan 31 18:06:26 2014 @@ -1,5 +1,27 @@ -/* $NetBSD: __syscall.S,v 1.1 2000/12/13 23:18:40 simonb Exp $ */ +/* $NetBSD: __syscall.S,v 1.2 2014/01/31 18:06:26 matt Exp $ */ #include "SYS.h" +#ifdef __mips_o32 RSYSCALL(__syscall) +#else + +LEAF(__syscall) +PIC_PROLOGUE(__syscall) + move v0, a0 + move a0, a1 + move a1, a2 + move a2, a3 + move a3, a4 + move a4, a5 + move a5, a6 + move a6, a7 + REG_L a7, (sp) +SYSTRAP(__syscall) +bne a3,zero,1f +PIC_RETURN() +1: +PIC_TAILCALL(__cerror) +END(__syscall) +STRONG_ALIAS(syscall, __syscall) +#endif Index: src/lib/libc/arch/mips/sys/syscall.S diff -u src/lib/libc/arch/mips/sys/syscall.S:1.6 src/lib/libc/arch/mips/sys/syscall.S:1.7 --- src/lib/libc/arch/mips/sys/syscall.S:1.6 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/sys/syscall.S Fri Jan 31 18:06:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.S,v 1.6 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: syscall.S,v 1.7 2014/01/31 18:06:26 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,8 +38,10 @@ #if 0 RCSID("from: @(#)syscall.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: syscall.S,v 1.6 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: syscall.S,v 1.7 2014/01/31 18:06:26 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ +#ifdef __mips_o32 RSYSCALL(syscall) +#endif
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: joerg Date: Thu Jan 30 15:05:49 UTC 2014 Modified Files: src/lib/libc/arch/mips: Makefile.inc Log Message: Use fixunssfsi and fixunsdfsi from compiler-rt. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/arch/mips/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/mips/Makefile.inc diff -u src/lib/libc/arch/mips/Makefile.inc:1.12 src/lib/libc/arch/mips/Makefile.inc:1.13 --- src/lib/libc/arch/mips/Makefile.inc:1.12 Sat Jul 9 04:12:01 2011 +++ src/lib/libc/arch/mips/Makefile.inc Thu Jan 30 15:05:49 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2011/07/09 04:12:01 matt Exp $ +# $NetBSD: Makefile.inc,v 1.13 2014/01/30 15:05:49 joerg Exp $ .include @@ -11,7 +11,7 @@ CPPFLAGS.assym.h+=-D__LIBC12_SOURCE__ .include CPPFLAGS+= -DSOFTFLOAT -SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c fixunsdfsi_ieee754.c +SRCS+= fixunsgen_ieee754.c SRCS+= fixunsgen64_ieee754.c #fixunssfdi.c fixunsdfdi.c .if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \ && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32))
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: matt Date: Wed Jun 26 08:38:34 UTC 2013 Modified Files: src/lib/libc/arch/mips/sys: sbrk.S Log Message: Use t1 instead of v1 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/mips/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/mips/sys/sbrk.S diff -u src/lib/libc/arch/mips/sys/sbrk.S:1.18 src/lib/libc/arch/mips/sys/sbrk.S:1.19 --- src/lib/libc/arch/mips/sys/sbrk.S:1.18 Sun Dec 12 09:03:06 2010 +++ src/lib/libc/arch/mips/sys/sbrk.S Wed Jun 26 08:38:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.18 2010/12/12 09:03:06 tsutsui Exp $ */ +/* $NetBSD: sbrk.S,v 1.19 2013/06/26 08:38:34 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)sbrk.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: sbrk.S,v 1.18 2010/12/12 09:03:06 tsutsui Exp $") + RCSID("$NetBSD: sbrk.S,v 1.19 2013/06/26 08:38:34 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -57,11 +57,11 @@ _C_LABEL(__curbrk): LEAF(_sbrk) PIC_PROLOGUE(_sbrk) PTR_LA t0, _C_LABEL(__curbrk) - PTR_L v1, 0(t0) - PTR_ADDU a0, a0, v1 # compute current break + PTR_L t1, 0(t0) + PTR_ADDU a0, a0, t1 # compute current break SYSTRAP(break) bne a3, zero, 1f - move v0, v1 # return old val of curbrk from above + move v0, t1 # return old val of curbrk from above PTR_LA t0, _C_LABEL(__curbrk) PTR_S a0, 0(t0) # save current val of curbrk from above PIC_RETURN()
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Sun Jul 8 00:59:34 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: _setjmp.S Log Message: Slight optimization. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/arch/mips/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/mips/gen/_setjmp.S diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.23 src/lib/libc/arch/mips/gen/_setjmp.S:1.24 --- src/lib/libc/arch/mips/gen/_setjmp.S:1.23 Wed Mar 9 16:10:29 2011 +++ src/lib/libc/arch/mips/gen/_setjmp.S Sun Jul 8 00:59:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $ */ +/* $NetBSD: _setjmp.S,v 1.24 2012/07/08 00:59:34 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ #if 0 RCSID("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $") + RCSID("$NetBSD: _setjmp.S,v 1.24 2012/07/08 00:59:34 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -113,7 +113,7 @@ LEAF(_setjmp) REG_EPILOGUE j ra - move v0, zero + move v0, zero END(_setjmp) LEAF(_longjmp) @@ -175,9 +175,8 @@ LEAF(_longjmp) #endif /* SOFTFLOAT_FOR_GCC */ REG_EPILOGUE - move v0, a1 # get return value in 1st arg j ra - nop + move v0, a1 # get return value in 1st arg botch: /*
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: christos Date: Thu Mar 29 21:21:04 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: cacheflush.c Log Message: nbytes is now size_t To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/cacheflush.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/mips/gen/cacheflush.c diff -u src/lib/libc/arch/mips/gen/cacheflush.c:1.5 src/lib/libc/arch/mips/gen/cacheflush.c:1.6 --- src/lib/libc/arch/mips/gen/cacheflush.c:1.5 Thu Mar 29 15:26:21 2012 +++ src/lib/libc/arch/mips/gen/cacheflush.c Thu Mar 29 17:21:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cacheflush.c,v 1.5 2012/03/29 19:26:21 christos Exp $ */ +/* $NetBSD: cacheflush.c,v 1.6 2012/03/29 21:21:04 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include int -_cacheflush(void *addr, int nbytes, int whichcache) +_cacheflush(void *addr, size_t nbytes, int whichcache) { struct mips_cacheflush_args cfa;
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: christos Date: Thu Mar 29 19:27:05 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: longjmp.c Log Message: make constant explicitly unsigned To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/gen/longjmp.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/mips/gen/longjmp.c diff -u src/lib/libc/arch/mips/gen/longjmp.c:1.4 src/lib/libc/arch/mips/gen/longjmp.c:1.5 --- src/lib/libc/arch/mips/gen/longjmp.c:1.4 Fri Sep 3 13:22:51 2010 +++ src/lib/libc/arch/mips/gen/longjmp.c Thu Mar 29 15:27:05 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: longjmp.c,v 1.4 2010/09/03 17:22:51 matt Exp $ */ +/* $NetBSD: longjmp.c,v 1.5 2012/03/29 19:27:05 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ __longjmp14(jmp_buf env, int val) ucontext_t uc; /* Ensure non-zero SP and sigcontext magic number is present */ - if (sc->sc_regs[_R_SP] == 0 || sc->sc_regs[_R_ZERO] != (mips_reg_t)0xACEDBADE) + if (sc->sc_regs[_R_SP] == 0 || sc->sc_regs[_R_ZERO] != (mips_reg_t)0xACEDBADEU) goto err; /* Ensure non-zero return value */
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: christos Date: Thu Mar 29 19:26:21 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: cacheflush.c Log Message: fix lint, should nbytes be changed to size_t to match with the struct passed? To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/gen/cacheflush.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/mips/gen/cacheflush.c diff -u src/lib/libc/arch/mips/gen/cacheflush.c:1.4 src/lib/libc/arch/mips/gen/cacheflush.c:1.5 --- src/lib/libc/arch/mips/gen/cacheflush.c:1.4 Mon Apr 28 16:22:56 2008 +++ src/lib/libc/arch/mips/gen/cacheflush.c Thu Mar 29 15:26:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cacheflush.c,v 1.4 2008/04/28 20:22:56 martin Exp $ */ +/* $NetBSD: cacheflush.c,v 1.5 2012/03/29 19:26:21 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -34,14 +34,12 @@ #include int -_cacheflush(addr, nbytes, whichcache) - void * addr; - int nbytes, whichcache; +_cacheflush(void *addr, int nbytes, int whichcache) { struct mips_cacheflush_args cfa; - cfa.va = (vaddr_t) addr; + cfa.va = (vaddr_t)(intptr_t)addr; cfa.nbytes = nbytes; cfa.whichcache = whichcache; - return (sysarch(MIPS_CACHEFLUSH, (void *)&cfa)); + return sysarch(MIPS_CACHEFLUSH, (void *)&cfa); }
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Tue Mar 20 16:19:56 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: fpgetmask.c fpgetsticky.c fpsetmask.c fpsetsticky.c Log Message: Revert unneeded casts. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.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/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.7 src/lib/libc/arch/mips/gen/fpgetmask.c:1.8 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.7 Tue Mar 20 10:51:23 2012 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Tue Mar 20 16:19:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.7 2012/03/20 10:51:23 he Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.7 2012/03/20 10:51:23 he Exp $"); +__RCSID("$NetBSD: fpgetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,5 +24,5 @@ fpgetmask(void) fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); - return ((unsigned int)x >> 7) & 0x1f; + return (x >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.7 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.8 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.7 Tue Mar 20 10:51:24 2012 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Tue Mar 20 16:19:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $"); +__RCSID("$NetBSD: fpgetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,5 +24,5 @@ fpgetsticky(void) fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); - return ((unsigned int)x >> 2) & 0x1f; + return (x >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.7 src/lib/libc/arch/mips/gen/fpsetmask.c:1.8 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.7 Tue Mar 20 10:51:24 2012 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Tue Mar 20 16:19:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.7 2012/03/20 10:51:24 he Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -31,5 +31,5 @@ fpsetmask(fp_except mask) __asm("ctc1 %0,$31" : : "r" (new)); - return ((unsigned int)old >> 7) & 0x1f; + return (old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.7 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.8 --- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.7 Tue Mar 20 10:51:24 2012 +++ src/lib/libc/arch/mips/gen/fpsetsticky.c Tue Mar 20 16:19:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.8 2012/03/20 16:19:56 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -31,5 +31,5 @@ fpsetsticky(fp_except sticky) __asm("ctc1 %0,$31" : : "r" (new)); - return ((unsigned int)old >> 2) & 0x1f; + return (old >> 2) & 0x1f; }
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: he Date: Tue Mar 20 10:51:24 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: fpgetmask.c fpgetsticky.c fpsetmask.c fpsetsticky.c Log Message: Cast to unsigned int before doing shift operations, to appease lint. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.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/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.6 src/lib/libc/arch/mips/gen/fpgetmask.c:1.7 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Tue Mar 20 10:51:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.7 2012/03/20 10:51:23 he Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpgetmask.c,v 1.7 2012/03/20 10:51:23 he Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,5 +24,5 @@ fpgetmask(void) fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); - return (x >> 7) & 0x1f; + return ((unsigned int)x >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.6 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.7 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Tue Mar 20 10:51:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpgetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -24,5 +24,5 @@ fpgetsticky(void) fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); - return (x >> 2) & 0x1f; + return ((unsigned int)x >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.6 src/lib/libc/arch/mips/gen/fpsetmask.c:1.7 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Tue Mar 20 10:51:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.7 2012/03/20 10:51:24 he Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -31,5 +31,5 @@ fpsetmask(fp_except mask) __asm("ctc1 %0,$31" : : "r" (new)); - return (old >> 7) & 0x1f; + return ((unsigned int)old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.6 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.7 --- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.6 Mon Mar 19 22:23:10 2012 +++ src/lib/libc/arch/mips/gen/fpsetsticky.c Tue Mar 20 10:51:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.7 2012/03/20 10:51:24 he Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -31,5 +31,5 @@ fpsetsticky(fp_except sticky) __asm("ctc1 %0,$31" : : "r" (new)); - return (old >> 2) & 0x1f; + return ((unsigned int)old >> 2) & 0x1f; }
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Mon Mar 19 22:23:11 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c Log Message: Convert to C89 definitions. Cleanup up type usage. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetround.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetround.c \ src/lib/libc/arch/mips/gen/fpsetsticky.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/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.5 src/lib/libc/arch/mips/gen/fpgetmask.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +__RCSID("$NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -19,9 +19,9 @@ __weak_alias(fpgetmask,_fpgetmask) #endif fp_except -fpgetmask() +fpgetmask(void) { - int x; + fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); return (x >> 7) & 0x1f; Index: src/lib/libc/arch/mips/gen/fpgetround.c diff -u src/lib/libc/arch/mips/gen/fpgetround.c:1.5 src/lib/libc/arch/mips/gen/fpgetround.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetround.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetround.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +__RCSID("$NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -19,9 +19,9 @@ __weak_alias(fpgetround,_fpgetround) #endif fp_rnd -fpgetround() +fpgetround(void) { - int x; + fp_rnd x; __asm("cfc1 %0,$31" : "=r" (x)); return x & 0x03; Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +__RCSID("$NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -19,9 +19,9 @@ __weak_alias(fpgetsticky,_fpgetsticky) #endif fp_except -fpgetsticky() +fpgetsticky(void) { - int x; + fp_except x; __asm("cfc1 %0,$31" : "=r" (x)); return (x >> 2) & 0x1f; Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.5 src/lib/libc/arch/mips/gen/fpsetmask.c:1.6 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -19,16 +19,14 @@ __weak_alias(fpsetmask,_fpsetmask) #endif fp_except -fpsetmask(mask) - fp_except mask; +fpsetmask(fp_except mask) { fp_except old; fp_except new; __asm("cfc1 %0,$31" : "=r" (old)); - new = old; - new &= ~(0x1f << 7); + new = old & ~(0x1f << 7); new |= ((mask & 0x1f) << 7); __asm("ctc1 %0,$31" : : "r" (new)); Index: src/lib/libc/arch/mips/gen/fpsetround.c diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.5 src/lib/libc/arch/mips/gen/fpsetround.c:1.6 --- src/lib/libc/arch/mips/gen/fpsetround.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpsetround.c Mon Mar 19 22:
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: tsutsui Date: Mon Feb 27 14:48:34 UTC 2012 Modified Files: src/lib/libc/arch/mips/sys: cerror.S Log Message: Fix pasto. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/mips/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/mips/sys/cerror.S diff -u src/lib/libc/arch/mips/sys/cerror.S:1.17 src/lib/libc/arch/mips/sys/cerror.S:1.18 --- src/lib/libc/arch/mips/sys/cerror.S:1.17 Mon Feb 27 12:26:21 2012 +++ src/lib/libc/arch/mips/sys/cerror.S Mon Feb 27 14:48:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.17 2012/02/27 12:26:21 joerg Exp $ */ +/* $NetBSD: cerror.S,v 1.18 2012/02/27 14:48:34 tsutsui Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,13 +38,13 @@ #if 0 RCSID("from: @(#)cerror.s 8.1 (Berkeley) 6/16/93") #else - RCSID("$NetBSD: cerror.S,v 1.17 2012/02/27 12:26:21 joerg Exp $") + RCSID("$NetBSD: cerror.S,v 1.18 2012/02/27 14:48:34 tsutsui Exp $") #endif #endif /* LIBC_SCCS and not lint */ #ifdef PIC .protected __cerror -i#endif +#endif #ifdef _REENTRANT .globl _C_LABEL(__errno)
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: matt Date: Sat Jul 9 04:12:01 UTC 2011 Modified Files: src/lib/libc/arch/mips: Makefile.inc Log Message: Don't build tf (long double) if building for O32. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/mips/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/mips/Makefile.inc diff -u src/lib/libc/arch/mips/Makefile.inc:1.11 src/lib/libc/arch/mips/Makefile.inc:1.12 --- src/lib/libc/arch/mips/Makefile.inc:1.11 Sat Jul 9 02:30:27 2011 +++ src/lib/libc/arch/mips/Makefile.inc Sat Jul 9 04:12:01 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2011/07/09 02:30:27 matt Exp $ +# $NetBSD: Makefile.inc,v 1.12 2011/07/09 04:12:01 matt Exp $ .include @@ -13,11 +13,13 @@ SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c fixunsdfsi_ieee754.c SRCS+= fixunsgen64_ieee754.c #fixunssfdi.c fixunsdfdi.c -.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" +.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \ +&& (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) SRCS+= fixunstfsi_ieee754.c fixunstfdi_ieee754.c .endif .endif -.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" +.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") \ +&& (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)) SRCS+= floatunditf_ieee754.c .endif
CVS commit: src/lib/libc/arch/mips/softfloat
Module Name:src Committed By: matt Date: Mon Jun 27 06:40:27 UTC 2011 Modified Files: src/lib/libc/arch/mips/softfloat: mips-gcc.h Log Message: Fix softfloat for mips*el To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/mips/softfloat/mips-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/mips/softfloat/mips-gcc.h diff -u src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.4 src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.5 --- src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.4 Fri Feb 25 11:55:28 2011 +++ src/lib/libc/arch/mips/softfloat/mips-gcc.h Mon Jun 27 06:40:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips-gcc.h,v 1.4 2011/02/25 11:55:28 pooka Exp $ */ +/* $NetBSD: mips-gcc.h,v 1.5 2011/06/27 06:40:26 matt Exp $ */ /* --- @@ -90,11 +90,6 @@ --- */ #if defined(SOFTFLOAT_FOR_GCC) -#if defined(__MIPSEB__) #define FLOAT64_DEMANGLE(a) (a) #define FLOAT64_MANGLE(a) (a) -#else -#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32)) -#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a) -#endif #endif
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Fri Apr 29 08:05:22 UTC 2011 Modified Files: src/lib/libc/arch/mips/gen: _lwp.c Log Message: Use correct CALLFRAME_SIZ depending on ABI. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/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/mips/gen/_lwp.c diff -u src/lib/libc/arch/mips/gen/_lwp.c:1.7 src/lib/libc/arch/mips/gen/_lwp.c:1.8 --- src/lib/libc/arch/mips/gen/_lwp.c:1.7 Tue Mar 15 07:40:18 2011 +++ src/lib/libc/arch/mips/gen/_lwp.c Fri Apr 29 08:05:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.7 2011/03/15 07:40:18 matt Exp $ */ +/* $NetBSD: _lwp.c,v 1.8 2011/04/29 08:05:22 matt Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.7 2011/03/15 07:40:18 matt Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.8 2011/04/29 08:05:22 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -40,7 +40,11 @@ #include #include -#define CALLFRAME_SIZ 24 +#if defined(__mips_o32) || defined(__mips_o64) +#define CALLFRAME_SIZ (6 * sizeof(void *)) +#else +#define CALLFRAME_SIZ (4 * sizeof(uint64_t)) +#endif void _lwp_makecontext(ucontext_t *u, void (*start)(void *),
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Tue Mar 15 07:40:18 UTC 2011 Modified Files: src/lib/libc/arch/mips/gen: Makefile.inc _lwp.c Log Message: Properly support the MIPS TLS ABI. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/arch/mips/gen/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/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/mips/gen/Makefile.inc diff -u src/lib/libc/arch/mips/gen/Makefile.inc:1.32 src/lib/libc/arch/mips/gen/Makefile.inc:1.33 --- src/lib/libc/arch/mips/gen/Makefile.inc:1.32 Mon Jan 17 23:53:03 2011 +++ src/lib/libc/arch/mips/gen/Makefile.inc Tue Mar 15 07:40:18 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.32 2011/01/17 23:53:03 matt Exp $ +# $NetBSD: Makefile.inc,v 1.33 2011/03/15 07:40:18 matt Exp $ .if ${MKSOFTFLOAT} == "no" SRCS+= fabs.S ldexp.S modf.S @@ -32,6 +32,8 @@ # mips abi builtin extensions (used by GCC for lexical-closure trampoline) SRCS+= cacheflush.c +CPPFLAGS._lwp.c += -D_LIBC_SOURCE + LSRCS.mips.gen= Lint__setjmp.c Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c LSRCS+= ${LSRCS.mips.gen} DPSRCS+= ${LSRCS.mips.gen} Index: src/lib/libc/arch/mips/gen/_lwp.c diff -u src/lib/libc/arch/mips/gen/_lwp.c:1.6 src/lib/libc/arch/mips/gen/_lwp.c:1.7 --- src/lib/libc/arch/mips/gen/_lwp.c:1.6 Thu Feb 24 04:28:42 2011 +++ src/lib/libc/arch/mips/gen/_lwp.c Tue Mar 15 07:40:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: _lwp.c,v 1.6 2011/02/24 04:28:42 joerg Exp $ */ +/* $NetBSD: _lwp.c,v 1.7 2011/03/15 07:40:18 matt Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _lwp.c,v 1.6 2011/02/24 04:28:42 joerg Exp $"); +__RCSID("$NetBSD: _lwp.c,v 1.7 2011/03/15 07:40:18 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -42,8 +42,9 @@ #define CALLFRAME_SIZ 24 -void _lwp_makecontext(ucontext_t *u, void (*start)(void *), - void *arg, void *private, caddr_t stack_base, size_t stack_size) +void +_lwp_makecontext(ucontext_t *u, void (*start)(void *), + void *arg, void *tcb, caddr_t stack_base, size_t stack_size) { caddr_t sp; __greg_t *gr; @@ -56,11 +57,12 @@ u->uc_stack.ss_size = stack_size; sp = stack_base + stack_size - CALLFRAME_SIZ; - gr[_REG_EPC] = (unsigned long) start; - gr[_REG_T9] = (unsigned long) start; /* required for .abicalls */ - gr[_REG_RA] = (unsigned long) _lwp_exit; - gr[_REG_A0] = (unsigned long) arg; - gr[_REG_SP] = (unsigned long) sp; - u->uc_mcontext._mc_tlsbase = (uintptr_t)private; + gr[_REG_EPC] = (uintptr_t) start; + gr[_REG_T9] = (uintptr_t) start; /* required for .abicalls */ + gr[_REG_RA] = (uintptr_t) _lwp_exit; + gr[_REG_A0] = (uintptr_t) arg; + gr[_REG_SP] = (uintptr_t) sp; + u->uc_mcontext._mc_tlsbase = + (uintptr_t)tcb + TLS_TP_OFFSET + sizeof(struct tls_tcb); u->uc_flags |= _UC_TLSBASE; }
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: tsutsui Date: Wed Mar 9 16:10:29 UTC 2011 Modified Files: src/lib/libc/arch/mips/gen: _setjmp.S Log Message: Reorder insns to fix more load delay hazard botches on R3000. Fixes floating point exceptions in _longjmp() during /etc/rc and now NWS-3470D boots up to multi user with -current userland binaries. Also fill BDslots in error path properly. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/mips/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/mips/gen/_setjmp.S diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.22 src/lib/libc/arch/mips/gen/_setjmp.S:1.23 --- src/lib/libc/arch/mips/gen/_setjmp.S:1.22 Fri Sep 3 17:22:51 2010 +++ src/lib/libc/arch/mips/gen/_setjmp.S Wed Mar 9 16:10:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ #if 0 RCSID("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $") + RCSID("$NetBSD: _setjmp.S,v 1.23 2011/03/09 16:10:29 tsutsui Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -88,7 +88,6 @@ */ #ifndef SOFTFLOAT_FOR_GCC cfc1 v0, $31# too bad cant check if FP used - INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0) #if defined(__mips_n64) || defined(__mips_n32) FP_S $f30, _OFFSETOF_SC_FPREGS_F30(a0) FP_S $f28, _OFFSETOF_SC_FPREGS_F28(a0) @@ -109,6 +108,7 @@ FP_S $f29, _OFFSETOF_SC_FPREGS_F29(a0) FP_S $f31, _OFFSETOF_SC_FPREGS_F31(a0) #endif + INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0) #endif /* SOFTFLOAT_FOR_GCC */ REG_EPILOGUE @@ -139,11 +139,13 @@ #if defined(__mips_n32) || defined(__mips_n64) REG_L gp, _OFFSETOF_SC_REGS_GP(a0) #endif +#ifndef SOFTFLOAT_FOR_GCC # get fpu status + INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0) +#endif REG_L sp, _OFFSETOF_SC_REGS_SP(a0) REG_L s8, _OFFSETOF_SC_REGS_S8(a0) #ifndef SOFTFLOAT_FOR_GCC - INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0) ctc1 v0, $31 /* * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. @@ -183,6 +185,8 @@ * our caller's GP. */ jal _C_LABEL(longjmperror) + nop PIC_TAILCALL(abort) + nop END(_longjmp)
CVS commit: src/lib/libc/arch/mips/softfloat
Module Name:src Committed By: pooka Date: Fri Feb 25 11:55:28 UTC 2011 Modified Files: src/lib/libc/arch/mips/softfloat: mips-gcc.h Log Message: fix my whitespace copypaste To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/mips/softfloat/mips-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/mips/softfloat/mips-gcc.h diff -u src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.3 src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.4 --- src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.3 Fri Feb 25 11:53:07 2011 +++ src/lib/libc/arch/mips/softfloat/mips-gcc.h Fri Feb 25 11:55:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips-gcc.h,v 1.3 2011/02/25 11:53:07 pooka Exp $ */ +/* $NetBSD: mips-gcc.h,v 1.4 2011/02/25 11:55:28 pooka Exp $ */ /* --- @@ -91,10 +91,10 @@ */ #if defined(SOFTFLOAT_FOR_GCC) #if defined(__MIPSEB__) -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) +#define FLOAT64_DEMANGLE(a) (a) +#define FLOAT64_MANGLE(a) (a) #else -#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32)) -#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a) +#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32)) +#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a) #endif #endif
CVS commit: src/lib/libc/arch/mips/softfloat
Module Name:src Committed By: pooka Date: Fri Feb 25 11:53:07 UTC 2011 Modified Files: src/lib/libc/arch/mips/softfloat: mips-gcc.h Log Message: Fix LE softfloat (mostly theoretical) and comment. from Alessandro Forin To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/mips/softfloat/mips-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/mips/softfloat/mips-gcc.h diff -u src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.2 src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.3 --- src/lib/libc/arch/mips/softfloat/mips-gcc.h:1.2 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/softfloat/mips-gcc.h Fri Feb 25 11:53:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips-gcc.h,v 1.2 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: mips-gcc.h,v 1.3 2011/02/25 11:53:07 pooka Exp $ */ /* --- @@ -85,11 +85,16 @@ /* --- -The ARM FPA is odd in that it stores doubles high-order word first, no matter +The MIPS FPA is odd in that it stores doubles high-order word first, no matter what the endianness of the CPU. VFP is sane. --- */ #if defined(SOFTFLOAT_FOR_GCC) -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) +#if defined(__MIPSEB__) +#define FLOAT64_DEMANGLE(a) (a) +#define FLOAT64_MANGLE(a) (a) +#else +#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32)) +#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a) +#endif #endif
CVS commit: src/lib/libc/arch/mips/gdtoa
Module Name:src Committed By: matt Date: Thu Jan 20 18:41:39 UTC 2011 Modified Files: src/lib/libc/arch/mips/gdtoa: Makefile.inc Log Message: Remove CPUFLAGS?= since it's no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/mips/gdtoa/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/mips/gdtoa/Makefile.inc diff -u src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.3 src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.4 --- src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.3 Tue Jan 18 08:12:05 2011 +++ src/lib/libc/arch/mips/gdtoa/Makefile.inc Thu Jan 20 18:41:39 2011 @@ -1,6 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.3 2011/01/18 08:12:05 matt Exp $ +# $NetBSD: Makefile.inc,v 1.4 2011/01/20 18:41:39 matt Exp $ -CPUFLAGS?= SRCS+= strtof.c .if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") .if !defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32)
CVS commit: src/lib/libc/arch/mips/gdtoa
Module Name:src Committed By: matt Date: Tue Jan 18 08:12:06 UTC 2011 Modified Files: src/lib/libc/arch/mips/gdtoa: Makefile.inc Log Message: Cleanup the o32 compat build test. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/mips/gdtoa/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/mips/gdtoa/Makefile.inc diff -u src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.2 src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.3 --- src/lib/libc/arch/mips/gdtoa/Makefile.inc:1.2 Mon Jan 17 23:53:03 2011 +++ src/lib/libc/arch/mips/gdtoa/Makefile.inc Tue Jan 18 08:12:05 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/01/17 23:53:03 matt Exp $ +# $NetBSD: Makefile.inc,v 1.3 2011/01/18 08:12:05 matt Exp $ CPUFLAGS?= SRCS+= strtof.c .if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el") -.if ${CPUFLAGS:M-mabi=32} == "" +.if !defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32) SRCS+= strtold_pQ.c SRCS+= strtopQ.c .endif
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: matt Date: Mon Jan 17 23:34:44 UTC 2011 Modified Files: src/lib/libc/arch/mips/sys: cerror.S Log Message: Make __cerror hidden. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/arch/mips/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/mips/sys/cerror.S diff -u src/lib/libc/arch/mips/sys/cerror.S:1.15 src/lib/libc/arch/mips/sys/cerror.S:1.16 --- src/lib/libc/arch/mips/sys/cerror.S:1.15 Fri Sep 3 17:22:52 2010 +++ src/lib/libc/arch/mips/sys/cerror.S Mon Jan 17 23:34:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.15 2010/09/03 17:22:52 matt Exp $ */ +/* $NetBSD: cerror.S,v 1.16 2011/01/17 23:34:44 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,10 +38,14 @@ #if 0 RCSID("from: @(#)cerror.s 8.1 (Berkeley) 6/16/93") #else - RCSID("$NetBSD: cerror.S,v 1.15 2010/09/03 17:22:52 matt Exp $") + RCSID("$NetBSD: cerror.S,v 1.16 2011/01/17 23:34:44 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ +#ifdef PIC + .hidden __cerror +#endif + #ifdef _REENTRANT .globl _C_LABEL(__errno) NESTED_NOPROFILE(__cerror, CALLFRAME_SIZ, ra)
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: tsutsui Date: Sun Dec 12 09:03:07 UTC 2010 Modified Files: src/lib/libc/arch/mips/sys: sbrk.S Log Message: We can't assume syscall retains t0, unless it's documented as ABI. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/mips/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/mips/sys/sbrk.S diff -u src/lib/libc/arch/mips/sys/sbrk.S:1.17 src/lib/libc/arch/mips/sys/sbrk.S:1.18 --- src/lib/libc/arch/mips/sys/sbrk.S:1.17 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/sys/sbrk.S Sun Dec 12 09:03:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.17 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: sbrk.S,v 1.18 2010/12/12 09:03:06 tsutsui Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)sbrk.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: sbrk.S,v 1.17 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: sbrk.S,v 1.18 2010/12/12 09:03:06 tsutsui Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -62,6 +62,7 @@ SYSTRAP(break) bne a3, zero, 1f move v0, v1 # return old val of curbrk from above + PTR_LA t0, _C_LABEL(__curbrk) PTR_S a0, 0(t0) # save current val of curbrk from above PIC_RETURN() 1:
CVS commit: src/lib/libc/arch/mips/sys
Module Name:src Committed By: tsutsui Date: Sun Dec 12 09:00:37 UTC 2010 Modified Files: src/lib/libc/arch/mips/sys: brk.S Log Message: brk(2) should update __curbrk, not __minbrk or garbage. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/mips/sys/brk.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/mips/sys/brk.S diff -u src/lib/libc/arch/mips/sys/brk.S:1.17 src/lib/libc/arch/mips/sys/brk.S:1.18 --- src/lib/libc/arch/mips/sys/brk.S:1.17 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/sys/brk.S Sun Dec 12 09:00:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.17 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: brk.S,v 1.18 2010/12/12 09:00:37 tsutsui Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)brk.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: brk.S,v 1.17 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: brk.S,v 1.18 2010/12/12 09:00:37 tsutsui Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -65,6 +65,7 @@ li v0, SYS_break syscall bne a3, zero, 2f + PTR_LA t0, _C_LABEL(__curbrk) PTR_S a0, 0(t0) move v0, zero PIC_RETURN()
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: matt Date: Fri Sep 3 17:22:52 UTC 2010 Modified Files: src/lib/libc/arch/mips/gen: Makefile.inc _setjmp.S flt_rounds.c longjmp.c setjmp.S src/lib/libc/arch/mips/sys: cerror.S Log Message: Pullup fixes from matt-nb5-mips64. This makes setjmp/longjmp work again. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/lib/libc/arch/mips/gen/Makefile.inc cvs rdiff -u -r1.21 -r1.22 src/lib/libc/arch/mips/gen/_setjmp.S cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/flt_rounds.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/mips/gen/longjmp.c cvs rdiff -u -r1.18 -r1.19 src/lib/libc/arch/mips/gen/setjmp.S cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/mips/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/mips/gen/Makefile.inc diff -u src/lib/libc/arch/mips/gen/Makefile.inc:1.30 src/lib/libc/arch/mips/gen/Makefile.inc:1.31 --- src/lib/libc/arch/mips/gen/Makefile.inc:1.30 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/gen/Makefile.inc Fri Sep 3 17:22:51 2010 @@ -1,6 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.30 2009/12/14 01:07:42 matt Exp $ +# $NetBSD: Makefile.inc,v 1.31 2010/09/03 17:22:51 matt Exp $ +.if ${MKSOFTFLOAT} == "no" SRCS+= fabs.S ldexp.S modf.S +.else +SRCS+= fabs_ieee754.c ldexp_ieee754.c modf_ieee754.c +.endif # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c @@ -11,9 +15,12 @@ SRCS+= signbitf_ieee754.c signbitd_ieee754.c SRCS+= nanf.c +SRCS+= flt_rounds.c -SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ +.if ${MKSOFTFLOAT} == "no" +SRCS+= fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ fpsetround.c fpsetsticky.c +.endif SRCS+= setjmp.S longjmp.c SRCS+= _setjmp.S Index: src/lib/libc/arch/mips/gen/_setjmp.S diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.21 src/lib/libc/arch/mips/gen/_setjmp.S:1.22 --- src/lib/libc/arch/mips/gen/_setjmp.S:1.21 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/gen/_setjmp.S Fri Sep 3 17:22:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.21 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ #if 0 RCSID("from: @(#)_setjmp.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: _setjmp.S,v 1.21 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: _setjmp.S,v 1.22 2010/09/03 17:22:51 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -68,7 +68,6 @@ REG_LI v0, 0xACEDBADE # sigcontext magic number REG_S ra, _OFFSETOF_SC_PC(a0) # sc_pc = return address REG_S v0, _OFFSETOF_SC_REGS(a0) # saved in sc_regs[0] - REG_S a1, _OFFSETOF_SC_REGS_V0(a0) # save return value REG_S s0, _OFFSETOF_SC_REGS_S0(a0) REG_S s1, _OFFSETOF_SC_REGS_S1(a0) REG_S s2, _OFFSETOF_SC_REGS_S2(a0) @@ -82,13 +81,14 @@ #if defined(__mips_n32) || defined(__mips_n64) REG_S gp, _OFFSETOF_SC_REGS_GP(a0) # newabi gp is callee-saved #endif - cfc1 v0, $31# too bad cant check if FP used /* * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. * In N64, FP registers F23 .. F31 are callee-saved. * In O32, FP registers F20 .. F23 are callee-saved. */ #ifndef SOFTFLOAT_FOR_GCC + cfc1 v0, $31# too bad cant check if FP used + INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0) #if defined(__mips_n64) || defined(__mips_n32) FP_S $f30, _OFFSETOF_SC_FPREGS_F30(a0) FP_S $f28, _OFFSETOF_SC_FPREGS_F28(a0) @@ -110,7 +110,6 @@ FP_S $f31, _OFFSETOF_SC_FPREGS_F31(a0) #endif #endif /* SOFTFLOAT_FOR_GCC */ - INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0) REG_EPILOGUE j ra @@ -128,6 +127,7 @@ REG_LI t0, 0xACEDBADE bne v0, t0, botch # jump if error PTR_ADDU sp, sp, CALLFRAME_SIZ # does not matter, sanity + REG_S a1, _OFFSETOF_SC_REGS_V0(a0) # save return value REG_L s0, _OFFSETOF_SC_REGS_S0(a0) REG_L s1, _OFFSETOF_SC_REGS_S1(a0) REG_L s2, _OFFSETOF_SC_REGS_S2(a0) @@ -140,16 +140,16 @@ REG_L gp, _OFFSETOF_SC_REGS_GP(a0) #endif # get fpu status - INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0) REG_L sp, _OFFSETOF_SC_REGS_SP(a0) REG_L s8, _OFFSETOF_SC_REGS_S8(a0) +#ifndef SOFTFLOAT_FOR_GCC + INT_L v0, _OFFSETOF_SC_FPREGS_FCSR(a0) ctc1 v0, $31 /* * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. * In N64, FP registers F23 .. F31 are callee-saved. * In O32, FP registers F20 .. F23 are callee-saved. */ -#ifndef SOFTFLOAT_FOR_GCC #if defined(__mips_n64) || defined(__mips_n32) FP_L $f30, _OFFSETOF_SC_FPREGS_F30(a0) FP_L $f28, _OFFSETOF_SC_FPREGS_F28(a0) @@ -173,7 +173,7 @@ #endif /* SOFTFLOAT_FOR_GCC */ REG_EPILOGUE - REG_L v0, _OFFSETOF_SC_REGS_V0(a0) + move v0, a1 # get return value in 1st arg j ra nop Index: src/lib/libc/arch/mips/gen/flt_rounds.c diff -u src/lib/libc/arch/mips/gen/flt
CVS commit: src/lib/libc/arch/mips/string
Module Name:src Committed By: matt Date: Mon Dec 14 02:53:52 UTC 2009 Modified Files: src/lib/libc/arch/mips/string: bzero.S Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/string/bzero.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/mips/string/bzero.S diff -u src/lib/libc/arch/mips/string/bzero.S:1.9 src/lib/libc/arch/mips/string/bzero.S:1.10 --- src/lib/libc/arch/mips/string/bzero.S:1.9 Mon Dec 14 01:07:42 2009 +++ src/lib/libc/arch/mips/string/bzero.S Mon Dec 14 02:53:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bzero.S,v 1.9 2009/12/14 01:07:42 matt Exp $ */ +/* $NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 RCSID("from: @(#)bzero.s 8.1 (Berkeley) 6/4/93") #else - RCSID("$NetBSD: bzero.S,v 1.9 2009/12/14 01:07:42 matt Exp $") + RCSID("$NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ @@ -71,7 +71,7 @@ REG_SLLV a2, a2, a3 # we want to keep the LSB bytes #endif nor a2, zero, a2 # complement the mask - REL_L v0, -SZREG(a0) # load the word to partially clear + REG_L v0, -SZREG(a0) # load the word to partially clear and v0, v0, a2 # clear the bytes REG_S v0, -SZREG(a0) # store it back #endif