HardenedBSD/src d693230 — lib/csu/sparc64 crt1.c crti.S, lib/libthr/arch/sparc64 Makefile.inc
Remove libthr, csu, libthread_db and testfloat sparc64 specific directories. Submitted by: kib@ (libthr)
@@ -1,28 +0,0 @@ | |||
-# $FreeBSD$ | |||
- | |||
-.PATH: ${.CURDIR:H}/common | |||
- | |||
-SRCS= crt1.c crti.S crtn.S | |||
-OBJS= ${SRCS:N*.h:R:S/$/.o/g} | |||
-OBJS+= Scrt1.o gcrt1.o | |||
-CFLAGS+= -I${.CURDIR:H}/common \ | |||
- -I${SRCTOP}/lib/libc/include | |||
-CFLAGS+= -DCRT_IRELOC_SUPP | |||
- | |||
-FILES= ${OBJS} | |||
-FILESMODE= ${LIBMODE} | |||
-FILESOWN= ${LIBOWN} | |||
-FILESGRP= ${LIBGRP} | |||
-FILESDIR= ${LIBDIR} | |||
-# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. | |||
-.undef LIBRARIES_ONLY | |||
- | |||
-CLEANFILES= ${OBJS} | |||
- | |||
-gcrt1.o: crt1.c | |||
- ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} | |||
- | |||
-Scrt1.o: crt1.c | |||
- ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} | |||
- | |||
-.include <bsd.lib.mk> |
@@ -1,12 +0,0 @@ | |||
-# $FreeBSD$ | |||
-# Autogenerated - do NOT edit! | |||
- | |||
-DIRDEPS = \ | |||
- include \ | |||
- | |||
- | |||
-.include <dirdeps.mk> | |||
- | |||
-.if ${DEP_RELDIR} == ${_DEP_RELDIR} | |||
-# local dependencies - needed for -jN in clean tree | |||
-.endif |
@@ -1,33 +0,0 @@ | |||
-/*- | |||
- * SPDX-License-Identifier: BSD-1-Clause | |||
- * | |||
- * Copyright 2018 Andrew Turner | |||
- * | |||
- * 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. | |||
- * | |||
- * 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. | |||
- * | |||
- * $FreeBSD$ | |||
- */ | |||
- | |||
-#ifndef _CRT_H_ | |||
-#define _CRT_H_ | |||
- | |||
-#define HAVE_CTORS | |||
-#define CTORS_CONSTRUCTO | |||
-#define INIT_CALL_SEQ(func) "call " __STRING(func) "; nop" | |||
- | |||
-#endif |
@@ -1,105 +0,0 @@ | |||
-/* LINTLIBRARY */ | |||
-/*- | |||
- * SPDX-License-Identifier: BSD-3-Clause | |||
- * | |||
- * Copyright 2001 David E. O'Brien. | |||
- * All rights reserved. | |||
- * Copyright (c) 1995, 1998 Berkeley Software Design, Inc. | |||
- * All rights reserved. | |||
- * Copyright 1996-1998 John D. Polstra. | |||
- * 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. The name of the authors may not be used to endorse or promote products | |||
- * derived from this software without specific prior written permission | |||
- * | |||
- * 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/cdefs.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
-#include <stdlib.h> | |||
- | |||
-#include "libc_private.h" | |||
-#include "crtbrand.c" | |||
-#include "ignore_init.c" | |||
- | |||
-struct Struct_Obj_Entry | |||
-struct ps_strings; | |||
- | |||
-extern void __sparc_utrap_se | |||
- | |||
-#ifdef GCRT | |||
-extern void _mcleanup(void); | |||
-extern void monstartup(void *, void *); | |||
-extern int eprol; | |||
-extern int etext; | |||
-#endif | |||
- | |||
-void _start(char **, void (*)(void), struct Struct_Obj_Entry | |||
- struct ps_strings *); | |||
- | |||
-/* The entry function. */ | |||
-/* | |||
- * %o0 holds ps_strings pointer. | |||
- * | |||
- * Note: kernel may (is not set in stone yet) pass ELF aux vector in %o1, | |||
- * but for now we do not use it here. | |||
- * | |||
- * The SPARC compliance definitions specifies that the kernel pass the | |||
- * address of a function to be executed on exit in %g1. We do not make | |||
- * use of it as it is quite broken, because gcc can use this register | |||
- * as a temporary, so it is not safe from C code. Its even more broken | |||
- * for dynamic executables since rtld runs first. | |||
- */ | |||
-/* ARGSUSED */ | |||
-void | |||
-_start(char **ap, void (*cleanup)(void), struct Struct_Obj_Entry | |||
- struct ps_strings *ps_strings __unused) | |||
-{ | |||
- int argc; | |||
- char **argv; | |||
- char **env; | |||
- | |||
- argc = *(long *)(void *)ap; | |||
- argv = ap + 1; | |||
- env = ap + 2 + argc; | |||
- handle_argv(argc, argv, env); | |||
- | |||
- if (&_DYNAMIC != NULL) | |||
- atexit(cleanup); | |||
- else { | |||
- __sparc_utrap_se | |||
- _init_tls(); | |||
- } | |||
-#ifdef GCRT | |||
- atexit(_mcleanup); | |||
- monstartup(&eprol, &etext); | |||
-#endif | |||
- | |||
- handle_static_in | |||
- exit(main(argc, argv, env)); | |||
-} | |||
- | |||
-#ifdef GCRT | |||
-__asm__(".text"); | |||
-__asm__("eprol:"); | |||
-__asm__(".previous"); | |||
-#endif |
@@ -1,57 +0,0 @@ | |||
-/*- | |||
- * Copyright 2001 David E. O'Brien | |||
- * 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 author nor the names of additional contributors | |||
- * may be used to endorse or promote products derived from this software | |||
- * without specific prior written permission. | |||
- * | |||
- * 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 <machine/asm.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
- .file "crti.S" | |||
- | |||
- /* The minimum stack frame size (bytes) is: | |||
- * 16 extended words for saving the current register window, | |||
- * 1 extended word for "hidden parameter", | |||
- * 6 extended words in wihch a callee can store its arguments | |||
- * ("The SPARC Architecure Manual" by Weaver & Germond) | |||
- * This gives 184 bytes. However we must round up to an extended | |||
- * word boundary, thus 192 bytes. | |||
- * (if we weren't v9, it would be 96 bytes rather than 192) | |||
- */ | |||
- | |||
- .section .init,"ax",@progbits | |||
- .align 4 | |||
- .globl _init | |||
- .type _init,#function | |||
-_init: | |||
- save %sp,-192,%sp | |||
- | |||
- | |||
- .section .fini,"ax",@progbits | |||
- .globl _fini | |||
- .type _fini,#function | |||
- .align 4 | |||
-_fini: | |||
- save %sp,-192,%sp |
@@ -1,42 +0,0 @@ | |||
-/*- | |||
- * Copyright 2001 David E. O'Brien | |||
- * 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 author nor the names of additional contributors | |||
- * may be used to endorse or promote products derived from this software | |||
- * without specific prior written permission. | |||
- * | |||
- * 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 <machine/asm.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
- .file "crtn.S" | |||
- | |||
- .section .init,"ax",@progbits | |||
- .align 4 | |||
- ret | |||
- restore | |||
- | |||
- .section .fini,"ax",@progbits | |||
- .align 4 | |||
- ret | |||
- restore |
@@ -1,3 +0,0 @@ | |||
-# $FreeBSD$ | |||
- | |||
-SRCS+= _umtx_op_err.S |
@@ -1,80 +0,0 @@ | |||
-/*- | |||
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |||
- * | |||
- * Copyright (c) 2003 Jake Burkholder <jake@freebsd.org>. | |||
- * Copyright (c) 2003 Marcel Moolenaar | |||
- * 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 ``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. | |||
- * | |||
- * $FreeBSD$ | |||
- */ | |||
- | |||
-/* | |||
- * Machine-dependent thread prototypes/definitions. | |||
- */ | |||
-#ifndef _PTHREAD_MD_H_ | |||
-#define _PTHREAD_MD_H_ | |||
- | |||
-#include <stddef.h> | |||
- | |||
-#define CPU_SPINWAIT | |||
- | |||
-#define DTV_OFFSET offsetof(struct tcb, tcb_dtv) | |||
- | |||
-/* | |||
- * Variant II tcb, first two members are required by rtld. | |||
- * %g7 points to the structure. | |||
- */ | |||
-struct tcb { | |||
- struct tcb *tcb_self; /* required by rtld */ | |||
- void *tcb_dtv; /* required by rtld */ | |||
- struct pthread *tcb_thread; /* our hook */ | |||
- void *tcb_spare[1]; | |||
-}; | |||
- | |||
-/* Called from the thread to set its private data. */ | |||
-static __inline void | |||
-_tcb_set(struct tcb *tcb) | |||
-{ | |||
- | |||
- __asm __volatile("mov %0, %%g7" : : "r" (tcb)); | |||
-} | |||
- | |||
-static __inline struct tcb * | |||
-_tcb_get(void) | |||
-{ | |||
- register struct tcb *tp __asm("%g7"); | |||
- | |||
- return (tp); | |||
-} | |||
- | |||
-static __inline struct pthread * | |||
-_get_curthread(void) | |||
-{ | |||
- | |||
- return (_tcb_get()->tcb_thread); | |||
-} | |||
- | |||
-#define HAS__UMTX_OP_ERR | |||
- | |||
-#endif /* _PTHREAD_MD_H_ */ |
@@ -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 _ARCH_SPARC64_PT | |||
-#define _ARCH_SPARC64_PT | |||
- | |||
-static __inline uintptr_t | |||
-_get_static_tls_ | |||
-{ | |||
- uintptr_t tlsbase; | |||
- | |||
- tlsbase = (uintptr_t)thr->tcb; | |||
- tlsbase -= offset; | |||
- return (tlsbase); | |||
-} | |||
- | |||
-#endif |
@@ -1,38 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2011 Marius Strobl <marius@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 <machine/asm.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
-#include <sys/syscall.h> | |||
- | |||
-#include <machine/utrap.h> | |||
- | |||
-ENTRY(_umtx_op_err) | |||
- mov SYS__umtx_op, %g1 | |||
- retl | |||
- ta %xcc, ST_SYSCALL | |||
-END(_umtx_op_err) |
@@ -1,92 +0,0 @@ | |||
-/*- | |||
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |||
- * | |||
- * Copyright (c) 2004 Marcel Moolenaar | |||
- * Copyright (c) 2011 Marius Strobl <marius@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 ``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/cdefs.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
-#include <sys/types.h> | |||
-#include <string.h> | |||
-#include <thread_db.h> | |||
-#include <ucontext.h> | |||
-#include <machine/fsr.h> | |||
- | |||
-#include "libpthread_db.h" | |||
- | |||
-void | |||
-pt_reg_to_uconte | |||
-{ | |||
- | |||
- memcpy(&uc->uc_mcontext, r, MIN(sizeof(uc->uc_mcontext), sizeof(*r))); | |||
-} | |||
- | |||
-void | |||
-pt_ucontext_to_r | |||
-{ | |||
- | |||
- memcpy(r, &uc->uc_mcontext, MIN(sizeof(uc->uc_mcontext), sizeof(*r))); | |||
-} | |||
- | |||
-void | |||
-pt_fpreg_to_ucon | |||
-{ | |||
- mcontext_t *mc = &uc->uc_mcontext; | |||
- | |||
- memcpy(mc->mc_fp, r->fr_regs, MIN(sizeof(mc->mc_fp), | |||
- sizeof(r->fr_regs))); | |||
- mc->_mc_fsr = r->fr_fsr; | |||
- mc->_mc_gsr = r->fr_gsr; | |||
- mc->_mc_fprs |= FPRS_FEF; | |||
-} | |||
- | |||
-void | |||
-pt_ucontext_to_f | |||
-{ | |||
- const mcontext_t *mc = &uc->uc_mcontext; | |||
- | |||
- if ((mc->_mc_fprs & FPRS_FEF) != 0) { | |||
- memcpy(r->fr_regs, mc->mc_fp, MIN(sizeof(mc->mc_fp), | |||
- sizeof(r->fr_regs))); | |||
- r->fr_fsr = mc->_mc_fsr; | |||
- r->fr_gsr = mc->_mc_gsr; | |||
- } else | |||
- memset(r, 0, sizeof(*r)); | |||
-} | |||
- | |||
-void | |||
-pt_md_init(void) | |||
-{ | |||
- | |||
-} | |||
- | |||
-int | |||
-pt_reg_sstep(struct reg *reg __unused, int step __unused) | |||
-{ | |||
- | |||
- return (0); | |||
-} |
@@ -1,105 +0,0 @@ | |||
-# Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$ | |||
- | |||
-.PATH: ${.CURDIR}/../../../../lib/libc/softfloat/bits64 ${.CURDIR}/.. | |||
- | |||
-LIBC_DIR= ${.CURDIR}/../../../../lib/libc | |||
-EMUFLOAT_DIR= ${LIBC_DIR}/sparc64/fpu | |||
- | |||
-LN= ln -sf | |||
- | |||
-# Common source files | |||
-SRCS1= fail.c random.c softfloat.c testCases.c testLoops.c writeHex.c | |||
- | |||
-# Additional common sources to build testfloat/testemufloat | |||
-SRCS2= testFunction.c testfloat.c | |||
- | |||
-# Additional sources to build testemufloat | |||
-SRCS3= fpu.c fpu_add.c fpu_compare.c fpu_div.c fpu_emul.S fpu_explode.c \ | |||
- fpu_implode.c fpu_mul.c fpu_qp.c fpu_sqrt.c fpu_subr.c fpu_util.c | |||
- | |||
-# Additional sources to build testfloat | |||
-SRCS4= systflags.c systfloat.S systmodes.c | |||
- | |||
-# Additional sources to build testsoftfloat | |||
-SRCS5= slowfloat.c testsoftfloat.c | |||
- | |||
-SRCS= ${SRCS1} ${SRCS2} ${SRCS3} ${SRCS4} ${SRCS5} | |||
- | |||
-OBJ_TF= ${SRCS1:R:S/$/.o/g} ${SRCS2:R:S/$/.o/g} ${SRCS4:R:S/$/.o/g} | |||
-OBJ_TEF= ${SRCS1:R:S/$/.o/g} ${SRCS2:R:S/$/.o/g} ${SRCS3:R:S/$/.o/g} | |||
-OBJ_TSF= ${SRCS1:R:S/$/.o/g} ${SRCS5:R:S/$/.o/g} | |||
- | |||
-all: testfloat testemufloat testsoftfloat | |||
- | |||
-CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/.. -I${LIBC_DIR}/sparc64/fpu \ | |||
- -I${LIBC_DIR}/sparc64/sys -I${LIBC_DIR}/softfloat/bits64 \ | |||
- -I${LIBC_DIR}/softfloat | |||
- | |||
-CLEANFILES+= fpu.c fpu_add.c fpu_compare.c fpu_div.c fpu_emu.h \ | |||
- fpu_explode.c fpu_implode.c fpu_mul.c fpu_qp.c fpu_sqrt.c fpu_subr.c \ | |||
- ${SRCS:R:S/$/.o/g} testfloat testemufloat testsoftfloat | |||
- | |||
-testsoftfloat: ${OBJ_TSF} | |||
- ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJ_TSF} | |||
- | |||
-testfloat: ${OBJ_TF} | |||
- ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJ_TF} | |||
- | |||
-testemufloat: ${OBJ_TEF} | |||
- ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJ_TEF} | |||
- | |||
-beforedepend: fpu_emu.h | |||
- | |||
-# The emulator code needs to be built with a local fpu_reg.h instead of | |||
-# the one in ${EMUFLOAT_DIR}. Unfortunately, C preprocessor semantics | |||
-# means that a header file in the same directory as the source file | |||
-# overrides any alternative header file location. In order to include | |||
-# the wanted header file, create symlinks pointing to the real files | |||
-# and compile through the symlink. | |||
-fpu.c: ${EMUFLOAT_DIR}/fpu.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_add.c: ${EMUFLOAT_DIR}/fpu_add.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_compare.c: ${EMUFLOAT_DIR}/fpu_compare.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_div.c: ${EMUFLOAT_DIR}/fpu_div.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_emu.h: ${EMUFLOAT_DIR}/fpu_emu.h | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_explode.c: ${EMUFLOAT_DIR}/fpu_explode.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_implode.c: ${EMUFLOAT_DIR}/fpu_implode.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_mul.c: ${EMUFLOAT_DIR}/fpu_mul.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_qp.c: ${EMUFLOAT_DIR}/fpu_qp.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_sqrt.c: ${EMUFLOAT_DIR}/fpu_sqrt.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
-fpu_subr.c: ${EMUFLOAT_DIR}/fpu_subr.c | |||
- ${LN} ${.ALLSRC} ${.TARGET} | |||
- | |||
-.include <bsd.prog.mk> |
@@ -1,186 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$"); | |||
- | |||
- .section "rodata1",#alloc | |||
- .align 8 | |||
- | |||
- .global insn_int32_to_fl | |||
-insn_int32_to_fl | |||
- fitos %f0,%f0 | |||
- | |||
- .global insn_int32_to_fl | |||
-insn_int32_to_fl | |||
- fitod %f0,%f0 | |||
- | |||
- .global insn_int32_to_fl | |||
-insn_int32_to_fl | |||
- fitoq %f0,%f0 | |||
- | |||
- .global insn_int64_to_fl | |||
-insn_int64_to_fl | |||
- fxtos %f0,%f0 | |||
- | |||
- .global insn_int64_to_fl | |||
-insn_int64_to_fl | |||
- fxtod %f0,%f0 | |||
- | |||
- .global insn_int64_to_fl | |||
-insn_int64_to_fl | |||
- fxtoq %f0,%f0 | |||
- | |||
- .global insn_float32_to_ | |||
-insn_float32_to_ | |||
- fstoi %f0,%f0 | |||
- | |||
- .global insn_float32_to_ | |||
-insn_float32_to_ | |||
- fstox %f0,%f0 | |||
- | |||
- .global insn_float32_to_ | |||
-insn_float32_to_ | |||
- fstod %f0,%f0 | |||
- | |||
- .global insn_float32_to_ | |||
-insn_float32_to_ | |||
- fstoq %f0,%f0 | |||
- | |||
- .global insn_float32_add | |||
-insn_float32_add | |||
- fadds %f0,%f1,%f0 | |||
- | |||
- .global insn_float32_sub | |||
-insn_float32_sub | |||
- fsubs %f0,%f1,%f0 | |||
- | |||
- .global insn_float32_mul | |||
-insn_float32_mul | |||
- fmuls %f0,%f1,%f0 | |||
- | |||
- .global insn_float32_div | |||
-insn_float32_div | |||
- fdivs %f0,%f1,%f0 | |||
- | |||
- .global insn_float32_sqr | |||
-insn_float32_sqr | |||
- fsqrts %f0,%f0 | |||
- | |||
- .global insn_float32_cmp | |||
-insn_float32_cmp | |||
- fcmps %fcc0,%f0,%f1 | |||
- | |||
- .global insn_float32_cmp | |||
-insn_float32_cmp | |||
- fcmpes %fcc0,%f0,%f1 | |||
- | |||
- .global insn_float64_to_ | |||
-insn_float64_to_ | |||
- fdtoi %f0,%f0 | |||
- | |||
- .global insn_float64_to_ | |||
-insn_float64_to_ | |||
- fdtox %f0,%f0 | |||
- | |||
- .global insn_float64_to_ | |||
-insn_float64_to_ | |||
- fdtos %f0,%f0 | |||
- | |||
- .global insn_float64_to_ | |||
-insn_float64_to_ | |||
- fdtoq %f0,%f0 | |||
- | |||
- .global insn_float64_add | |||
-insn_float64_add | |||
- faddd %f0,%f2,%f0 | |||
- | |||
- .global insn_float64_sub | |||
-insn_float64_sub | |||
- fsubd %f0,%f2,%f0 | |||
- | |||
- .global insn_float64_mul | |||
-insn_float64_mul | |||
- fmuld %f0,%f2,%f0 | |||
- | |||
- .global insn_float64_div | |||
-insn_float64_div | |||
- fdivd %f0,%f2,%f0 | |||
- | |||
- .global insn_float64_sqr | |||
-insn_float64_sqr | |||
- fsqrtd %f0,%f0 | |||
- | |||
- .global insn_float64_cmp | |||
-insn_float64_cmp | |||
- fcmpd %fcc0,%f0,%f2 | |||
- | |||
- .global insn_float64_cmp | |||
-insn_float64_cmp | |||
- fcmped %fcc0,%f0,%f2 | |||
- | |||
- .global insn_float128_to | |||
-insn_float128_to | |||
- fqtoi %f0,%f0 | |||
- | |||
- .global insn_float128_to | |||
-insn_float128_to | |||
- fqtox %f0,%f0 | |||
- | |||
- .global insn_float128_to | |||
-insn_float128_to | |||
- fqtos %f0,%f0 | |||
- | |||
- .global insn_float128_to | |||
-insn_float128_to | |||
- fqtod %f0,%f0 | |||
- | |||
- .global insn_float128_ad | |||
-insn_float128_ad | |||
- faddq %f0,%f4,%f0 | |||
- | |||
- .global insn_float128_su | |||
-insn_float128_su | |||
- fsubq %f0,%f4,%f0 | |||
- | |||
- .global insn_float128_mu | |||
-insn_float128_mu | |||
- fmulq %f0,%f4,%f0 | |||
- | |||
- .global insn_float128_di | |||
-insn_float128_di | |||
- fdivq %f0,%f4,%f0 | |||
- | |||
- .global insn_float128_sq | |||
-insn_float128_sq | |||
- fsqrtq %f0,%f0 | |||
- | |||
- .global insn_float128_cm | |||
-insn_float128_cm | |||
- fcmpq %fcc0,%f0,%f4 | |||
- | |||
- .global insn_float128_cm | |||
-insn_float128_cm | |||
- fcmpeq %fcc0,%f0,%f4 |
@@ -1,63 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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 _TESTFLOAT_SPARC | |||
-#define _TESTFLOAT_SPARC | |||
- | |||
-#include <sys/types.h> | |||
-extern u_int32_t __fpreg[64]; | |||
- | |||
-static __inline u_int32_t | |||
-__fpu_getreg(int r) | |||
-{ | |||
- | |||
- return (__fpreg[r]); | |||
-} | |||
- | |||
-static __inline u_int64_t | |||
-__fpu_getreg64(int r) | |||
-{ | |||
- | |||
- return ((u_int64_t)__fpreg[r] << 32 | (u_int64_t)__fpreg[r + 1]); | |||
-} | |||
- | |||
-static __inline void | |||
-__fpu_setreg(int r, u_int32_t v) | |||
-{ | |||
- | |||
- __fpreg[r] = v; | |||
-} | |||
- | |||
-static __inline void | |||
-__fpu_setreg64(int r, u_int64_t v) | |||
-{ | |||
- | |||
- __fpreg[r] = (u_int32_t)(v >> 32); | |||
- __fpreg[r + 1] = (u_int32_t)v; | |||
-} | |||
- | |||
-#endif /* _TESTFLOAT_SPARC |
@@ -1,706 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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/param.h> | |||
- | |||
-#include <math.h> | |||
-#include <stdio.h> | |||
-#include <stdlib.h> | |||
- | |||
-#include "__sparc_utrap_pr | |||
-#include "fpu_extern.h" | |||
-#include "fpu_reg.h" | |||
- | |||
-static u_long ireg[32]; | |||
- | |||
-void | |||
-__utrap_panic(const char *msg) | |||
-{ | |||
- | |||
- fprintf(stderr, "panic: %s\n", msg); | |||
- exit(1); | |||
-} | |||
- | |||
-void __utrap_write(const char *msg) | |||
-{ | |||
- | |||
- fprintf(stderr, "%s", msg); | |||
-} | |||
- | |||
-u_long | |||
-__emul_fetch_reg | |||
-{ | |||
- | |||
- return (ireg[reg]); | |||
-} | |||
- | |||
-typedef unsigned char int8; | |||
-typedef unsigned int int32; | |||
-typedef unsigned long int64; | |||
-typedef unsigned int float32; | |||
-typedef unsigned long float64; | |||
-typedef struct { | |||
- unsigned long high, low; | |||
-} float128; | |||
-typedef unsigned long flag; | |||
- | |||
-struct utrapframe utf; | |||
- | |||
-u_int32_t __fpreg[64]; | |||
- | |||
-static __inline float128 | |||
-__fpu_getreg128(int r) | |||
-{ | |||
- float128 v; | |||
- | |||
- v.high = ((u_int64_t)__fpreg[r] << 32 | (u_int64_t)__fpreg[r + 1]); | |||
- v.low = ((u_int64_t)__fpreg[r + 2] << 32 | (u_int64_t)__fpreg[r + 3]); | |||
- return (v); | |||
-} | |||
- | |||
-static __inline void | |||
-__fpu_setreg128(int r, float128 v) | |||
-{ | |||
- | |||
- __fpreg[r] = (u_int32_t)(v.high >> 32); | |||
- __fpreg[r + 1] = (u_int32_t)v.high; | |||
- __fpreg[r + 2] = (u_int32_t)(v.low >> 32); | |||
- __fpreg[r + 3] = (u_int32_t)v.low; | |||
-} | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Clears the system's IEC/IEEE floating-point exception flags. Returns the | |||
-previous value of the flags. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-#include <fenv.h> | |||
-#include <ieeefp.h> | |||
- | |||
-int8 syst_float_flags | |||
-{ | |||
- int32 flags; | |||
- | |||
- flags = (utf.uf_fsr & FE_ALL_EXCEPT) >> 5; | |||
- utf.uf_fsr &= ~(u_long)FE_ALL_EXCEPT; | |||
- return (flags); | |||
-} | |||
- | |||
-static void | |||
-emul_trap(const u_int *insn, u_long mask) | |||
-{ | |||
- u_int32_t savreg[64]; | |||
- int i; | |||
- | |||
- for (i = 0; i < 64; i++) | |||
- savreg[i] = __fpreg[i]; | |||
- | |||
- utf.uf_fsr = (utf.uf_fsr & ~FSR_FTT_MASK) | | |||
- (FSR_FTT_UNFIN << FSR_FTT_SHIFT); | |||
- utf.uf_pc = (u_long)insn; | |||
- if (__fpu_exception(&utf) == 0) | |||
- __asm("stx %%fsr,%0" : "=m" (utf.uf_fsr)); | |||
- | |||
- for (i = 0; i < 64; i++) { | |||
- if (!(mask & (1UL << i)) && savreg[i] != __fpreg[i]) { | |||
- fprintf(stderr, "### %2d %08x != %08x\n", | |||
- i, savreg[i], __fpreg[i]); | |||
- } | |||
- } | |||
-} | |||
- | |||
-extern u_int insn_int32_to_fl | |||
-extern u_int insn_int32_to_fl | |||
-extern u_int insn_int32_to_fl | |||
-extern u_int insn_int64_to_fl | |||
-extern u_int insn_int64_to_fl | |||
-extern u_int insn_int64_to_fl | |||
-extern u_int insn_float32_to_ | |||
-extern u_int insn_float32_to_ | |||
-extern u_int insn_float32_to_ | |||
-extern u_int insn_float32_to_ | |||
-extern u_int insn_float32_add | |||
-extern u_int insn_float32_sub | |||
-extern u_int insn_float32_mul | |||
-extern u_int insn_float32_div | |||
-extern u_int insn_float32_sqr | |||
-extern u_int insn_float32_cmp | |||
-extern u_int insn_float32_cmp | |||
-extern u_int insn_float64_to_ | |||
-extern u_int insn_float64_to_ | |||
-extern u_int insn_float64_to_ | |||
-extern u_int insn_float64_to_ | |||
-extern u_int insn_float64_add | |||
-extern u_int insn_float64_sub | |||
-extern u_int insn_float64_mul | |||
-extern u_int insn_float64_div | |||
-extern u_int insn_float64_sqr | |||
-extern u_int insn_float64_cmp | |||
-extern u_int insn_float64_cmp | |||
-extern u_int insn_float128_to | |||
-extern u_int insn_float128_to | |||
-extern u_int insn_float128_to | |||
-extern u_int insn_float128_to | |||
-extern u_int insn_float128_ad | |||
-extern u_int insn_float128_su | |||
-extern u_int insn_float128_mu | |||
-extern u_int insn_float128_di | |||
-extern u_int insn_float128_sq | |||
-extern u_int insn_float128_cm | |||
-extern u_int insn_float128_cm | |||
- | |||
-float32 | |||
-syst_int32_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_int32_to_fl | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_int32_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_int32_to_fl | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_int32_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_int32_to_fl | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_int64_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_int64_to_fl | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_int64_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_int64_to_fl | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
- | |||
-float128 | |||
-syst_int64_to_fl | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_int64_to_fl | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-int32 | |||
-syst_float32_to_ | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_float32_to_ | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-int64 | |||
-syst_float32_to_ | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_float32_to_ | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float32_to_ | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_float32_to_ | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float32_to_ | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_float32_to_ | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float32_add | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_add | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float32_sub | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_sub | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float32_mul | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_mul | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float32_div | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_div | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float32_sqr | |||
-{ | |||
- | |||
- __fpu_setreg(0, a); | |||
- emul_trap(&insn_float32_sqr | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-flag syst_float32_eq(float32 a, float32 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float32_le(float32 a, float32 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float32_lt(float32 a, float32 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float32_eq_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float32_le_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float32_lt_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg(0, a); | |||
- __fpu_setreg(1, b); | |||
- emul_trap(&insn_float32_cmp | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-int32 | |||
-syst_float64_to_ | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_float64_to_ | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-int64 | |||
-syst_float64_to_ | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_float64_to_ | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float64_to_ | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_float64_to_ | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float64_to_ | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_float64_to_ | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float64_add | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_add | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float64_sub | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_sub | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float64_mul | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_mul | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float64_div | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_div | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float64_sqr | |||
-{ | |||
- | |||
- __fpu_setreg64(0, a); | |||
- emul_trap(&insn_float64_sqr | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-flag syst_float64_eq(float64 a, float64 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float64_le(float64 a, float64 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float64_lt(float64 a, float64 b) | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float64_eq_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float64_le_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float64_lt_ | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg64(0, a); | |||
- __fpu_setreg64(2, b); | |||
- emul_trap(&insn_float64_cmp | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-int32 | |||
-syst_float128_to | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- emul_trap(&insn_float128_to | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-int64 | |||
-syst_float128_to | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- emul_trap(&insn_float128_to | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float32 | |||
-syst_float128_to | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- emul_trap(&insn_float128_to | |||
- return (__fpu_getreg(0)); | |||
-} | |||
- | |||
-float64 | |||
-syst_float128_to | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- emul_trap(&insn_float128_to | |||
- return (__fpu_getreg64(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float128_ad | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_ad | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float128_su | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_su | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float128_mu | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_mu | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float128_di | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_di | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-float128 | |||
-syst_float128_sq | |||
-{ | |||
- | |||
- __fpu_setreg128(0, a); | |||
- emul_trap(&insn_float128_sq | |||
- return (__fpu_getreg128(0)); | |||
-} | |||
- | |||
-flag syst_float128_eq | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float128_le | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float128_lt | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float128_eq | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; move %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float128_le | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; movle %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
-flag syst_float128_lt | |||
-{ | |||
- u_long r; | |||
- | |||
- __fpu_setreg128(0, a); | |||
- __fpu_setreg128(4, b); | |||
- emul_trap(&insn_float128_cm | |||
- __asm __volatile("mov 0,%0; movl %%fcc0,1,%0" : "=r" (r)); | |||
- return (r); | |||
-} | |||
- | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Sets the system's IEC/IEEE floating-point rounding mode. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-void syst_float_set_r | |||
-{ | |||
- | |||
- utf.uf_fsr &= ~FSR_RD_MASK; | |||
- utf.uf_fsr |= FSR_RD((unsigned int)roundingMode & 0x03); | |||
-} | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Does nothing. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-void syst_float_set_r | |||
-{ | |||
- | |||
-} |
@@ -1,30 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$ | |||
- */ | |||
-/* | |||
- * This file has no content and is solely to satisfy a #include in | |||
- * the FP emulator code. | |||
- */ |
@@ -1,56 +0,0 @@ | |||
-#ifndef TESTFLOAT_SPARC6 | |||
-#define TESTFLOAT_SPARC6 | |||
- | |||
-/* | |||
-=============================================================================== | |||
- | |||
-This C header file is part of TestFloat, Release 2a, a package of programs | |||
-for testing the correctness of floating-point arithmetic complying to the | |||
-IEC/IEEE Standard for Floating-Point. | |||
- | |||
-Written by John R. Hauser. More information is available through the Web | |||
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort | |||
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT | |||
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO | |||
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY | |||
-AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) they include prominent notice that the work is derivative, and (2) they | |||
-include prominent notice akin to these four paragraphs for those parts of | |||
-this code that are retained. | |||
- | |||
-=============================================================================== | |||
-*/ | |||
- | |||
-/* $FreeBSD$ */ | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Include common integer types and flags. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-#include "sparc64.h" | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-If the `BITS64' macro is defined by the processor header file but the | |||
-version of SoftFloat being used/tested is the 32-bit one (`bits32'), the | |||
-`BITS64' macro must be undefined here. | |||
-------------------------------------------------------------------------------- | |||
-#undef BITS64 | |||
-*/ | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Symbolic Boolean literals. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-enum { | |||
- FALSE = 0, | |||
- TRUE = 1 | |||
-}; | |||
- | |||
-#endif |
@@ -1,30 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$ | |||
- */ | |||
-/* | |||
- * This file has no content and is solely to satisfy a #include in | |||
- * the FP emulator code. | |||
- */ |
@@ -1,267 +0,0 @@ | |||
-#ifndef TESTFLOAT_SPARC6 | |||
-#define TESTFLOAT_SPARC6 | |||
- | |||
-/*============================================================================ | |||
- | |||
-This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic | |||
-Package, Release 2b. | |||
- | |||
-Written by John R. Hauser. This work was made possible in part by the | |||
-International Computer Science Institute, located at Suite 600, 1947 Center | |||
-Street, Berkeley, California 94704. Funding was partially provided by the | |||
-National Science Foundation under grant MIP-9311980. The original version | |||
-of this code was written as part of a project to build a fixed-point vector | |||
-processor in collaboration with the University of California at Berkeley, | |||
-overseen by Profs. Nelson Morgan and John Wawrzynek. More information | |||
-is available through the Web page `http://www.cs.berkeley.edu/~jhauser/ | |||
-arithmetic/SoftFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has | |||
-been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES | |||
-RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS | |||
-AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES, | |||
-COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE | |||
-EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE | |||
-INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR | |||
-OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) the source code for the derivative work includes prominent notice that | |||
-the work is derivative, and (2) the source code includes prominent notice with | |||
-these four paragraphs for those parts of this code that are retained. | |||
- | |||
-=============================================================================*/ | |||
- | |||
-/* $FreeBSD$ */ | |||
- | |||
-#include <machine/ieeefp.h> | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| The macro `FLOATX80' must be defined to enable the extended double-precision | |||
-| floating-point format `floatx80'. If this macro is not defined, the | |||
-| `floatx80' type will not be defined, and none of the functions that either | |||
-| input or output the `floatx80' type will be defined. The same applies to | |||
-| the `FLOAT128' macro and the quadruple-precision format `float128'. | |||
-*----------------------------------------------------------------------------*/ | |||
-#define FLOATX80 | |||
-#define FLOAT128 | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE floating-point types. | |||
-*----------------------------------------------------------------------------*/ | |||
-typedef unsigned int float32; | |||
-typedef unsigned long float64; | |||
-#ifdef FLOATX80 | |||
-typedef struct { | |||
- unsigned short high; | |||
- unsigned long low; | |||
-} floatx80; | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-typedef struct { | |||
- unsigned long high, low; | |||
-} float128; | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE floating-point underflow tininess-detection mode. | |||
-*----------------------------------------------------------------------------*/ | |||
-extern int float_detect_tin | |||
-enum { | |||
- float_tininess_a | |||
- float_tininess_b | |||
-}; | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE floating-point rounding mode. | |||
-*----------------------------------------------------------------------------*/ | |||
-extern fp_rnd_t float_rounding_m | |||
-enum { | |||
- float_round_near | |||
- float_round_to_z | |||
- float_round_up = 2, | |||
- float_round_down | |||
-}; | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE floating-point exception flags. | |||
-*----------------------------------------------------------------------------*/ | |||
-typedef int fp_except; | |||
-extern fp_except float_exception_ | |||
-enum { | |||
- float_flag_inexa | |||
- float_flag_divby | |||
- float_flag_under | |||
- float_flag_overf | |||
- float_flag_inval | |||
-}; | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Routine to raise any or all of the software IEC/IEEE floating-point | |||
-| exception flags. | |||
-*----------------------------------------------------------------------------*/ | |||
-void float_raise( int ); | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE integer-to-floating-point conversion routines. | |||
-*----------------------------------------------------------------------------*/ | |||
-float32 int32_to_float32 | |||
-float64 int32_to_float64 | |||
-#ifdef FLOATX80 | |||
-floatx80 int32_to_floatx8 | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 int32_to_float12 | |||
-#endif | |||
-float32 int64_to_float32 | |||
-float64 int64_to_float64 | |||
-#ifdef FLOATX80 | |||
-floatx80 int64_to_floatx8 | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 int64_to_float12 | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE single-precision conversion routines. | |||
-*----------------------------------------------------------------------------*/ | |||
-int float32_to_int32 | |||
-int float32_to_int32 | |||
-long float32_to_int64 | |||
-long float32_to_int64 | |||
-float64 float32_to_float | |||
-#ifdef FLOATX80 | |||
-floatx80 float32_to_float | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 float32_to_float | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE single-precision operations. | |||
-*----------------------------------------------------------------------------*/ | |||
-float32 float32_round_to | |||
-float32 float32_add( float32, float32 ); | |||
-float32 float32_sub( float32, float32 ); | |||
-float32 float32_mul( float32, float32 ); | |||
-float32 float32_div( float32, float32 ); | |||
-float32 float32_rem( float32, float32 ); | |||
-float32 float32_sqrt( float32 ); | |||
-int float32_eq( float32, float32 ); | |||
-int float32_le( float32, float32 ); | |||
-int float32_lt( float32, float32 ); | |||
-int float32_eq_signa | |||
-int float32_le_quiet | |||
-int float32_lt_quiet | |||
-int float32_is_signa | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE double-precision conversion routines. | |||
-*----------------------------------------------------------------------------*/ | |||
-int float64_to_int32 | |||
-int float64_to_int32 | |||
-long float64_to_int64 | |||
-long float64_to_int64 | |||
-float32 float64_to_float | |||
-#ifdef FLOATX80 | |||
-floatx80 float64_to_float | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 float64_to_float | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE double-precision operations. | |||
-*----------------------------------------------------------------------------*/ | |||
-float64 float64_round_to | |||
-float64 float64_add( float64, float64 ); | |||
-float64 float64_sub( float64, float64 ); | |||
-float64 float64_mul( float64, float64 ); | |||
-float64 float64_div( float64, float64 ); | |||
-float64 float64_rem( float64, float64 ); | |||
-float64 float64_sqrt( float64 ); | |||
-int float64_eq( float64, float64 ); | |||
-int float64_le( float64, float64 ); | |||
-int float64_lt( float64, float64 ); | |||
-int float64_eq_signa | |||
-int float64_le_quiet | |||
-int float64_lt_quiet | |||
-int float64_is_signa | |||
- | |||
-#ifdef FLOATX80 | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE extended double-precision conversion routines. | |||
-*----------------------------------------------------------------------------*/ | |||
-int floatx80_to_int3 | |||
-int floatx80_to_int3 | |||
-long floatx80_to_int6 | |||
-long floatx80_to_int6 | |||
-float32 floatx80_to_floa | |||
-float64 floatx80_to_floa | |||
-#ifdef FLOAT128 | |||
-float128 floatx80_to_floa | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE extended double-precision rounding precision. Valid | |||
-| values are 32, 64, and 80. | |||
-*----------------------------------------------------------------------------*/ | |||
-extern int floatx80_roundin | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE extended double-precision operations. | |||
-*----------------------------------------------------------------------------*/ | |||
-floatx80 floatx80_round_t | |||
-floatx80 floatx80_add( floatx80, floatx80 ); | |||
-floatx80 floatx80_sub( floatx80, floatx80 ); | |||
-floatx80 floatx80_mul( floatx80, floatx80 ); | |||
-floatx80 floatx80_div( floatx80, floatx80 ); | |||
-floatx80 floatx80_rem( floatx80, floatx80 ); | |||
-floatx80 floatx80_sqrt( floatx80 ); | |||
-int floatx80_eq( floatx80, floatx80 ); | |||
-int floatx80_le( floatx80, floatx80 ); | |||
-int floatx80_lt( floatx80, floatx80 ); | |||
-int floatx80_eq_sign | |||
-int floatx80_le_quie | |||
-int floatx80_lt_quie | |||
-int floatx80_is_sign | |||
- | |||
-#endif | |||
- | |||
-#ifdef FLOAT128 | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE quadruple-precision conversion routines. | |||
-*----------------------------------------------------------------------------*/ | |||
-int float128_to_int3 | |||
-int float128_to_int3 | |||
-long float128_to_int6 | |||
-long float128_to_int6 | |||
-float32 float128_to_floa | |||
-float64 float128_to_floa | |||
-#ifdef FLOATX80 | |||
-floatx80 float128_to_floa | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Software IEC/IEEE quadruple-precision operations. | |||
-*----------------------------------------------------------------------------*/ | |||
-float128 float128_round_t | |||
-float128 float128_add( float128, float128 ); | |||
-float128 float128_sub( float128, float128 ); | |||
-float128 float128_mul( float128, float128 ); | |||
-float128 float128_div( float128, float128 ); | |||
-float128 float128_rem( float128, float128 ); | |||
-float128 float128_sqrt( float128 ); | |||
-int float128_eq( float128, float128 ); | |||
-int float128_le( float128, float128 ); | |||
-int float128_lt( float128, float128 ); | |||
-int float128_eq_sign | |||
-int float128_le_quie | |||
-int float128_lt_quie | |||
-int float128_is_sign | |||
- | |||
-#endif | |||
- | |||
-#endif |
@@ -1,93 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$ | |||
- */ | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. | |||
-*----------------------------------------------------------------------------*/ | |||
-#define BIGENDIAN | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| The macro `BITS64' can be defined to indicate that 64-bit integer types are | |||
-| supported by the compiler. | |||
-*----------------------------------------------------------------------------*/ | |||
-#define BITS64 | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Each of the following `typedef's defines the most convenient type that holds | |||
-| integers of at least as many bits as specified. For example, `uint8' should | |||
-| be the most convenient type that can hold unsigned integers of as many as | |||
-| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most | |||
-| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed | |||
-| to the same as `int'. | |||
-*----------------------------------------------------------------------------*/ | |||
-typedef int flag; | |||
-typedef int uint8; | |||
-typedef int int8; | |||
-typedef int uint16; | |||
-typedef int int16; | |||
-typedef unsigned int uint32; | |||
-typedef signed int int32; | |||
-#ifdef BITS64 | |||
-typedef unsigned long int uint64; | |||
-typedef signed long int int64; | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| Each of the following `typedef's defines a type that holds integers | |||
-| of _exactly_ the number of bits specified. For instance, for most | |||
-| implementation of C, `bits16' and `sbits16' should be `typedef'ed to | |||
-| `unsigned short int' and `signed short int' (or `short int'), respectively. | |||
-*----------------------------------------------------------------------------*/ | |||
-typedef unsigned char bits8; | |||
-typedef signed char sbits8; | |||
-typedef unsigned short int bits16; | |||
-typedef signed short int sbits16; | |||
-typedef unsigned int bits32; | |||
-typedef signed int sbits32; | |||
-#ifdef BITS64 | |||
-typedef unsigned long int bits64; | |||
-typedef signed long int sbits64; | |||
-#endif | |||
- | |||
-#ifdef BITS64 | |||
-/*---------------------------------------------------------------------------- | |||
-| The `LIT64' macro takes as its argument a textual integer literal and | |||
-| if necessary ``marks'' the literal as having a 64-bit integer type. | |||
-| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be | |||
-| appended with the letters `LL' standing for `long long', which is `gcc's | |||
-| name for the 64-bit integer type. Some compilers may allow `LIT64' to be | |||
-| defined as the identity macro: `#define LIT64( a ) a'. | |||
-*----------------------------------------------------------------------------*/ | |||
-#define LIT64( a ) a##L | |||
-#endif | |||
- | |||
-/*---------------------------------------------------------------------------- | |||
-| The macro `INLINE' can be used before functions that should be inlined. If | |||
-| a compiler does not support explicit inlining, this macro should be defined | |||
-| to be `static'. | |||
-*----------------------------------------------------------------------------*/ | |||
-#define INLINE extern inline |
@@ -1,73 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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. | |||
- */ | |||
- | |||
-/* | |||
-=============================================================================== | |||
- | |||
-This C source file is part of TestFloat, Release 2a, a package of programs | |||
-for testing the correctness of floating-point arithmetic complying to the | |||
-IEC/IEEE Standard for Floating-Point. | |||
- | |||
-Written by John R. Hauser. More information is available through the Web | |||
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort | |||
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT | |||
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO | |||
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY | |||
-AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) they include prominent notice that the work is derivative, and (2) they | |||
-include prominent notice akin to these four paragraphs for those parts of | |||
-this code that are retained. | |||
- | |||
-=============================================================================== | |||
-*/ | |||
- | |||
-#include <sys/cdefs.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
-#pragma STDC FENV_ACCESS ON | |||
-#include <fenv.h> | |||
-#include <ieeefp.h> | |||
-#include "milieu.h" | |||
-#include "systflags.h" | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Clears the system's IEC/IEEE floating-point exception flags. Returns the | |||
-previous value of the flags. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-int8 syst_float_flags | |||
-{ | |||
- fexcept_t flags; | |||
- | |||
- fegetexceptflag(&flags, FE_ALL_EXCEPT); | |||
- feclearexcept(FE_ALL_EXCEPT); | |||
- return (flags >> 5); | |||
-} | |||
- |
@@ -1,1120 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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. | |||
- */ | |||
- | |||
-/* | |||
-=============================================================================== | |||
- | |||
-This GNU assembler source file is part of TestFloat, Release 2a, a package | |||
-of programs for testing the correctness of floating-point arithmetic | |||
-complying to the IEC/IEEE Standard for Floating-Point. | |||
- | |||
-Written by John R. Hauser. More information is available through the Web | |||
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort | |||
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT | |||
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO | |||
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY | |||
-AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) they include prominent notice that the work is derivative, and (2) they | |||
-include prominent notice akin to these four paragraphs for those parts of | |||
-this code that are retained. | |||
- | |||
-=============================================================================== | |||
-*/ | |||
- | |||
-#include <machine/asm.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
- .text | |||
- | |||
-/* | |||
- .macro i2f32 src=%i0,dst=%f0 | |||
- st \src,[%sp+2231] | |||
- ld [%sp+2231],\dst | |||
- .endm | |||
- | |||
- .macro i2f64 src=%i0,dst=%f0 | |||
- stx \src,[%sp+2231] | |||
- ldd [%sp+2231],\dst | |||
- .endm | |||
- | |||
- .macro f2i32 src=%f0,dst=%i0 | |||
- st \src,[%sp+2231] | |||
- ld [%sp+2231],\dst | |||
- .endm | |||
- | |||
- .macro f2i64 src=%f0,dst=%i0 | |||
- std \src,[%sp+2231] | |||
- ldx [%sp+2231],\dst | |||
- .endm | |||
-*/ | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int32_to_fl | |||
-syst_int32_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fitos %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int32_to_fl | |||
-syst_int32_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fitod %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int32_to_fl | |||
-syst_int32_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fitoq %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int64_to_fl | |||
-syst_int64_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fxtos %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int64_to_fl | |||
-syst_int64_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fxtod %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_int64_to_fl | |||
-syst_int64_to_fl | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fxtoq %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_to_ | |||
-syst_float32_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fstoi %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_to_ | |||
-syst_float32_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fstox %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_to_ | |||
-syst_float32_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fstod %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_to_ | |||
-syst_float32_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fstoq %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_add | |||
-syst_float32_add | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fadds %f0,%f1,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_sub | |||
-syst_float32_sub | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fsubs %f0,%f1,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_mul | |||
-syst_float32_mul | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fmuls %f0,%f1,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_div | |||
-syst_float32_div | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fdivs %f0,%f1,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_sqr | |||
-syst_float32_sqr | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- fsqrts %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_eq | |||
-syst_float32_eq: | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmps %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_le | |||
-syst_float32_le: | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmpes %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_lt | |||
-syst_float32_lt: | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmpes %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_eq_ | |||
-syst_float32_eq_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmpes %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_le_ | |||
-syst_float32_le_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmps %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float32_lt_ | |||
-syst_float32_lt_ | |||
- save %sp,-192,%sp | |||
- | |||
- st %i0,[%sp+2231] | |||
- ld [%sp+2231],%f0 | |||
- st %i1,[%sp+2231] | |||
- ld [%sp+2231],%f1 | |||
- fcmps %fcc0,%f0,%f1 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_to_ | |||
-syst_float64_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fdtoi %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_to_ | |||
-syst_float64_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fdtox %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_to_ | |||
-syst_float64_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fdtos %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_to_ | |||
-syst_float64_to_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fdtoq %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_add | |||
-syst_float64_add | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- faddd %f0,%f2,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_sub | |||
-syst_float64_sub | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fsubd %f0,%f2,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_mul | |||
-syst_float64_mul | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fmuld %f0,%f2,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_div | |||
-syst_float64_div | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fdivd %f0,%f2,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_sqr | |||
-syst_float64_sqr | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- fsqrtd %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_eq | |||
-syst_float64_eq: | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmpd %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_le | |||
-syst_float64_le: | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmped %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_lt | |||
-syst_float64_lt: | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmped %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_eq_ | |||
-syst_float64_eq_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmped %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_le_ | |||
-syst_float64_le_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmpd %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float64_lt_ | |||
-syst_float64_lt_ | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fcmpd %fcc0,%f0,%f2 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_to | |||
-syst_float128_to | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fqtoi %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_to | |||
-syst_float128_to | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fqtox %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_to | |||
-syst_float128_to | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fqtos %f0,%f0 | |||
- st %f0,[%sp+2231] | |||
- ld [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_to | |||
-syst_float128_to | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fqtod %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_ad | |||
-syst_float128_ad | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- faddq %f0,%f4,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_su | |||
-syst_float128_su | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fsubq %f0,%f4,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_mu | |||
-syst_float128_mu | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fmulq %f0,%f4,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_di | |||
-syst_float128_di | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fdivq %f0,%f4,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_sq | |||
-syst_float128_sq | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- fsqrtq %f0,%f0 | |||
- std %f0,[%sp+2231] | |||
- ldx [%sp+2231],%i0 | |||
- std %f2,[%sp+2231] | |||
- ldx [%sp+2231],%i1 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_eq | |||
-syst_float128_eq | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_le | |||
-syst_float128_le | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpeq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_lt | |||
-syst_float128_lt | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpeq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_eq | |||
-syst_float128_eq | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpeq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- move %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_le | |||
-syst_float128_le | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- movle %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
- .align 4 | |||
- .global syst_float128_lt | |||
-syst_float128_lt | |||
- save %sp,-192,%sp | |||
- | |||
- stx %i0,[%sp+2231] | |||
- ldd [%sp+2231],%f0 | |||
- stx %i1,[%sp+2231] | |||
- ldd [%sp+2231],%f2 | |||
- stx %i2,[%sp+2231] | |||
- ldd [%sp+2231],%f4 | |||
- stx %i3,[%sp+2231] | |||
- ldd [%sp+2231],%f6 | |||
- fcmpq %fcc0,%f0,%f4 | |||
- mov 0,%i0 | |||
- movl %fcc0,1,%i0 | |||
- | |||
- ret | |||
- restore |
@@ -1,216 +0,0 @@ | |||
- | |||
-/* | |||
-=============================================================================== | |||
- | |||
-This C header file is part of TestFloat, Release 2a, a package of programs | |||
-for testing the correctness of floating-point arithmetic complying to the | |||
-IEC/IEEE Standard for Floating-Point. | |||
- | |||
-Written by John R. Hauser. More information is available through the Web | |||
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort | |||
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT | |||
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO | |||
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY | |||
-AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) they include prominent notice that the work is derivative, and (2) they | |||
-include prominent notice akin to these four paragraphs for those parts of | |||
-this code that are retained. | |||
- | |||
-=============================================================================== | |||
-*/ | |||
- | |||
-/* $FreeBSD$ */ | |||
- | |||
-#include "softfloat.h" | |||
-#include "milieu.h" | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-The following macros are defined to indicate that the corresponding | |||
-functions exist. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-#define SYST_INT32_TO_FL | |||
-#define SYST_INT32_TO_FL | |||
-#define SYST_INT32_TO_FL | |||
-#define SYST_INT64_TO_FL | |||
-#define SYST_INT64_TO_FL | |||
-#define SYST_INT64_TO_FL | |||
-#define SYST_FLOAT32_TO_ | |||
-#define SYST_FLOAT32_TO_ | |||
-#define SYST_FLOAT32_TO_ | |||
-#define SYST_FLOAT32_TO_ | |||
-#define SYST_FLOAT32_ADD | |||
-#define SYST_FLOAT32_SUB | |||
-#define SYST_FLOAT32_MUL | |||
-#define SYST_FLOAT32_DIV | |||
-#define SYST_FLOAT32_SQR | |||
-#define SYST_FLOAT32_EQ | |||
-#define SYST_FLOAT32_LE | |||
-#define SYST_FLOAT32_LT | |||
-#define SYST_FLOAT32_EQ_ | |||
-#define SYST_FLOAT32_LE_ | |||
-#define SYST_FLOAT32_LT_ | |||
-#define SYST_FLOAT64_TO_ | |||
-#define SYST_FLOAT64_TO_ | |||
-#define SYST_FLOAT64_TO_ | |||
-#define SYST_FLOAT64_TO_ | |||
-#define SYST_FLOAT64_ADD | |||
-#define SYST_FLOAT64_SUB | |||
-#define SYST_FLOAT64_MUL | |||
-#define SYST_FLOAT64_DIV | |||
-#define SYST_FLOAT64_SQR | |||
-#define SYST_FLOAT64_EQ | |||
-#define SYST_FLOAT64_LE | |||
-#define SYST_FLOAT64_LT | |||
-#define SYST_FLOAT64_EQ_ | |||
-#define SYST_FLOAT64_LE_ | |||
-#define SYST_FLOAT64_LT_ | |||
-#define SYST_FLOAT128_TO | |||
-#define SYST_FLOAT128_TO | |||
-#define SYST_FLOAT128_TO | |||
-#define SYST_FLOAT128_TO | |||
-#define SYST_FLOAT128_AD | |||
-#define SYST_FLOAT128_SU | |||
-#define SYST_FLOAT128_MU | |||
-#define SYST_FLOAT128_DI | |||
-#define SYST_FLOAT128_SQ | |||
-#define SYST_FLOAT128_EQ | |||
-#define SYST_FLOAT128_LE | |||
-#define SYST_FLOAT128_LT | |||
-#define SYST_FLOAT128_EQ | |||
-#define SYST_FLOAT128_LE | |||
-#define SYST_FLOAT128_LT | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-System function declarations. (Some of these functions may not exist.) | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-float32 syst_int32_to_fl | |||
-float64 syst_int32_to_fl | |||
-#ifdef FLOATX80 | |||
-floatx80 syst_int32_to_fl | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 syst_int32_to_fl | |||
-#endif | |||
-#ifdef BITS64 | |||
-float32 syst_int64_to_fl | |||
-float64 syst_int64_to_fl | |||
-#ifdef FLOATX80 | |||
-floatx80 syst_int64_to_fl | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 syst_int64_to_fl | |||
-#endif | |||
-#endif | |||
-int32 syst_float32_to_ | |||
-int32 syst_float32_to_ | |||
-#ifdef BITS64 | |||
-int64 syst_float32_to_ | |||
-int64 syst_float32_to_ | |||
-#endif | |||
-float64 syst_float32_to_ | |||
-#ifdef FLOATX80 | |||
-floatx80 syst_float32_to_ | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 syst_float32_to_ | |||
-#endif | |||
-float32 syst_float32_rou | |||
-float32 syst_float32_add | |||
-float32 syst_float32_sub | |||
-float32 syst_float32_mul | |||
-float32 syst_float32_div | |||
-float32 syst_float32_rem | |||
-float32 syst_float32_sqr | |||
-flag syst_float32_eq( float32, float32 ); | |||
-flag syst_float32_le( float32, float32 ); | |||
-flag syst_float32_lt( float32, float32 ); | |||
-flag syst_float32_eq_ | |||
-flag syst_float32_le_ | |||
-flag syst_float32_lt_ | |||
-int32 syst_float64_to_ | |||
-int32 syst_float64_to_ | |||
-#ifdef BITS64 | |||
-int64 syst_float64_to_ | |||
-int64 syst_float64_to_ | |||
-#endif | |||
-float32 syst_float64_to_ | |||
-#ifdef FLOATX80 | |||
-floatx80 syst_float64_to_ | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-float128 syst_float64_to_ | |||
-#endif | |||
-float64 syst_float64_rou | |||
-float64 syst_float64_add | |||
-float64 syst_float64_sub | |||
-float64 syst_float64_mul | |||
-float64 syst_float64_div | |||
-float64 syst_float64_rem | |||
-float64 syst_float64_sqr | |||
-flag syst_float64_eq( float64, float64 ); | |||
-flag syst_float64_le( float64, float64 ); | |||
-flag syst_float64_lt( float64, float64 ); | |||
-flag syst_float64_eq_ | |||
-flag syst_float64_le_ | |||
-flag syst_float64_lt_ | |||
-#ifdef FLOATX80 | |||
-int32 syst_floatx80_to | |||
-int32 syst_floatx80_to | |||
-#ifdef BITS64 | |||
-int64 syst_floatx80_to | |||
-int64 syst_floatx80_to | |||
-#endif | |||
-float32 syst_floatx80_to | |||
-float64 syst_floatx80_to | |||
-#ifdef FLOAT128 | |||
-float128 syst_floatx80_to | |||
-#endif | |||
-floatx80 syst_floatx80_ro | |||
-floatx80 syst_floatx80_ad | |||
-floatx80 syst_floatx80_su | |||
-floatx80 syst_floatx80_mu | |||
-floatx80 syst_floatx80_di | |||
-floatx80 syst_floatx80_re | |||
-floatx80 syst_floatx80_sq | |||
-flag syst_floatx80_eq | |||
-flag syst_floatx80_le | |||
-flag syst_floatx80_lt | |||
-flag syst_floatx80_eq | |||
-flag syst_floatx80_le | |||
-flag syst_floatx80_lt | |||
-#endif | |||
-#ifdef FLOAT128 | |||
-int32 syst_float128_to | |||
-int32 syst_float128_to | |||
-#ifdef BITS64 | |||
-int64 syst_float128_to | |||
-int64 syst_float128_to | |||
-#endif | |||
-float32 syst_float128_to | |||
-float64 syst_float128_to | |||
-#ifdef FLOATX80 | |||
-floatx80 syst_float128_to | |||
-#endif | |||
-float128 syst_float128_ro | |||
-float128 syst_float128_ad | |||
-float128 syst_float128_su | |||
-float128 syst_float128_mu | |||
-float128 syst_float128_di | |||
-float128 syst_float128_re | |||
-float128 syst_float128_sq | |||
-flag syst_float128_eq | |||
-flag syst_float128_le | |||
-flag syst_float128_lt | |||
-flag syst_float128_eq | |||
-flag syst_float128_le | |||
-flag syst_float128_lt | |||
-#endif | |||
- |
@@ -1,54 +0,0 @@ | |||
- | |||
-/* | |||
-=============================================================================== | |||
- | |||
-This C source file is part of TestFloat, Release 2a, a package of programs | |||
-for testing the correctness of floating-point arithmetic complying to the | |||
-IEC/IEEE Standard for Floating-Point. | |||
- | |||
-Written by John R. Hauser. More information is available through the Web | |||
-page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. | |||
- | |||
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort | |||
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT | |||
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO | |||
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY | |||
-AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. | |||
- | |||
-Derivative works are acceptable, even for commercial purposes, so long as | |||
-(1) they include prominent notice that the work is derivative, and (2) they | |||
-include prominent notice akin to these four paragraphs for those parts of | |||
-this code that are retained. | |||
- | |||
-=============================================================================== | |||
-*/ | |||
- | |||
-#include <sys/cdefs.h> | |||
-__FBSDID("$FreeBSD$"); | |||
- | |||
-#include <ieeefp.h> | |||
-#include "milieu.h" | |||
-#include "systmodes.h" | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Sets the system's IEC/IEEE floating-point rounding mode. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-void syst_float_set_r | |||
-{ | |||
- | |||
- (void) fpsetround( roundingMode ); | |||
- | |||
-} | |||
- | |||
-/* | |||
-------------------------------------------------------------------------------- | |||
-Does nothing. | |||
-------------------------------------------------------------------------------- | |||
-*/ | |||
-void syst_float_set_r | |||
-{ | |||
- | |||
-} | |||
- |
@@ -1,30 +0,0 @@ | |||
-/*- | |||
- * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.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 ``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$ | |||
- */ | |||
-/* | |||
- * This file has no content and is solely to satisfy a #include in | |||
- * the FP emulator code. | |||
- */ |