diff options
author | 2016-03-09 16:28:44 +0000 | |
---|---|---|
committer | 2016-03-09 16:28:44 +0000 | |
commit | 696cd27b243dead39b0a0015b5a1b4287fe04a6f (patch) | |
tree | d7d83f24867ea666aa2295ebf83dd5be05ed34c1 /lib/libc | |
parent | Unmask interrupts unconditionnally before calling the generic trap handler. (diff) | |
download | wireguard-openbsd-696cd27b243dead39b0a0015b5a1b4287fe04a6f.tar.xz wireguard-openbsd-696cd27b243dead39b0a0015b5a1b4287fe04a6f.zip |
We are done providing support for the vax.
lots of agreement.
Diffstat (limited to 'lib/libc')
54 files changed, 6 insertions, 2782 deletions
diff --git a/lib/libc/Makefile.inc b/lib/libc/Makefile.inc index d5782e2fe6b..614afd4c0c5 100644 --- a/lib/libc/Makefile.inc +++ b/lib/libc/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.27 2015/11/25 05:01:44 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.28 2016/03/09 16:28:46 deraadt Exp $ # # This file contains make rules used to build libc # @@ -50,8 +50,8 @@ AINC+= -nostdinc -idirafter ${DESTDIR}/usr/include # 32-bit systems need these .if (${MACHINE_CPU} == "i386") || (${MACHINE_CPU} == "powerpc") || \ (${MACHINE_CPU} == "hppa") || (${MACHINE_CPU} == "arm") || \ - (${MACHINE_CPU} == "sparc") || (${MACHINE_CPU} == "vax") || \ - (${MACHINE_CPU} == "sh") || (${MACHINE_CPU} == "m88k") + (${MACHINE_CPU} == "sparc") || (${MACHINE_CPU} == "sh") || \ + (${MACHINE_CPU} == "m88k") .include "${LIBCSRCDIR}/quad/Makefile.inc" .endif diff --git a/lib/libc/arch/vax/DEFS.h b/lib/libc/arch/vax/DEFS.h deleted file mode 100644 index 13e0859dfa6..00000000000 --- a/lib/libc/arch/vax/DEFS.h +++ /dev/null @@ -1,27 +0,0 @@ -/* $OpenBSD: DEFS.h,v 1.5 2015/08/31 02:53:57 guenther Exp $ */ - -#include <machine/asm.h> - -/* - * We define a hidden alias with the prefix "_libc_" for each global symbol - * that may be used internally. By referencing _libc_x instead of x, other - * parts of libc prevent overriding by the application and avoid unnecessary - * relocations. - */ -#define _HIDDEN(x) _libc_##x -#define _HIDDEN_ALIAS(x,y) \ - STRONG_ALIAS(_HIDDEN(x),y); \ - .hidden _HIDDEN(x) -#define _HIDDEN_FALIAS(x,y) \ - _HIDDEN_ALIAS(x,y); \ - .type _HIDDEN(x),@function - -/* - * For functions implemented in ASM that aren't syscalls. - * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names - * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names - */ -#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x)) -#define END_WEAK(x) END_STRONG(x); .weak x - - diff --git a/lib/libc/arch/vax/Makefile.inc b/lib/libc/arch/vax/Makefile.inc deleted file mode 100644 index d8c4bff9a3e..00000000000 --- a/lib/libc/arch/vax/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/06/09 20:47:11 miod Exp $ diff --git a/lib/libc/arch/vax/SYS.h b/lib/libc/arch/vax/SYS.h deleted file mode 100644 index 036ee5a4090..00000000000 --- a/lib/libc/arch/vax/SYS.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $OpenBSD: SYS.h,v 1.20 2015/10/23 04:39:25 guenther Exp $ */ -/* $NetBSD: SYS.h,v 1.4 1997/05/02 18:15:32 kleink Exp $ */ - -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "DEFS.h" -#include <sys/syscall.h> - -#define _CAT(x,y) x##y -#define __ENTRY(p,x) ENTRY(p##x,0) -#define __DO_SYSCALL(x) chmk $ SYS_ ## x - -#define __END(p,x) END(p##x); _HIDDEN_FALIAS(x, p##x); END(_HIDDEN(x)) - -#define __SYSCALL(p,x,y) \ - 99: jmp _C_LABEL(__cerror); \ - __ENTRY(p,x); \ - __DO_SYSCALL(y); \ - jcs 99b - -#define __PSEUDO(p,x,y) \ - __ENTRY(p,x); \ - __DO_SYSCALL(y); \ - jcs 1f; \ - ret; \ - 1: jmp _C_LABEL(__cerror); \ - __END(p,x) - -#define __PSEUDO_NOERROR(p,x,y) \ - __ENTRY(p,x); \ - __DO_SYSCALL(y); \ - ret; \ - __END(p,x) - -#define __ALIAS(prefix,name) \ - WEAK_ALIAS(name,prefix##name); - -/* - * For the thread_safe versions, we prepend _thread_sys_ to the function - * name so that the 'C' wrapper can go around the real name. - */ -#define SYSCALL(x) __ALIAS(_thread_sys_,x) \ - __SYSCALL(_thread_sys_,x,x) -#define SYSCALL_END_HIDDEN(x) __END(_thread_sys_,x) -#define SYSCALL_END(x) SYSCALL_END_HIDDEN(x); END(x) -#define RSYSCALL(x) __ALIAS(_thread_sys_,x) \ - __PSEUDO(_thread_sys_,x,x); \ - END(x) -#define RSYSCALL_HIDDEN(x) __PSEUDO(_thread_sys_,x,x) -#define PSEUDO(x,y) __ALIAS(_thread_sys_,x) \ - __PSEUDO(_thread_sys_,x,y); \ - END(x) -#define PSEUDO_NOERROR(x,y) __ALIAS(_thread_sys_,x) \ - __PSEUDO_NOERROR(_thread_sys_,x,y); \ - END(x) -#define SYSENTRY_HIDDEN(x) __ENTRY(_thread_sys_,x) -#define SYSENTRY(x) __ALIAS(_thread_sys_,x) \ - SYSENTRY_HIDDEN(x) -#define SYSNAME(x) _CAT(__thread_sys_,x) - - .globl _C_LABEL(__cerror) diff --git a/lib/libc/arch/vax/gdtoa/Makefile.inc b/lib/libc/arch/vax/gdtoa/Makefile.inc deleted file mode 100644 index 53e0b7aef69..00000000000 --- a/lib/libc/arch/vax/gdtoa/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.1 2008/09/07 20:36:08 martynas Exp $ - -CFLAGS+= -DNO_HEX_FP diff --git a/lib/libc/arch/vax/gdtoa/arith.h b/lib/libc/arch/vax/gdtoa/arith.h deleted file mode 100644 index bd5c83a65ff..00000000000 --- a/lib/libc/arch/vax/gdtoa/arith.h +++ /dev/null @@ -1,2 +0,0 @@ -#define VAX -#define Arith_Kind_ASL 4 diff --git a/lib/libc/arch/vax/gdtoa/gd_qnan.h b/lib/libc/arch/vax/gdtoa/gd_qnan.h deleted file mode 100644 index e69de29bb2d..00000000000 --- a/lib/libc/arch/vax/gdtoa/gd_qnan.h +++ /dev/null diff --git a/lib/libc/arch/vax/gdtoa/hdtoa.c b/lib/libc/arch/vax/gdtoa/hdtoa.c deleted file mode 100644 index 2e55d8a800e..00000000000 --- a/lib/libc/arch/vax/gdtoa/hdtoa.c +++ /dev/null @@ -1,213 +0,0 @@ -/* $OpenBSD: hdtoa.c,v 1.3 2015/09/14 13:04:42 guenther Exp $ */ -/*- - * Copyright (c) 2004, 2005 David Schultz <das@FreeBSD.ORG> - * All rights reserved. - * - * 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 AUTHOR 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 AUTHOR 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 <sys/types.h> -#include <machine/vaxfp.h> -#include <float.h> -#include <limits.h> -#include <math.h> - -#include "gdtoaimp.h" - -#define DBL_ADJ (DBL_MAX_EXP - 2 + ((DBL_MANT_DIG - 1) % 4)) - -/* - * Round up the given digit string. If the digit string is fff...f, - * this procedure sets it to 100...0 and returns 1 to indicate that - * the exponent needs to be bumped. Otherwise, 0 is returned. - */ -static int -roundup(char *s0, int ndigits) -{ - char *s; - - for (s = s0 + ndigits - 1; *s == 0xf; s--) { - if (s == s0) { - *s = 1; - return (1); - } - *s = 0; - } - ++*s; - return (0); -} - -/* - * Round the given digit string to ndigits digits according to the - * current rounding mode. Note that this could produce a string whose - * value is not representable in the corresponding floating-point - * type. The exponent pointed to by decpt is adjusted if necessary. - */ -static void -dorounding(char *s0, int ndigits, int sign, int *decpt) -{ - int adjust = 0; /* do we need to adjust the exponent? */ - - switch (FLT_ROUNDS) { - case 0: /* toward zero */ - default: /* implementation-defined */ - break; - case 1: /* to nearest, halfway rounds to even */ - if ((s0[ndigits] > 8) || - (s0[ndigits] == 8 && s0[ndigits + 1] & 1)) - adjust = roundup(s0, ndigits); - break; - case 2: /* toward +inf */ - if (sign == 0) - adjust = roundup(s0, ndigits); - break; - case 3: /* toward -inf */ - if (sign != 0) - adjust = roundup(s0, ndigits); - break; - } - - if (adjust) - *decpt += 4; -} - -/* - * This procedure converts a double-precision number in IEEE format - * into a string of hexadecimal digits and an exponent of 2. Its - * behavior is bug-for-bug compatible with dtoa() in mode 2, with the - * following exceptions: - * - * - An ndigits < 0 causes it to use as many digits as necessary to - * represent the number exactly. - * - The additional xdigs argument should point to either the string - * "0123456789ABCDEF" or the string "0123456789abcdef", depending on - * which case is desired. - * - This routine does not repeat dtoa's mistake of setting decpt - * to 9999 in the case of an infinity or NaN. INT_MAX is used - * for this purpose instead. - * - * Note that the C99 standard does not specify what the leading digit - * should be for non-zero numbers. For instance, 0x1.3p3 is the same - * as 0x2.6p2 is the same as 0x4.cp3. This implementation chooses the - * first digit so that subsequent digits are aligned on nibble - * boundaries (before rounding). - * - * Inputs: d, xdigs, ndigits - * Outputs: decpt, sign, rve - */ -char * -__hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, - char **rve) -{ - static const int sigfigs = (DBL_MANT_DIG + 3) / 4; - struct vax_d_floating *p = (struct vax_d_floating *)&d; - char *s, *s0; - int bufsize; - - *sign = p->dflt_sign; - - switch (fpclassify(d)) { - case FP_NORMAL: - *decpt = p->dflt_exp - DBL_ADJ; - break; - case FP_ZERO: - *decpt = 1; - return (nrv_alloc("0", rve, 1)); - default: - abort(); - } - - /* FP_NORMAL or FP_SUBNORMAL */ - - if (ndigits == 0) /* dtoa() compatibility */ - ndigits = 1; - - /* - * For simplicity, we generate all the digits even if the - * caller has requested fewer. - */ - bufsize = (sigfigs > ndigits) ? sigfigs : ndigits; - s0 = rv_alloc(bufsize); - if (s0 == NULL) - return (NULL); - - /* - * We work from right to left, first adding any requested zero - * padding, then the least significant portion of the - * mantissa, followed by the most significant. The buffer is - * filled with the byte values 0x0 through 0xf, which are - * converted to xdigs[0x0] through xdigs[0xf] after the - * rounding phase. - */ - for (s = s0 + bufsize - 1; s > s0 + sigfigs - 1; s--) - *s = 0; - for (; s > s0 + sigfigs - (DFLT_FRACLBITS / 4) - 1 && s > s0; s--) { - *s = p->dflt_fracl & 0xf; - p->dflt_fracl >>= 4; - } - for (; s > s0; s--) { - *s = p->dflt_fracm & 0xf; - p->dflt_fracm >>= 4; - } - for (; s > s0; s--) { - *s = p->dflt_frach & 0xf; - p->dflt_frach >>= 4; - } - - /* - * At this point, we have snarfed all the bits in the - * mantissa, with the possible exception of the highest-order - * (partial) nibble, which is dealt with by the next - * statement. We also tack on the implicit normalization bit. - */ - *s = p->dflt_frach | (1U << ((DBL_MANT_DIG - 1) % 4)); - - /* If ndigits < 0, we are expected to auto-size the precision. */ - if (ndigits < 0) { - for (ndigits = sigfigs; s0[ndigits - 1] == 0; ndigits--) - ; - } - - if (sigfigs > ndigits && s0[ndigits] != 0) - dorounding(s0, ndigits, p->dflt_sign, decpt); - - s = s0 + ndigits; - if (rve != NULL) - *rve = s; - *s-- = '\0'; - for (; s >= s0; s--) - *s = xdigs[(unsigned int)*s]; - - return (s0); -} -DEF_STRONG(__hdtoa); - -/* - * This is the long double version of __hdtoa(). - */ -char * -__hldtoa(long double e, const char *xdigs, int ndigits, int *decpt, int *sign, - char **rve) -{ - return (__hdtoa((double)e, xdigs, ndigits, decpt, sign, rve)); -} -DEF_STRONG(__hldtoa); diff --git a/lib/libc/arch/vax/gdtoa/strtof.c b/lib/libc/arch/vax/gdtoa/strtof.c deleted file mode 100644 index cc129e8e0c2..00000000000 --- a/lib/libc/arch/vax/gdtoa/strtof.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************** - -The author of this software is David M. Gay. - -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -****************************************************************/ - -/* Please send bug reports to David M. Gay (dmg at acm dot org, - * with " at " changed at "@" and " dot " changed to "."). */ - -#include "gdtoaimp.h" - - float -#ifdef KR_headers -strtof(s, sp) CONST char *s; char **sp; -#else -strtof(CONST char *s, char **sp) -#endif -{ - static FPI fpi0 = { 24, 1-128-1-24+1, 255-128-1-24+1, 1, SI }; - ULong bits[1]; - Long exp; - int k; - union { ULong L[1]; float f; } u; -#ifdef Honor_FLT_ROUNDS -#include "gdtoa_fltrnds.h" -#else -#define fpi &fpi0 -#endif - - k = strtodg(s, sp, fpi, &exp, bits); - switch(k & STRTOG_Retmask) { - case STRTOG_NoNumber: - case STRTOG_Zero: - u.L[0] = 0; - break; - - case STRTOG_Normal: - u.L[0] = ((bits[0] & 0x0000ffff) << 16) | /* FracLo */ - ((bits[0] & 0x007f0000) >> 16) | /* FracHi */ - ((exp + 128 + 1 + 23) << 7); /* Exp */ - break; - - case STRTOG_NoMemory: - errno = ERANGE; - /* FALLTHROUGH */ - case STRTOG_Infinite: - u.L[0] = 0xffff7fff; - break; - } - if (k & STRTOG_Neg) - u.L[0] |= 0x00008000L; - return u.f; - } -DEF_STRONG(strtof); diff --git a/lib/libc/arch/vax/gen/Makefile.inc b/lib/libc/arch/vax/gen/Makefile.inc deleted file mode 100644 index e4b99b3d917..00000000000 --- a/lib/libc/arch/vax/gen/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.11 2012/04/19 19:14:56 deraadt Exp $ - -SRCS+= _setjmp.S fabs.S infinity.c ldexp.S modf.S setjmp.S \ - sigsetjmp.S udiv.S urem.S diff --git a/lib/libc/arch/vax/gen/_setjmp.S b/lib/libc/arch/vax/gen/_setjmp.S deleted file mode 100644 index 0b61bee4307..00000000000 --- a/lib/libc/arch/vax/gen/_setjmp.S +++ /dev/null @@ -1,94 +0,0 @@ -/* $OpenBSD: _setjmp.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v)" from - * the last call to - * _setjmp(a) - * by restoring registers from the stack, - * The previous signal state is NOT restored. - */ - -#include "DEFS.h" - -ENTRY(_setjmp, 0) - movl 4(%ap),%r0 - movl 12(%fp),(%r0) # save frame pointer of caller - movl 16(%fp),4(%r0) # save pc of caller - clrl %r0 - ret - -ENTRY(_longjmp, 0) - movl 8(%ap),%r0 # return(v) - movl 4(%ap),%r1 # fetch buffer - tstl (%r1) - beql botch -loop: - bitw $1,6(%fp) # r0 saved? - beql 1f - movl %r0,20(%fp) - bitw $2,6(%fp) # was r1 saved? - beql 2f - movl %r1,24(%fp) - brb 2f -1: - bitw $2,6(%fp) # was r1 saved? - beql 2f - movl %r1,20(%fp) -2: - cmpl (%r1),12(%fp) - beql done - blssu botch - movl $loop,16(%fp) - ret # pop another frame - -done: - cmpb *16(%fp),reiins # returning to an "rei"? - bneq 1f - movab 3f,16(%fp) # do return w/ psl-pc pop - brw 2f -1: - movab 4f,16(%fp) # do standard return -2: - ret # unwind stack before signals enabled -3: - addl2 $8,%sp # compensate for PSL-PC push -4: - jmp *4(%r1) # done, return.... - -botch: - calls $0,_C_LABEL(longjmperror) - halt - - .data -reiins: rei diff --git a/lib/libc/arch/vax/gen/fabs.S b/lib/libc/arch/vax/gen/fabs.S deleted file mode 100644 index 3d654bd39cb..00000000000 --- a/lib/libc/arch/vax/gen/fabs.S +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: fabs.S,v 1.10 2013/07/05 21:10:50 miod Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* fabs - floating absolute value */ - -#include "DEFS.h" - -STRONG_ALIAS(fabsl,fabs) -ENTRY(fabs, 0) - movd 4(%ap),%r0 - bgeq 1f - mnegd %r0,%r0 -1: - ret diff --git a/lib/libc/arch/vax/gen/fpclassify.c b/lib/libc/arch/vax/gen/fpclassify.c deleted file mode 100644 index dc7b5e90b8f..00000000000 --- a/lib/libc/arch/vax/gen/fpclassify.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $OpenBSD: fpclassify.c,v 1.7 2015/10/27 05:54:49 guenther Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <machine/vaxfp.h> -#include <math.h> - -int -__fpclassify(double d) -{ - struct vax_d_floating *p = (struct vax_d_floating *)&d; - - if (p->dflt_exp == 0) { - return FP_ZERO; - } - - return FP_NORMAL; -} -DEF_STRONG(__fpclassify); - -int -__fpclassifyf(float f) -{ - struct vax_f_floating *p = (struct vax_f_floating *)&f; - - if (p->fflt_exp == 0) { - return FP_ZERO; - } - - return FP_NORMAL; -} -DEF_STRONG(__fpclassifyf); - -MAKE_CLONE(__fpclassifyl, __fpclassify); -DEF_STRONG(__fpclassifyl); diff --git a/lib/libc/arch/vax/gen/frexp.c b/lib/libc/arch/vax/gen/frexp.c deleted file mode 100644 index 21b32cddf17..00000000000 --- a/lib/libc/arch/vax/gen/frexp.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $OpenBSD: frexp.c,v 1.12 2013/03/28 18:09:38 martynas Exp $ */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 <sys/types.h> -#include <math.h> - -double -frexp(value, eptr) - double value; - int *eptr; -{ - union { - double v; - struct { - u_int u_mant1 : 7; - u_int u_exp : 8; - u_int u_sign : 1; - u_int u_mant2 : 16; - u_int u_mant3 : 32; - } s; - } u; - - if (value) { - u.v = value; - *eptr = u.s.u_exp - 128; - u.s.u_exp = 128; - return(u.v); - } else { - *eptr = 0; - return((double)0); - } -} - -__strong_alias(frexpl, frexp); diff --git a/lib/libc/arch/vax/gen/infinity.c b/lib/libc/arch/vax/gen/infinity.c deleted file mode 100644 index cda57fe11a4..00000000000 --- a/lib/libc/arch/vax/gen/infinity.c +++ /dev/null @@ -1,15 +0,0 @@ -/* $OpenBSD: infinity.c,v 1.5 2008/12/09 19:52:34 martynas Exp $ */ -/* - * XXX - This is not correct, but what can we do about it? - */ - -/* infinity.c */ - -#include <math.h> - -/* The highest D float on a vax. */ -char __infinity[] = { (char)0xff, (char)0x7f, (char)0xff, (char)0xff, - (char)0xff, (char)0xff, (char)0xff, (char)0xff }; - -/* The highest F float on a vax. */ -char __infinityf[] = { (char)0xff, (char)0x7f, (char)0xff, (char)0xff }; diff --git a/lib/libc/arch/vax/gen/isfinite.c b/lib/libc/arch/vax/gen/isfinite.c deleted file mode 100644 index 019d83d218b..00000000000 --- a/lib/libc/arch/vax/gen/isfinite.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $OpenBSD: isfinite.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */ -/* - * Copyright (c) Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <math.h> - -int -__isfinite(double d) -{ - return(1); -} - -int -__isfinitef(float f) -{ - return(1); -} - -__strong_alias(__isfinitel, __isfinite); - -/* - * 3BSD compatibility aliases. - */ -__strong_alias(finite, __isfinite); -__strong_alias(finitef, __isfinitef); diff --git a/lib/libc/arch/vax/gen/isinf.c b/lib/libc/arch/vax/gen/isinf.c deleted file mode 100644 index 798b8e30c28..00000000000 --- a/lib/libc/arch/vax/gen/isinf.c +++ /dev/null @@ -1,52 +0,0 @@ -/* $OpenBSD: isinf.c,v 1.14 2013/03/28 18:09:38 martynas Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 <sys/types.h> - -int -__isinf(double d) -{ - return(0); -} - -int -__isinff(float f) -{ - return(0); -} - -__strong_alias(__isinfl, __isinf); - -/* - * 3BSD compatibility aliases. - */ -__strong_alias(isinf, __isinf); -__strong_alias(isinff, __isinff); diff --git a/lib/libc/arch/vax/gen/isnan.c b/lib/libc/arch/vax/gen/isnan.c deleted file mode 100644 index f5eaff5be73..00000000000 --- a/lib/libc/arch/vax/gen/isnan.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $OpenBSD: isnan.c,v 1.8 2013/03/28 18:09:38 martynas Exp $ */ -/* - * Copyright (c) Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> - -int -__isnan(double d) -{ - return(0); -} - -int -__isnanf(float f) -{ - return(0); -} - -__strong_alias(__isnanl, __isnan); - -/* - * 3BSD compatibility aliases. - */ -__strong_alias(isnan, __isnan); -__strong_alias(isnanf, __isnanf); diff --git a/lib/libc/arch/vax/gen/isnormal.c b/lib/libc/arch/vax/gen/isnormal.c deleted file mode 100644 index f84a2417e0c..00000000000 --- a/lib/libc/arch/vax/gen/isnormal.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $OpenBSD: isnormal.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/vaxfp.h> -#include <math.h> - -int -__isnormal(double d) -{ - struct vax_d_floating *p = (struct vax_d_floating *)&d; - - return (p->dflt_exp != 0); -} - -int -__isnormalf(float f) -{ - struct vax_f_floating *p = (struct vax_f_floating *)&f; - - return (p->fflt_exp != 0); -} - -__strong_alias(__isnormall, __isnormal); diff --git a/lib/libc/arch/vax/gen/ldexp.S b/lib/libc/arch/vax/gen/ldexp.S deleted file mode 100644 index e22491c9274..00000000000 --- a/lib/libc/arch/vax/gen/ldexp.S +++ /dev/null @@ -1,84 +0,0 @@ -/* $OpenBSD: ldexp.S,v 1.11 2015/10/27 05:54:49 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * double ldexp (value, exp) - * double value; - * int exp; - * - * Ldexp returns value*2**exp, if that result is in range. - * If underflow occurs, it returns zero. If overflow occurs, - * it returns a value of appropriate sign and largest - * possible magnitude. In case of either overflow or underflow, - * errno is set to ERANGE. Note that errno is not modified if - * no error occurs. - */ - -#include "DEFS.h" - -/* - * don't include errno.h, ANSI C says it defines errno. - * - * #include <errno.h> - */ -#define ERANGE 34 - - .globl _C_LABEL(errno) - -STRONG_ALIAS(ldexpl,ldexp) -ENTRY(ldexp, R2) - movd 4(%ap),%r0 /* fetch "value" */ - extzv $7,$8,%r0,%r2 /* r2 := biased exponent */ - jeql 1f /* if zero, done */ - - addl2 12(%ap),%r2 /* r2 := new biased exponent */ - jleq 2f /* if <= 0, underflow */ - cmpl %r2,$256 /* otherwise check if too big */ - jgeq 3f /* jump if overflow */ - insv %r2,$7,$8,%r0 /* put exponent back in result */ -1: - ret -2: - clrd %r0 - jbr 1f -3: - movd huge,%r0 /* largest possible floating magnitude */ - jbc $15,4(%ap),1f /* jump if argument was positive */ - mnegd %r0,%r0 /* if arg < 0, make result negative */ -1: - movl $ ERANGE,_C_LABEL(errno) - ret -END_STRONG(ldexp); - - .data -huge: .word 0x7fff /* the largest number that can */ - .word 0xffff /* be represented in a long floating */ - .word 0xffff /* number. This is given in hex in order */ - .word 0xffff /* to avoid floating conversions */ diff --git a/lib/libc/arch/vax/gen/modf.S b/lib/libc/arch/vax/gen/modf.S deleted file mode 100644 index 5ec88d1eab1..00000000000 --- a/lib/libc/arch/vax/gen/modf.S +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: modf.S,v 1.9 2013/07/05 21:10:50 miod Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * double modf (value, iptr) - * double value, *iptr; - * - * Modf returns the fractional part of "value", - * and stores the integer part indirectly through "iptr". - */ - -#include "DEFS.h" - -ENTRY(modf, R2) - cvtdl 4(%ap),%r2 - bvs 0f - cvtld %r2,*12(%ap) - subd3 *12(%ap),4(%ap),%r0 - ret -0: - emodd 4(%ap),$0,$0f1.0,%r2,%r0 - bvs 1f # integer overflow - cvtld %r2,*12(%ap) - ret -1: - subd3 %r0,4(%ap),*12(%ap) - ret diff --git a/lib/libc/arch/vax/gen/setjmp.S b/lib/libc/arch/vax/gen/setjmp.S deleted file mode 100644 index d44108dd4af..00000000000 --- a/lib/libc/arch/vax/gen/setjmp.S +++ /dev/null @@ -1,89 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.10 2015/09/13 07:36:58 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * C library -- setjmp, longjmp - * - * longjmp(a,v) - * will generate a "return(v)" from - * the last call to - * setjmp(a) - * by restoring registers from the stack, - * and a struct sigcontext, see <signal.h> - */ - -#include "SYS.h" - -ENTRY(setjmp, R6) - movl 4(%ap),%r6 # construct sigcontext - subl2 $12,%sp # space for current struct sigaltstack - pushl %sp # get current values - pushl $0 # no new values - calls $4,_C_LABEL(sigaltstack)# pop args plus signal stack value - movl (%sp)+,(%r6)+ # save onsigstack status of caller - pushl $0 - calls $1,_C_LABEL(_libc_sigblock) # get signal mask - movl %r0,(%r6)+ # save signal mask of caller - movl (%ap),%r0 - moval 4(%ap)[%r0],(%r6)+ # save sp of caller - movl 12(%fp),(%r6)+ # save frame pointer of caller - movl 8(%fp),(%r6)+ # save argument pointer of caller - movl 16(%fp),(%r6)+ # save pc of caller - movpsl (%r6) # save psl of caller - movw 4(%fp),(%r6) - clrl %r0 - ret - -ENTRY(longjmp, R2) - movl 8(%ap),%r0 # return(v) - movl 4(%ap),%r1 # fetch buffer - tstl 12(%r1) - beql botch -loop: - cmpl 12(%r1),%fp # are we there yet? - beql done - blssu botch - moval 20(%fp),%r2 - blbc 6(%fp),1f # was r0 saved? - movl %r0,(%r2)+ -1: - bbc $1,6(%fp),2f # was r1 saved? - movl %r1,(%r2) -2: - movl $loop,16(%fp) - ret # pop another frame - -done: - pushl %r1 # pointer to sigcontext - calls $1,_C_LABEL(sigreturn) # restore previous context - # we should never return -botch: - calls $0,_C_LABEL(longjmperror) - halt diff --git a/lib/libc/arch/vax/gen/signbit.c b/lib/libc/arch/vax/gen/signbit.c deleted file mode 100644 index 6a823853f97..00000000000 --- a/lib/libc/arch/vax/gen/signbit.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $OpenBSD: signbit.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/types.h> -#include <machine/vaxfp.h> -#include <math.h> - -int -__signbit(double d) -{ - struct vax_d_floating *p = (struct vax_d_floating *)&d; - - return p->dflt_sign; -} - -int -__signbitf(float f) -{ - struct vax_f_floating *p = (struct vax_f_floating *)&f; - - return p->fflt_sign; -} - -__strong_alias(__signbitl, __signbit); diff --git a/lib/libc/arch/vax/gen/sigsetjmp.S b/lib/libc/arch/vax/gen/sigsetjmp.S deleted file mode 100644 index e235df90067..00000000000 --- a/lib/libc/arch/vax/gen/sigsetjmp.S +++ /dev/null @@ -1,61 +0,0 @@ -/* $OpenBSD: sigsetjmp.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ -/* - * Copyright (c) 1983, 1993, 1995 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * C library -- sigsetjmp, siglongjmp - * - * siglongjmp(a,v) - * will generate a "return(v)" from - * the last call to - * sigsetjmp(a, savemask) - * by restoring registers from the stack, - * and dependent on savemask restores the - * signal mask. - */ - -#include "DEFS.h" -#include <machine/setjmp.h> - -ENTRY(sigsetjmp, R6) - movl 4(%ap),%r0 # get env pointer - movl 8(%ap),(_JBLEN*4)(%r0) # save "savemask" - tstl 8(%ap) # do saving of signal mask? - beql L1 - jmp _C_LABEL(setjmp)+2 # yep, do full setjmp -L1: jmp _C_LABEL(_setjmp)+2 # nope, skip to _setjmp - -ENTRY(siglongjmp, 0) - movl 4(%ap),%r0 # get env pointer - tstl (_JBLEN*4)(%r0) # test if "savemask" was set - beql L2 - jmp _C_LABEL(longjmp)+2 # yep, do full longjmp -L2: jmp _C_LABEL(_longjmp)+2 # nope, skip to _longjmp - - diff --git a/lib/libc/arch/vax/gen/udiv.S b/lib/libc/arch/vax/gen/udiv.S deleted file mode 100644 index d469016a734..00000000000 --- a/lib/libc/arch/vax/gen/udiv.S +++ /dev/null @@ -1,96 +0,0 @@ -/* $OpenBSD: udiv.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Donn Seeley at UUNET Technologies, Inc. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * Unsigned division, PCC flavor. - * udiv() takes an ordinary dividend/divisor pair; - * audiv() takes a pointer to a dividend and an ordinary divisor. - */ - -#include "DEFS.h" - -#define DIVIDEND 4(%ap) -#define DIVISOR 8(%ap) - -#ifdef __ELF__ -ASENTRY(__udiv, R2) -#else -ASENTRY(udiv,R2) -#endif - movl DIVISOR,%r2 - jlss Leasy # big divisor: settle by comparison - movl DIVIDEND,%r0 - jlss Lhard # big dividend: extended division - divl2 %r2,%r0 # small divisor and dividend: signed division - ret -Lhard: - clrl %r1 - ediv %r2,%r0,%r0,%r1 - ret -Leasy: - cmpl DIVIDEND,%r2 - jgequ Lone # if dividend is as big or bigger, return 1 - clrl %r0 # else return 0 - ret -Lone: - movl $1,%r0 - ret - -#ifdef __ELF__ -ASENTRY(__audiv, R2|R3) -#else -ASENTRY(audiv,R2|R3) -#endif - movl DIVIDEND,%r3 - movl DIVISOR,%r2 - jlss La_easy # big divisor: settle by comparison - movl (%r3),%r0 - jlss La_hard # big dividend: extended division - divl2 %r2,%r0 # small divisor and dividend: signed division - movl %r0,(%r3) # leave the value of the assignment in r0 - ret -La_hard: - clrl %r1 - ediv %r2,%r0,%r0,%r1 - movl %r0,(%r3) - ret -La_easy: - cmpl (%r3),%r2 - jgequ La_one # if dividend is as big or bigger, return 1 - clrl %r0 # else return 0 - clrl (%r3) - ret -La_one: - movl $1,%r0 - movl %r0,(%r3) - ret diff --git a/lib/libc/arch/vax/gen/urem.S b/lib/libc/arch/vax/gen/urem.S deleted file mode 100644 index 608564ad128..00000000000 --- a/lib/libc/arch/vax/gen/urem.S +++ /dev/null @@ -1,96 +0,0 @@ -/* $OpenBSD: urem.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Donn Seeley at UUNET Technologies, Inc. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "DEFS.h" - -/* - * Unsigned modulus, PCC flavor. - * urem() takes an ordinary dividend/divisor pair; - * aurem() takes a pointer to a dividend and an ordinary divisor. - */ - -#define DIVIDEND 4(%ap) -#define DIVISOR 8(%ap) - -#ifdef __ELF__ -ASENTRY(__urem, R2) -#else -ASENTRY(urem,R2) -#endif - movl DIVISOR,%r2 - jlss Leasy # big divisor: settle by comparison - movl DIVIDEND,%r0 - jlss Lhard # big dividend: need extended division - divl3 %r2,%r0,%r1 # small divisor and dividend: signed modulus - mull2 %r2,%r1 - subl2 %r1,%r0 - ret -Lhard: - clrl %r1 - ediv %r2,%r0,%r1,%r0 - ret -Leasy: - subl3 %r2,DIVIDEND,%r0 - jcc Ldifference # if divisor goes in once, return difference - movl DIVIDEND,%r0 # if divisor is bigger, return dividend -Ldifference: - ret - -#ifdef __ELF__ -ASENTRY(__aurem, R2|R3) -#else -ASENTRY(aurem,R2|R3) -#endif - movl DIVIDEND,%r3 - movl DIVISOR,%r2 - jlss La_easy # big divisor: settle by comparison - movl (%r3),%r0 - jlss La_hard # big dividend: need extended division - divl3 %r2,%r0,%r1 # small divisor and dividend: signed modulus - mull2 %r2,%r1 - subl2 %r1,%r0 - movl %r0,(%r3) # leave the value of the assignment in r0 - ret -La_hard: - clrl %r1 - ediv %r2,%r0,%r1,%r0 - movl %r0,(%r3) - ret -La_easy: - subl3 %r2,(%r3),%r0 - jcs La_dividend # if divisor is bigger, leave dividend alone - movl %r0,(%r3) # if divisor goes in once, store difference - ret -La_dividend: - movl (%r3),%r0 - ret diff --git a/lib/libc/arch/vax/net/Makefile.inc b/lib/libc/arch/vax/net/Makefile.inc deleted file mode 100644 index d59c568e887..00000000000 --- a/lib/libc/arch/vax/net/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.4 2012/09/04 03:10:42 okan Exp $ - -SRCS+= htonl.S htons.S ntohl.S ntohs.S diff --git a/lib/libc/arch/vax/net/htonl.S b/lib/libc/arch/vax/net/htonl.S deleted file mode 100644 index 71ca9fcc3d9..00000000000 --- a/lib/libc/arch/vax/net/htonl.S +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* netorder = htonl(hostorder) */ - -#include "DEFS.h" - -ENTRY(htonl, 0) - rotl $-8,4(%ap),%r0 - insv %r0,$16,$8,%r0 - movb 7(%ap),%r0 - ret diff --git a/lib/libc/arch/vax/net/htons.S b/lib/libc/arch/vax/net/htons.S deleted file mode 100644 index c5b453d0c9f..00000000000 --- a/lib/libc/arch/vax/net/htons.S +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* hostorder = htons(netorder) */ - -#include "DEFS.h" - -ENTRY(htons, 0) - rotl $8,4(%ap),%r0 - movb 5(%ap),%r0 - movzwl %r0,%r0 - ret diff --git a/lib/libc/arch/vax/net/ntohl.S b/lib/libc/arch/vax/net/ntohl.S deleted file mode 100644 index 1e862b35ded..00000000000 --- a/lib/libc/arch/vax/net/ntohl.S +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* hostorder = ntohl(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohl, 0) - rotl $-8,4(%ap),%r0 - insv %r0,$16,$8,%r0 - movb 7(%ap),%r0 - ret diff --git a/lib/libc/arch/vax/net/ntohs.S b/lib/libc/arch/vax/net/ntohs.S deleted file mode 100644 index b9554dfa819..00000000000 --- a/lib/libc/arch/vax/net/ntohs.S +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* hostorder = ntohs(netorder) */ - -#include "DEFS.h" - -ENTRY(ntohs, 0) - rotl $8,4(%ap),%r0 - movb 5(%ap),%r0 - movzwl %r0,%r0 - ret diff --git a/lib/libc/arch/vax/string/Makefile.inc b/lib/libc/arch/vax/string/Makefile.inc deleted file mode 100644 index a246341aed2..00000000000 --- a/lib/libc/arch/vax/string/Makefile.inc +++ /dev/null @@ -1,9 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.10 2015/05/15 22:29:37 millert Exp $ - -SRCS+= bcopy.S memcpy.c memmove.S \ - bcmp.S bzero.S ffs.S memchr.c memcmp.S \ - memset.S \ - strchr.S strrchr.c \ - strcat.c strcmp.c strcpy.c strcspn.c strlen.c strlcat.c \ - strlcpy.c strncat.c strncmp.c strncpy.c strpbrk.c \ - strsep.c strspn.c strstr.c swab.c diff --git a/lib/libc/arch/vax/string/bcmp.S b/lib/libc/arch/vax/string/bcmp.S deleted file mode 100644 index c25d46c5102..00000000000 --- a/lib/libc/arch/vax/string/bcmp.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: bcmp.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "DEFS.h" - -/* Since "cmpc3" is not portable across VAXen, do it the hard way */ -/* still, this is four times faster than the generic C version on a uvax2 */ - -ENTRY(bcmp, 0) - movl 12(%ap),%r0 # r0 = n - jeql 9f - movq 4(%ap),%r1 # r1 = s1, r2 = s2 - ashl $-2,%r0,%r3 # convert len to # of long words - jeql 2f -1: - cmpl (%r1)+,(%r2)+ # no "cmpq" alas, so four bytes at a time - jneq 9f - sobgtr %r3,1b -2: - bicl3 $-4,%r0,%r3 # handle at most 3 extra bytes - jeql 8f -3: - cmpb (%r1)+,(%r2)+ - jneq 9f - sobgtr %r3,3b -8: - clrl %r0 # we have a match! -9: - ret -END_WEAK(bcmp) diff --git a/lib/libc/arch/vax/string/bcopy.S b/lib/libc/arch/vax/string/bcopy.S deleted file mode 100644 index 27d5d8fd24a..00000000000 --- a/lib/libc/arch/vax/string/bcopy.S +++ /dev/null @@ -1,72 +0,0 @@ -/* $OpenBSD: bcopy.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* bcopy(from, to, size) */ - -#include "DEFS.h" - -ENTRY(bcopy, R2|R3|R4|R5|R6) - movl 4(%ap),%r1 - movl 8(%ap),%r3 - movl 12(%ap),%r6 - cmpl %r1,%r3 - bgtr 2f # normal forward case - blss 3f # overlapping, must do backwards - ret # equal, nothing to do -1: - subl2 %r0,%r6 - movc3 %r0,(%r1),(%r3) -2: - movzwl $65535,%r0 - cmpl %r6,%r0 - jgtr 1b - movc3 %r6,(%r1),(%r3) - ret -3: - addl2 %r6,%r1 - addl2 %r6,%r3 - movzwl $65535,%r0 - jbr 5f -4: - subl2 %r0,%r6 - subl2 %r0,%r1 - subl2 %r0,%r3 - movc3 %r0,(%r1),(%r3) - movzwl $65535,%r0 - subl2 %r0,%r1 - subl2 %r0,%r3 -5: - cmpl %r6,%r0 - jgtr 4b - subl2 %r6,%r1 - subl2 %r6,%r3 - movc3 %r6,(%r1),(%r3) - ret -END_WEAK(bcopy) diff --git a/lib/libc/arch/vax/string/bzero.S b/lib/libc/arch/vax/string/bzero.S deleted file mode 100644 index 0867d3971c3..00000000000 --- a/lib/libc/arch/vax/string/bzero.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: bzero.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* bzero(base, length) */ - -#include "DEFS.h" - -ENTRY(bzero, R2|R3|R4|R5) - movl 4(%ap),%r3 - jbr 2f -1: - subl2 %r0,8(%ap) - movc5 $0,(%r3),$0,%r0,(%r3) -2: - movzwl $65535,%r0 - cmpl 8(%ap),%r0 - jgtr 1b - movc5 $0,(%r3),$0,8(%ap),(%r3) - ret -END_WEAK(bzero) diff --git a/lib/libc/arch/vax/string/ffs.S b/lib/libc/arch/vax/string/ffs.S deleted file mode 100644 index 1e75f128a06..00000000000 --- a/lib/libc/arch/vax/string/ffs.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: ffs.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* bit = ffs(value) */ - -#include "DEFS.h" - -ENTRY(ffs, 0) - ffs $0,$32,4(%ap),%r0 - bneq 1f - mnegl $1,%r0 -1: - incl %r0 - ret -END_WEAK(ffs) diff --git a/lib/libc/arch/vax/string/memcmp.S b/lib/libc/arch/vax/string/memcmp.S deleted file mode 100644 index 8fdf29435bb..00000000000 --- a/lib/libc/arch/vax/string/memcmp.S +++ /dev/null @@ -1,66 +0,0 @@ -/* $OpenBSD: memcmp.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* int memcmp(s1, s2, n) */ - -#include "DEFS.h" - -ENTRY(memcmp, 0) - movl 12(%ap),%r0 - jeql 9f - movq 4(%ap),%r1 - ashl $-2,%r0,%r3 # convert len to long words - jeql 2f -1: - cmpl (%r1)+,(%r2)+ # no "cmpq" alas - jneq 7f - sobgtr %r3,1b -2: - bicl3 $-4,%r0,%r3 # handle at most 3 extra bytes - jeql 4f -3: - cmpb (%r1)+,(%r2)+ - jneq 8f - sobgtr %r3,3b -4: - clrl %r0 # we had a match - ret -7: # backup, and do a byte compare - tstl -(%r1) - tstl -(%r2) - movl $4,%r3 - jbr 3b -8: - movzbl -(%r1),%r3 - movzbl -(%r2),%r4 - subl3 %r4,%r3,%r0 -9: - ret -END_STRONG(memcmp) diff --git a/lib/libc/arch/vax/string/memcpy.S b/lib/libc/arch/vax/string/memcpy.S deleted file mode 100644 index e13ae0baa24..00000000000 --- a/lib/libc/arch/vax/string/memcpy.S +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: memcpy.S,v 1.9 2015/08/31 02:53:57 guenther Exp $ */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * void *memcpy(dst, src, size) - * returns dst - * - * This optimises the usual case (count < 65536) at the expense - * of some extra memory references and branches when count >= 65536. - */ - -#include "DEFS.h" - -ENTRY(memcpy, R2|R3|R4|R5) - movzwl $65535,%r0 /* r0 = 64K (needed below) */ - movq 8(%ap),%r1 /* r1 = src, r2 = length */ - movl 4(%ap),%r3 /* r3 = dst */ -1: - /* copy forward */ - cmpl %r2,%r0 - bgtru 3f /* stupid movc3 limitation */ - movc3 %r2,(%r1),(%r3) /* move it all */ -2: - movl 4(%ap),%r0 /* return original dst */ - ret -3: - subl2 %r0,12(%ap) /* adjust length by 64K */ - movc3 %r0,(%r1),(%r3) /* move 64K */ - movl 12(%ap),%r2 - decw %r0 /* from 0 to 65535 */ - brb 1b /* retry */ -END_STRONG(memcpy) diff --git a/lib/libc/arch/vax/string/memmove.S b/lib/libc/arch/vax/string/memmove.S deleted file mode 100644 index 3f71d2629c1..00000000000 --- a/lib/libc/arch/vax/string/memmove.S +++ /dev/null @@ -1,87 +0,0 @@ -/* $OpenBSD: memmove.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * void *memmove(dst, src, size) - * returns dst - * - * This optimises the usual case (count < 65536) at the expense - * of some extra memory references and branches when count >= 65536. - */ - -#include "DEFS.h" - -ENTRY(memmove, R2|R3|R4|R5) - movzwl $65535,%r0 /* r0 = 64K (needed below) */ - movq 8(%ap),%r1 /* r1 = src, r2 = length */ - movl 4(%ap),%r3 /* r3 = dst */ - cmpl %r1,%r3 - bgtru 1f /* normal forward case */ - beql 2f /* equal, nothing to do */ - addl2 %r2,%r1 /* overlaps iff src<dst but src+len>dst */ - cmpl %r1,%r3 - bgtru 4f /* overlapping, must move backwards */ - subl2 %r2,%r1 - -1: /* move forward */ - cmpl %r2,%r0 - bgtru 3f /* stupid movc3 limitation */ - movc3 %r2,(%r1),(%r3) /* move it all */ -2: - movl 4(%ap),%r0 /* return original dst */ - ret -3: - subl2 %r0,12(%ap) /* adjust length by 64K */ - movc3 %r0,(%r1),(%r3) /* move 64K */ - movl 12(%ap),%r2 - decw %r0 /* from 0 to 65535 */ - brb 1b /* retry */ - -4: /* move backward */ - addl2 %r2,%r3 -5: - cmpl %r2,%r0 - bgtru 6f /* stupid movc3 limitation */ - subl2 %r2,%r1 - subl2 %r2,%r3 - movc3 %r2,(%r1),(%r3) /* move it all */ - movl 4(%ap),%r0 /* return original dst */ - ret -6: - subl2 %r0,12(%ap) /* adjust length by 64K */ - subl2 %r0,%r1 - subl2 %r0,%r3 - movc3 %r0,(%r1),(%r3) /* move 64K */ - movl 12(%ap),%r2 - decw %r0 - subl2 %r0,%r1 - subl2 %r0,%r3 - brb 5b -END_STRONG(memmove) diff --git a/lib/libc/arch/vax/string/memset.S b/lib/libc/arch/vax/string/memset.S deleted file mode 100644 index 40bada34ea7..00000000000 --- a/lib/libc/arch/vax/string/memset.S +++ /dev/null @@ -1,49 +0,0 @@ -/* $OpenBSD: memset.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* void *memset(base, c, length) */ - -#include "DEFS.h" - -ENTRY(memset, R2|R3|R4|R5) - movl 4(%ap),%r3 -1: - movzwl $65535,%r0 - movq 8(%ap),%r1 - cmpl %r2,%r0 - jgtru 2f - movc5 $0,(%r3),%r1,%r2,(%r3) - movl %r1,%r0 - ret -2: - subl2 %r0,12(%ap) - movc5 $0,(%r3),%r1,%r0,(%r3) - jbr 1b -END_STRONG(memset) diff --git a/lib/libc/arch/vax/string/strchr.S b/lib/libc/arch/vax/string/strchr.S deleted file mode 100644 index 7c8b8de57dd..00000000000 --- a/lib/libc/arch/vax/string/strchr.S +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: strchr.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */ -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * Find the first occurrence of c in the string cp. - * Return pointer to match or null pointer. - * - * char *strchr(char *cp, char c) - */ -#include "DEFS.h" - -/* Alas not quite twice as fast as the generic C version on a uvax2 */ - -WEAK_ALIAS(index, strchr) -ENTRY(strchr, 0) - movq 4(%ap),%r0 # r0 = cp; r1 = c - tstb %r1 # special case, looking for '\0' - jeql 3f -1: - cmpb (%r0),%r1 - jeql 2f - tstb (%r0)+ - jneq 1b - clrl %r0 # return NULL if no match -2: - ret -3: - tstb (%r0)+ - jneq 3b - decl %r0 - jbr 2b -END_STRONG(strchr) diff --git a/lib/libc/arch/vax/sys/Ovfork.S b/lib/libc/arch/vax/sys/Ovfork.S deleted file mode 100644 index 8e16bfe73b2..00000000000 --- a/lib/libc/arch/vax/sys/Ovfork.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: Ovfork.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -/* - * @(#)vfork.s 4.1 (Berkeley) 12/21/80 - * C library -- vfork - */ - -#include "SYS.h" - -/* - * trickery here, due to keith sklower, uses ret to clear the stack, - * and then returns with a jump indirect, since only one person can return - * with a ret off this stack... we do the ret before we vfork! - */ - -SYSENTRY(vfork) - movl 16(%fp),%r2 # save return address before we smash it - movab 1f,16(%fp) - ret -1: - chmk $ SYS_vfork - bcs 2f # if failed, set errno and return -1 - jmp (%r2) - -2: - movl %r0,_C_LABEL(errno) - mnegl $1,%r0 - jmp (%r2) -SYSCALL_END(vfork) diff --git a/lib/libc/arch/vax/sys/brk.S b/lib/libc/arch/vax/sys/brk.S deleted file mode 100644 index 7ce66b64c2b..00000000000 --- a/lib/libc/arch/vax/sys/brk.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: brk.S,v 1.11 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - - .data -__minbrk: - .long _end - END(__minbrk) - .type __minbrk,@object - - .text - - .globl __curbrk - - .weak brk - -ENTRY(brk, 0) - cmpl __minbrk,4(%ap) - blequ 1f - movl __minbrk,4(%ap) -1: - chmk $ SYS_break - jcs 2f - movl 4(%ap),__curbrk - clrl %r0 - ret -2: - jmp _C_LABEL(__cerror) -END(brk) diff --git a/lib/libc/arch/vax/sys/cerror.S b/lib/libc/arch/vax/sys/cerror.S deleted file mode 100644 index e2c2ec867c4..00000000000 --- a/lib/libc/arch/vax/sys/cerror.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: cerror.S,v 1.12 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - -WEAK_ALIAS(__cerror,___cerror) - - .globl _C_LABEL(errno) - .globl _C_LABEL(___cerror) -_C_LABEL(___cerror): - movl %r0,_C_LABEL(errno) - mnegl $1,%r0 - mnegl $1,%r1 - ret -END(___cerror) diff --git a/lib/libc/arch/vax/sys/fork.S b/lib/libc/arch/vax/sys/fork.S deleted file mode 100644 index 4848c1e21ec..00000000000 --- a/lib/libc/arch/vax/sys/fork.S +++ /dev/null @@ -1,34 +0,0 @@ -/* $OpenBSD: fork.S,v 1.7 2015/04/07 01:27:07 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - -RSYSCALL_HIDDEN(fork) -WEAK_ALIAS(_thread_fork,_thread_sys_fork) diff --git a/lib/libc/arch/vax/sys/sbrk.S b/lib/libc/arch/vax/sys/sbrk.S deleted file mode 100644 index fea5c520903..00000000000 --- a/lib/libc/arch/vax/sys/sbrk.S +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: sbrk.S,v 1.11 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - - - .globl _end - .globl __curbrk - - .data -__curbrk: - .long _end - END(__curbrk) - .type __curbrk,@object - - .text - - .weak sbrk - -ENTRY(sbrk, R3) - addl3 __curbrk,4(%ap),-(%sp) - pushl $1 - movl %ap,%r3 - movl %sp,%ap - chmk $ SYS_break - jcs 1f - movl __curbrk,%r0 - addl2 4(%r3),__curbrk - ret -1: - jmp _C_LABEL(__cerror) -END(sbrk) diff --git a/lib/libc/arch/vax/sys/sigpending.S b/lib/libc/arch/vax/sys/sigpending.S deleted file mode 100644 index 174acbf519d..00000000000 --- a/lib/libc/arch/vax/sys/sigpending.S +++ /dev/null @@ -1,37 +0,0 @@ -/* $OpenBSD: sigpending.S,v 1.6 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - -SYSCALL(sigpending) - movl %r0,*4(%ap) # store old mask - clrl %r0 - ret -SYSCALL_END(sigpending) diff --git a/lib/libc/arch/vax/sys/sigprocmask.S b/lib/libc/arch/vax/sys/sigprocmask.S deleted file mode 100644 index 3771cd02b4e..00000000000 --- a/lib/libc/arch/vax/sys/sigprocmask.S +++ /dev/null @@ -1,51 +0,0 @@ -/* $OpenBSD: sigprocmask.S,v 1.11 2015/10/23 04:39:25 guenther Exp $ */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - - -SYSENTRY_HIDDEN(sigprocmask) - tstl 8(%ap) # check new sigset pointer - bneq 1f # if not null, indirect -/* movl $0,8(%ap) # null mask pointer: block empty set */ - movl $1,4(%ap) # SIG_BLOCK - jbr 2f -1: movl *8(%ap),8(%ap) # indirect to new mask arg -2: chmk $ SYS_sigprocmask - jcs 4f - tstl 12(%ap) # test if old mask requested - beql 3f - movl %r0,*12(%ap) # store old mask -3: - clrl %r0 - ret -4: - jmp _C_LABEL(__cerror) -SYSCALL_END_HIDDEN(sigprocmask) diff --git a/lib/libc/arch/vax/sys/sigreturn.S b/lib/libc/arch/vax/sys/sigreturn.S deleted file mode 100644 index e554d55f9d4..00000000000 --- a/lib/libc/arch/vax/sys/sigreturn.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: sigreturn.S,v 1.8 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - -/* - * We must preserve the state of the registers as the user has set them up. - */ -#ifdef PROF -#undef ENTRY -#define ENTRY(x, y) \ - _ENTRY(_C_LABEL(x), 0); \ - pushr $0x3f; \ - _PROF_PROLOGUE; \ - popr $0x3f -#endif /* PROF */ - -SYSCALL(sigreturn) - ret -SYSCALL_END(sigreturn) diff --git a/lib/libc/arch/vax/sys/sigsuspend.S b/lib/libc/arch/vax/sys/sigsuspend.S deleted file mode 100644 index 5ef2bdf5ef3..00000000000 --- a/lib/libc/arch/vax/sys/sigsuspend.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $OpenBSD: sigsuspend.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - - -SYSENTRY(sigsuspend) - movl *4(%ap),4(%ap) # indirect to mask arg - chmk $ SYS_sigsuspend - jcs 1f - clrl %r0 # shouldnt happen - ret -1: - jmp _C_LABEL(__cerror) -SYSCALL_END(sigsuspend) diff --git a/lib/libc/arch/vax/sys/syscall.S b/lib/libc/arch/vax/sys/syscall.S deleted file mode 100644 index 7887aa38962..00000000000 --- a/lib/libc/arch/vax/sys/syscall.S +++ /dev/null @@ -1,46 +0,0 @@ -/* $OpenBSD: syscall.S,v 1.10 2015/09/10 13:29:09 guenther Exp $ */ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 "SYS.h" - -SYSENTRY(syscall) - movl 4(%ap),%r0 # syscall number - subl3 $1,(%ap)+,(%ap) # one fewer arguments - chmk %r0 - jcs 1f - ret -1: - jmp _C_LABEL(__cerror) -SYSCALL_END(syscall) diff --git a/lib/libc/arch/vax/sys/tfork_thread.S b/lib/libc/arch/vax/sys/tfork_thread.S deleted file mode 100644 index eec4720e32b..00000000000 --- a/lib/libc/arch/vax/sys/tfork_thread.S +++ /dev/null @@ -1,68 +0,0 @@ -/* $OpenBSD: tfork_thread.S,v 1.4 2015/09/10 13:29:09 guenther Exp $ */ - -/* - * Copyright (c) 2005, Miodrag Vallat - * - * 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 AUTHOR ``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 AUTHOR 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 "SYS.h" - -/* - * int __tfork_thread(const struct __tfork *param, size_t psize, void (*func)(void *), void *arg); - */ -ENTRY(__tfork_thread, R2|R3) - /* - * Save thread creation arguments into registers. - */ - movl 12(%ap), %r2 /* func */ - movl 16(%ap), %r3 /* arg */ - - __DO_SYSCALL(__tfork) - jcs 9f - - cmpl %r0, $0 - beql 1f - - /* - * In parent process: just return. - */ - ret - -1: - /* - * In child process: switch stack, invoke function, then exit. - * Note that since we can not pass a register to calls, we need - * to waste 4 bytes of stack in every thread. - */ - pushl %r2 /* func */ - pushl %r3 /* arg */ - calls $1, *4(%sp) /* func */ - - __DO_SYSCALL(__threxit) - -9: - /* - * system call failed. - */ - jmp _C_LABEL(__cerror) -END(__tfork_thread) diff --git a/lib/libc/gdtoa/ldtoa.c b/lib/libc/gdtoa/ldtoa.c index 963afd227d0..7282e7a396d 100644 --- a/lib/libc/gdtoa/ldtoa.c +++ b/lib/libc/gdtoa/ldtoa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldtoa.c,v 1.3 2015/09/14 12:49:33 guenther Exp $ */ +/* $OpenBSD: ldtoa.c,v 1.4 2016/03/09 16:28:47 deraadt Exp $ */ /*- * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG> * All rights reserved. @@ -26,9 +26,7 @@ */ #include <sys/types.h> -#ifndef __vax__ #include <machine/ieee.h> -#endif /* !__vax__ */ #include <float.h> #include <stdint.h> #include <limits.h> diff --git a/lib/libc/rpc/xdr_float.c b/lib/libc/rpc/xdr_float.c index d82e9899fb2..7402a2952c0 100644 --- a/lib/libc/rpc/xdr_float.c +++ b/lib/libc/rpc/xdr_float.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xdr_float.c,v 1.22 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: xdr_float.c,v 1.23 2016/03/09 16:28:47 deraadt Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -46,106 +46,26 @@ /* * NB: Not portable. - * This routine works on machines with IEEE754 FP and Vaxen. + * This routine works on machines with IEEE754 FP. */ -#ifdef __vax__ - -/* What IEEE single precision floating point looks like on a Vax */ -struct ieee_single { - unsigned int mantissa: 23; - unsigned int exp : 8; - unsigned int sign : 1; -}; - -/* Vax single precision floating point */ -struct vax_single { - unsigned int mantissa1 : 7; - unsigned int exp : 8; - unsigned int sign : 1; - unsigned int mantissa2 : 16; -}; - -#define VAX_SNG_BIAS 0x81 -#define IEEE_SNG_BIAS 0x7f - -static struct sgl_limits { - struct vax_single s; - struct ieee_single ieee; -} sgl_limits[2] = { - {{ 0x7f, 0xff, 0x0, 0xffff }, /* Max Vax */ - { 0x0, 0xff, 0x0 }}, /* Max IEEE */ - {{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */ - { 0x0, 0x0, 0x0 }} /* Min IEEE */ -}; - -#else #include <endian.h> -#define IEEEFP -#endif bool_t xdr_float(XDR *xdrs, float *fp) { -#ifdef IEEEFP bool_t rv; long tmpl; -#else - struct ieee_single is; - struct vax_single vs, *vsp; - struct sgl_limits *lim; - int i; -#endif switch (xdrs->x_op) { case XDR_ENCODE: -#ifdef IEEEFP tmpl = *(int32_t *)fp; return (XDR_PUTLONG(xdrs, &tmpl)); -#else - vs = *((struct vax_single *)fp); - for (i = 0, lim = sgl_limits; - i < sizeof(sgl_limits)/sizeof(struct sgl_limits); - i++, lim++) { - if ((vs.mantissa2 == lim->s.mantissa2) && - (vs.exp == lim->s.exp) && - (vs.mantissa1 == lim->s.mantissa1)) { - is = lim->ieee; - goto shipit; - } - } - is.exp = vs.exp - VAX_SNG_BIAS + IEEE_SNG_BIAS; - is.mantissa = (vs.mantissa1 << 16) | vs.mantissa2; - shipit: - is.sign = vs.sign; - return (XDR_PUTLONG(xdrs, (long *)&is)); -#endif case XDR_DECODE: -#ifdef IEEEFP rv = XDR_GETLONG(xdrs, &tmpl); *(int32_t *)fp = tmpl; return (rv); -#else - vsp = (struct vax_single *)fp; - if (!XDR_GETLONG(xdrs, (long *)&is)) - return (FALSE); - for (i = 0, lim = sgl_limits; - i < sizeof(sgl_limits)/sizeof(struct sgl_limits); - i++, lim++) { - if ((is.exp == lim->ieee.exp) && - (is.mantissa == lim->ieee.mantissa)) { - *vsp = lim->s; - goto doneit; - } - } - vsp->exp = is.exp - IEEE_SNG_BIAS + VAX_SNG_BIAS; - vsp->mantissa2 = is.mantissa; - vsp->mantissa1 = (is.mantissa >> 16); - doneit: - vsp->sign = is.sign; - return (TRUE); -#endif case XDR_FREE: return (TRUE); @@ -153,61 +73,16 @@ xdr_float(XDR *xdrs, float *fp) return (FALSE); } -#ifdef __vax__ -/* What IEEE double precision floating point looks like on a Vax */ -struct ieee_double { - unsigned int mantissa1 : 20; - unsigned int exp : 11; - unsigned int sign : 1; - unsigned int mantissa2 : 32; -}; - -/* Vax double precision floating point */ -struct vax_double { - unsigned int mantissa1 : 7; - unsigned int exp : 8; - unsigned int sign : 1; - unsigned int mantissa2 : 16; - unsigned int mantissa3 : 16; - unsigned int mantissa4 : 16; -}; - -#define VAX_DBL_BIAS 0x81 -#define IEEE_DBL_BIAS 0x3ff -#define MASK(nbits) ((1 << nbits) - 1) - -static struct dbl_limits { - struct vax_double d; - struct ieee_double ieee; -} dbl_limits[2] = { - {{ 0x7f, 0xff, 0x0, 0xffff, 0xffff, 0xffff }, /* Max Vax */ - { 0x0, 0x7ff, 0x0, 0x0 }}, /* Max IEEE */ - {{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, /* Min Vax */ - { 0x0, 0x0, 0x0, 0x0 }} /* Min IEEE */ -}; - -#endif /* __vax__ */ - - bool_t xdr_double(XDR *xdrs, double *dp) { -#ifdef IEEEFP int32_t *i32p; bool_t rv; long tmpl; -#else - long *lp; - struct ieee_double id; - struct vax_double vd; - struct dbl_limits *lim; - int i; -#endif switch (xdrs->x_op) { case XDR_ENCODE: -#ifdef IEEEFP i32p = (int32_t *)dp; #if (BYTE_ORDER == BIG_ENDIAN) || (defined(__arm__) && !defined(__VFP_FP__)) tmpl = *i32p++; @@ -225,33 +100,8 @@ xdr_double(XDR *xdrs, double *dp) rv = XDR_PUTLONG(xdrs, &tmpl); #endif return (rv); -#else - vd = *((struct vax_double *)dp); - for (i = 0, lim = dbl_limits; - i < sizeof(dbl_limits)/sizeof(struct dbl_limits); - i++, lim++) { - if ((vd.mantissa4 == lim->d.mantissa4) && - (vd.mantissa3 == lim->d.mantissa3) && - (vd.mantissa2 == lim->d.mantissa2) && - (vd.mantissa1 == lim->d.mantissa1) && - (vd.exp == lim->d.exp)) { - id = lim->ieee; - goto shipit; - } - } - id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS; - id.mantissa1 = (vd.mantissa1 << 13) | (vd.mantissa2 >> 3); - id.mantissa2 = ((vd.mantissa2 & MASK(3)) << 29) | - (vd.mantissa3 << 13) | - ((vd.mantissa4 >> 3) & MASK(13)); - shipit: - id.sign = vd.sign; - lp = (long *)&id; - return (XDR_PUTLONG(xdrs, lp++) && XDR_PUTLONG(xdrs, lp)); -#endif case XDR_DECODE: -#ifdef IEEEFP i32p = (int32_t *)dp; #if (BYTE_ORDER == BIG_ENDIAN) || (defined(__arm__) && !defined(__VFP_FP__)) rv = XDR_GETLONG(xdrs, &tmpl); @@ -269,31 +119,6 @@ xdr_double(XDR *xdrs, double *dp) *i32p = tmpl; #endif return (rv); -#else - lp = (long *)&id; - if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp)) - return (FALSE); - for (i = 0, lim = dbl_limits; - i < sizeof(dbl_limits)/sizeof(struct dbl_limits); - i++, lim++) { - if ((id.mantissa2 == lim->ieee.mantissa2) && - (id.mantissa1 == lim->ieee.mantissa1) && - (id.exp == lim->ieee.exp)) { - vd = lim->d; - goto doneit; - } - } - vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS; - vd.mantissa1 = (id.mantissa1 >> 13); - vd.mantissa2 = ((id.mantissa1 & MASK(13)) << 3) | - (id.mantissa2 >> 29); - vd.mantissa3 = (id.mantissa2 >> 13); - vd.mantissa4 = (id.mantissa2 << 3); - doneit: - vd.sign = id.sign; - *dp = *((double *)&vd); - return (TRUE); -#endif case XDR_FREE: return (TRUE); |