xref: /freebsd/sys/powerpc/fpu/fpu_extern.h (revision 71625ec9ad2a9bc8c09784fbd23b759830e0ee5f)
17e76048aSMarcel Moolenaar /*	$NetBSD: fpu_extern.h,v 1.3 2005/12/11 12:18:42 christos Exp $	*/
27e76048aSMarcel Moolenaar 
37e76048aSMarcel Moolenaar /*-
4*b61a5730SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
571e3c308SPedro F. Giffuni  *
67e76048aSMarcel Moolenaar  * Copyright (c) 1995 The NetBSD Foundation, Inc.
77e76048aSMarcel Moolenaar  * All rights reserved.
87e76048aSMarcel Moolenaar  *
97e76048aSMarcel Moolenaar  * This code is derived from software contributed to The NetBSD Foundation
107e76048aSMarcel Moolenaar  * by Christos Zoulas.
117e76048aSMarcel Moolenaar  *
127e76048aSMarcel Moolenaar  * Redistribution and use in source and binary forms, with or without
137e76048aSMarcel Moolenaar  * modification, are permitted provided that the following conditions
147e76048aSMarcel Moolenaar  * are met:
157e76048aSMarcel Moolenaar  * 1. Redistributions of source code must retain the above copyright
167e76048aSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer.
177e76048aSMarcel Moolenaar  * 2. Redistributions in binary form must reproduce the above copyright
187e76048aSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer in the
197e76048aSMarcel Moolenaar  *    documentation and/or other materials provided with the distribution.
207e76048aSMarcel Moolenaar  *
217e76048aSMarcel Moolenaar  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
227e76048aSMarcel Moolenaar  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
237e76048aSMarcel Moolenaar  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
247e76048aSMarcel Moolenaar  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
257e76048aSMarcel Moolenaar  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
267e76048aSMarcel Moolenaar  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
277e76048aSMarcel Moolenaar  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
287e76048aSMarcel Moolenaar  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
297e76048aSMarcel Moolenaar  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
307e76048aSMarcel Moolenaar  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
317e76048aSMarcel Moolenaar  * POSSIBILITY OF SUCH DAMAGE.
327e76048aSMarcel Moolenaar  */
337e76048aSMarcel Moolenaar 
347e76048aSMarcel Moolenaar struct proc;
3593312a91SJohn Baldwin struct fpu;
367e76048aSMarcel Moolenaar struct trapframe;
377e76048aSMarcel Moolenaar union instr;
387e76048aSMarcel Moolenaar struct fpemu;
397e76048aSMarcel Moolenaar struct fpn;
407e76048aSMarcel Moolenaar 
417e76048aSMarcel Moolenaar /* fpu.c */
4293312a91SJohn Baldwin int fpu_emulate(struct trapframe *, struct fpu *);
437e76048aSMarcel Moolenaar int fpu_execute(struct trapframe *, struct fpemu *, union instr *);
447e76048aSMarcel Moolenaar 
457e76048aSMarcel Moolenaar /* fpu_explode.c */
467e76048aSMarcel Moolenaar int fpu_itof(struct fpn *, u_int);
477e76048aSMarcel Moolenaar int fpu_xtof(struct fpn *, u_int64_t);
487e76048aSMarcel Moolenaar int fpu_stof(struct fpn *, u_int);
497e76048aSMarcel Moolenaar int fpu_dtof(struct fpn *, u_int, u_int);
507e76048aSMarcel Moolenaar 
517e76048aSMarcel Moolenaar /* fpu_implode.c */
527e76048aSMarcel Moolenaar u_int fpu_ftoi(struct fpemu *, struct fpn *);
537e76048aSMarcel Moolenaar u_int fpu_ftox(struct fpemu *, struct fpn *, u_int *);
547e76048aSMarcel Moolenaar u_int fpu_ftos(struct fpemu *, struct fpn *);
557e76048aSMarcel Moolenaar u_int fpu_ftod(struct fpemu *, struct fpn *, u_int *);
56