diff options
Diffstat (limited to 'lib/libc/riscv')
26 files changed, 6 insertions, 401 deletions
diff --git a/lib/libc/riscv/Makefile.inc b/lib/libc/riscv/Makefile.inc index 9df72b44a619..be6dbc67a807 100644 --- a/lib/libc/riscv/Makefile.inc +++ b/lib/libc/riscv/Makefile.inc @@ -1,4 +1,3 @@ -# $FreeBSD$ # # Machine dependent definitions for the RISC-V architecture. # diff --git a/lib/libc/riscv/SYS.h b/lib/libc/riscv/SYS.h deleted file mode 100644 index 7339b70ff94e..000000000000 --- a/lib/libc/riscv/SYS.h +++ /dev/null @@ -1,72 +0,0 @@ -/*- - * Copyright (c) 2014 Andrew Turner - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> - * All rights reserved. - * - * Portions of this software were developed by SRI International and the - * University of Cambridge Computer Laboratory under DARPA/AFRL contract - * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Portions of this software were developed by the University of Cambridge - * Computer Laboratory as part of the CTSRD Project, with support from the - * UK Higher Education Innovation Fund (HEIF). - * - * 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. - * - * $FreeBSD$ - */ - -#include <sys/syscall.h> -#include <machine/asm.h> - -#define _SYSCALL(name) \ - li t0, SYS_ ## name; \ - ecall - -#define SYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - ret; \ -END(__sys_##name) - -#define PSEUDO(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnez t0, 1f; \ - ret; \ -1: la t1, cerror; \ - jr t1; \ -END(__sys_##name) - -#define RSYSCALL(name) \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnez t0, 1f; \ - ret; \ -1: la t1, cerror; \ - jr t1; \ -END(__sys_##name) diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 4214db12ed5f..bebcecb879f4 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -1,36 +1,10 @@ /* - * $FreeBSD$ - */ - -/* * This only needs to contain symbols that are not listed in * symbol maps from other parts of libc (i.e., not found in * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). */ FBSD_1.0 { - /* PSEUDO syscalls */ - _exit; - - _setjmp; - _longjmp; - fabs; __flt_rounds; fpgetmask; fpsetmask; - __infinity; - __nan; - setjmp; - longjmp; - sigsetjmp; - siglongjmp; - htonl; - htons; - ntohl; - ntohs; - vfork; - makecontext; -}; - -FBSDprivate_1.0 { - __makecontext; }; diff --git a/lib/libc/riscv/_fpmath.h b/lib/libc/riscv/_fpmath.h index be5be56acaa6..3bb741e70350 100644 --- a/lib/libc/riscv/_fpmath.h +++ b/lib/libc/riscv/_fpmath.h @@ -23,8 +23,6 @@ * 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. - * - * $FreeBSD$ */ union IEEEl2bits { diff --git a/lib/libc/riscv/arith.h b/lib/libc/riscv/arith.h index ecb1a33fccb0..9c695c74a33e 100644 --- a/lib/libc/riscv/arith.h +++ b/lib/libc/riscv/arith.h @@ -1,7 +1,5 @@ /* * MD header for contrib/gdtoa - * - * $FreeBSD$ */ /* diff --git a/lib/libc/riscv/gd_qnan.h b/lib/libc/riscv/gd_qnan.h index cb375dd87173..66e48706d6bb 100644 --- a/lib/libc/riscv/gd_qnan.h +++ b/lib/libc/riscv/gd_qnan.h @@ -3,8 +3,6 @@ * * This file can be generated by compiling and running contrib/gdtoa/qnan.c * on the target architecture after arith.h has been generated. - * - * $FreeBSD$ */ #define f_QNAN 0x7fc00000 diff --git a/lib/libc/riscv/gen/Makefile.inc b/lib/libc/riscv/gen/Makefile.inc index f5914e630694..443e029946bf 100644 --- a/lib/libc/riscv/gen/Makefile.inc +++ b/lib/libc/riscv/gen/Makefile.inc @@ -1,5 +1,3 @@ -# $FreeBSD$ - SRCS+= _ctx_start.S \ fabs.S \ flt_rounds.c \ diff --git a/lib/libc/riscv/gen/_ctx_start.S b/lib/libc/riscv/gen/_ctx_start.S index cda5397ac22d..69d19fc9403b 100644 --- a/lib/libc/riscv/gen/_ctx_start.S +++ b/lib/libc/riscv/gen/_ctx_start.S @@ -33,8 +33,6 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD$"); - ENTRY(_ctx_start) jalr s0 /* Call func from makecontext */ mv a0, s1 /* Load ucp saved in makecontext */ diff --git a/lib/libc/riscv/gen/_setjmp.S b/lib/libc/riscv/gen/_setjmp.S index ded6705ef7ee..4554f736f72a 100644 --- a/lib/libc/riscv/gen/_setjmp.S +++ b/lib/libc/riscv/gen/_setjmp.S @@ -33,8 +33,6 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD$"); - #include <machine/setjmp.h> ENTRY(_setjmp) @@ -131,6 +129,9 @@ ENTRY(_longjmp) /* Load the return value */ mv a0, a1 + bnez a1, 1f + li a0, 1 +1: ret botch: diff --git a/lib/libc/riscv/gen/fabs.S b/lib/libc/riscv/gen/fabs.S index 036d50eddf90..21304036fc0f 100644 --- a/lib/libc/riscv/gen/fabs.S +++ b/lib/libc/riscv/gen/fabs.S @@ -37,8 +37,6 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD$"); - ENTRY(fabs) #ifdef __riscv_float_abi_double fabs.d fa0, fa0 diff --git a/lib/libc/riscv/gen/flt_rounds.c b/lib/libc/riscv/gen/flt_rounds.c index 5dec6e45f400..bccd7d8baa44 100644 --- a/lib/libc/riscv/gen/flt_rounds.c +++ b/lib/libc/riscv/gen/flt_rounds.c @@ -32,30 +32,17 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <fenv.h> #include <float.h> -#ifdef __riscv_float_abi_soft -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" -#endif - int __flt_rounds(void) { uint64_t mode; -#ifdef __riscv_float_abi_soft - mode = __softfloat_float_rounding_mode; -#else __asm __volatile("csrr %0, fcsr" : "=r" (mode)); -#endif switch (mode & _ROUND_MASK) { case FE_TOWARDZERO: diff --git a/lib/libc/riscv/gen/fpgetmask.c b/lib/libc/riscv/gen/fpgetmask.c index f461cc2ba10e..7835a17cff60 100644 --- a/lib/libc/riscv/gen/fpgetmask.c +++ b/lib/libc/riscv/gen/fpgetmask.c @@ -27,9 +27,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <ieeefp.h> diff --git a/lib/libc/riscv/gen/fpsetmask.c b/lib/libc/riscv/gen/fpsetmask.c index 6eeac9de8bef..024f1fd8d8bc 100644 --- a/lib/libc/riscv/gen/fpsetmask.c +++ b/lib/libc/riscv/gen/fpsetmask.c @@ -27,9 +27,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <ieeefp.h> diff --git a/lib/libc/riscv/gen/infinity.c b/lib/libc/riscv/gen/infinity.c index 115c4702d895..ae44d5195a3b 100644 --- a/lib/libc/riscv/gen/infinity.c +++ b/lib/libc/riscv/gen/infinity.c @@ -2,9 +2,6 @@ * infinity.c */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <math.h> /* bytes for +Infinity on riscv */ diff --git a/lib/libc/riscv/gen/makecontext.c b/lib/libc/riscv/gen/makecontext.c index 3633a5dd66e1..e5371d082b2c 100644 --- a/lib/libc/riscv/gen/makecontext.c +++ b/lib/libc/riscv/gen/makecontext.c @@ -32,9 +32,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/param.h> #include <machine/riscvreg.h> diff --git a/lib/libc/riscv/gen/setjmp.S b/lib/libc/riscv/gen/setjmp.S index c0458e907ce0..efac05ecc611 100644 --- a/lib/libc/riscv/gen/setjmp.S +++ b/lib/libc/riscv/gen/setjmp.S @@ -33,8 +33,6 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD$"); - #include <machine/setjmp.h> ENTRY(setjmp) @@ -161,6 +159,9 @@ ENTRY(longjmp) /* Load the return value */ mv a0, a1 + bnez a1, 1f + li a0, 1 +1: ret botch: diff --git a/lib/libc/riscv/gen/sigsetjmp.S b/lib/libc/riscv/gen/sigsetjmp.S index 6eca3c1cdd23..4f32d9fb4daf 100644 --- a/lib/libc/riscv/gen/sigsetjmp.S +++ b/lib/libc/riscv/gen/sigsetjmp.S @@ -33,8 +33,6 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD$"); - #include <machine/setjmp.h> ENTRY(sigsetjmp) diff --git a/lib/libc/riscv/softfloat/milieu.h b/lib/libc/riscv/softfloat/milieu.h index e97437bdc2d1..0b5fda35de30 100644 --- a/lib/libc/riscv/softfloat/milieu.h +++ b/lib/libc/riscv/softfloat/milieu.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* =============================================================================== diff --git a/lib/libc/riscv/softfloat/riscv-gcc.h b/lib/libc/riscv/softfloat/riscv-gcc.h index 3fe1767e63cc..945536012289 100644 --- a/lib/libc/riscv/softfloat/riscv-gcc.h +++ b/lib/libc/riscv/softfloat/riscv-gcc.h @@ -1,5 +1,4 @@ /* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */ -/* $FreeBSD$ */ /* ------------------------------------------------------------------------------- diff --git a/lib/libc/riscv/softfloat/softfloat.h b/lib/libc/riscv/softfloat/softfloat.h index 6aef49975a38..d202a1f7f420 100644 --- a/lib/libc/riscv/softfloat/softfloat.h +++ b/lib/libc/riscv/softfloat/softfloat.h @@ -1,5 +1,4 @@ /* $NetBSD: softfloat.h,v 1.6 2002/05/12 13:12:46 bjh21 Exp $ */ -/* $FreeBSD$ */ /* This is a derivative work. */ diff --git a/lib/libc/riscv/static_tls.h b/lib/libc/riscv/static_tls.h deleted file mode 100644 index dcdc459b8c19..000000000000 --- a/lib/libc/riscv/static_tls.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2019 The FreeBSD Foundation - * - * This software was developed by Konstantin Belousov <kib@FreeBSD.org> - * under sponsorship from the FreeBSD Foundation. - * - * 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. - * - * $FreeBSD$ - */ - -#ifndef _LIBC_RISCV_STATIC_TLS_H -#define _LIBC_RISCV_STATIC_TLS_H - -static __inline uintptr_t -_libc_get_static_tls_base(size_t offset) -{ - uintptr_t tlsbase; - - __asm __volatile("mv %0, tp" : "=r"(tlsbase)); - tlsbase += offset; - return (tlsbase); -} - -#endif diff --git a/lib/libc/riscv/sys/Makefile.inc b/lib/libc/riscv/sys/Makefile.inc deleted file mode 100644 index 2eb12bf11cad..000000000000 --- a/lib/libc/riscv/sys/Makefile.inc +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -SRCS+= __vdso_gettc.c \ - sched_getcpu_gen.c - -MDASM= cerror.S \ - syscall.S \ - vfork.S - -# Don't generate default code for these syscalls: -NOASM+= sbrk.o vfork.o diff --git a/lib/libc/riscv/sys/__vdso_gettc.c b/lib/libc/riscv/sys/__vdso_gettc.c deleted file mode 100644 index 20e69a791bb5..000000000000 --- a/lib/libc/riscv/sys/__vdso_gettc.c +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * Copyright (c) 2021 Jessica Clarke - * - * 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/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <sys/types.h> -#include <sys/elf.h> -#include <sys/time.h> -#include <sys/vdso.h> - -#include <machine/riscvreg.h> - -#include <errno.h> - -#include "libc_private.h" - -#pragma weak __vdso_gettc -int -__vdso_gettc(const struct vdso_timehands *th, u_int *tc) -{ - if (th->th_algo != VDSO_TH_ALGO_RISCV_RDTIME) - return (ENOSYS); - - *tc = csr_read(time); - return (0); -} - -#pragma weak __vdso_gettimekeep -int -__vdso_gettimekeep(struct vdso_timekeep **tk) -{ - return (_elf_aux_info(AT_TIMEKEEP, tk, sizeof(*tk))); -} diff --git a/lib/libc/riscv/sys/cerror.S b/lib/libc/riscv/sys/cerror.S deleted file mode 100644 index 117080e0b3d9..000000000000 --- a/lib/libc/riscv/sys/cerror.S +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> - * All rights reserved. - * - * Portions of this software were developed by SRI International and the - * University of Cambridge Computer Laboratory under DARPA/AFRL contract - * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Portions of this software were developed by the University of Cambridge - * Computer Laboratory as part of the CTSRD Project, with support from the - * UK Higher Education Innovation Fund (HEIF). - * - * 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 <machine/asm.h> -__FBSDID("$FreeBSD$"); - -ENTRY(cerror) - addi sp, sp, -16 - sd a0, 0(sp) - sd ra, 8(sp) - call _C_LABEL(__error) - ld a1, 0(sp) - ld ra, 8(sp) - sw a1, 0(a0) - li a0, -1 - li a1, -1 - addi sp, sp, 16 - ret -END(cerror) diff --git a/lib/libc/riscv/sys/syscall.S b/lib/libc/riscv/sys/syscall.S deleted file mode 100644 index 8a007f8c7f17..000000000000 --- a/lib/libc/riscv/sys/syscall.S +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> - * All rights reserved. - * - * Portions of this software were developed by SRI International and the - * University of Cambridge Computer Laboratory under DARPA/AFRL contract - * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Portions of this software were developed by the University of Cambridge - * Computer Laboratory as part of the CTSRD Project, with support from the - * UK Higher Education Innovation Fund (HEIF). - * - * 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 <machine/asm.h> -__FBSDID("$FreeBSD$"); - -#include "SYS.h" - -RSYSCALL(syscall) diff --git a/lib/libc/riscv/sys/vfork.S b/lib/libc/riscv/sys/vfork.S deleted file mode 100644 index e7a0b82dc21f..000000000000 --- a/lib/libc/riscv/sys/vfork.S +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> - * All rights reserved. - * - * Portions of this software were developed by SRI International and the - * University of Cambridge Computer Laboratory under DARPA/AFRL contract - * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Portions of this software were developed by the University of Cambridge - * Computer Laboratory as part of the CTSRD Project, with support from the - * UK Higher Education Innovation Fund (HEIF). - * - * 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 <machine/asm.h> -__FBSDID("$FreeBSD$"); -#include "SYS.h" - -ENTRY(__sys_vfork) - WEAK_REFERENCE(__sys_vfork, vfork) - WEAK_REFERENCE(__sys_vfork, _vfork) - mv a2, ra - - _SYSCALL(vfork) - bnez t0, 1f - addi a1, a1, -1 - and a0, a0, a1 - mv ra, a2 - - ret -1: la t1, cerror - jr t1 -END(__sys_vfork) |