fpu_extern.h revision 1.5
11.5Smatt/*	$NetBSD: fpu_extern.h,v 1.5 2012/07/23 04:13:06 matt Exp $	*/
21.1Ssimonb
31.1Ssimonb/*-
41.1Ssimonb * Copyright (c) 1995 The NetBSD Foundation, Inc.
51.1Ssimonb * All rights reserved.
61.1Ssimonb *
71.1Ssimonb * This code is derived from software contributed to The NetBSD Foundation
81.1Ssimonb * by Christos Zoulas.
91.1Ssimonb *
101.1Ssimonb * Redistribution and use in source and binary forms, with or without
111.1Ssimonb * modification, are permitted provided that the following conditions
121.1Ssimonb * are met:
131.1Ssimonb * 1. Redistributions of source code must retain the above copyright
141.1Ssimonb *    notice, this list of conditions and the following disclaimer.
151.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright
161.1Ssimonb *    notice, this list of conditions and the following disclaimer in the
171.1Ssimonb *    documentation and/or other materials provided with the distribution.
181.1Ssimonb *
191.1Ssimonb * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Ssimonb * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Ssimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Ssimonb * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Ssimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Ssimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Ssimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Ssimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Ssimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Ssimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Ssimonb * POSSIBILITY OF SUCH DAMAGE.
301.1Ssimonb */
311.1Ssimonb
321.5Smatt#ifndef _POWERPC_FPU_FPU_EXTERN_H_
331.5Smatt#define _POWERPC_FPU_FPU_EXTERN_H_
341.5Smatt
351.5Smatt#include <sys/signal.h>
361.5Smatt#include <sys/siginfo.h>
371.5Smatt
381.1Ssimonbstruct proc;
391.1Ssimonbstruct fpreg;
401.1Ssimonbstruct trapframe;
411.1Ssimonbunion instr;
421.1Ssimonbstruct fpemu;
431.1Ssimonbstruct fpn;
441.1Ssimonb
451.1Ssimonb/* fpu.c */
461.5Smattbool fpu_emulate(struct trapframe *, struct fpreg *, ksiginfo_t *);
471.1Ssimonbint fpu_execute(struct trapframe *, struct fpemu *, union instr *);
481.1Ssimonb
491.1Ssimonb/* fpu_add.c */
501.1Ssimonbstruct fpn *fpu_add(struct fpemu *);
511.1Ssimonb
521.1Ssimonb/* fpu_compare.c */
531.1Ssimonbvoid fpu_compare(struct fpemu *, int);
541.1Ssimonb
551.1Ssimonb/* fpu_div.c */
561.1Ssimonbstruct fpn *fpu_div(struct fpemu *);
571.1Ssimonb
581.1Ssimonb/* fpu_explode.c */
591.1Ssimonbint fpu_itof(struct fpn *, u_int);
601.1Ssimonbint fpu_xtof(struct fpn *, u_int64_t);
611.1Ssimonbint fpu_stof(struct fpn *, u_int);
621.1Ssimonbint fpu_dtof(struct fpn *, u_int, u_int);
631.1Ssimonbvoid fpu_explode(struct fpemu *, struct fpn *, int, int);
641.1Ssimonb
651.1Ssimonb/* fpu_implode.c */
661.1Ssimonbu_int fpu_ftoi(struct fpemu *, struct fpn *);
671.1Ssimonbu_int fpu_ftox(struct fpemu *, struct fpn *, u_int *);
681.1Ssimonbu_int fpu_ftos(struct fpemu *, struct fpn *);
691.1Ssimonbu_int fpu_ftod(struct fpemu *, struct fpn *, u_int *);
701.1Ssimonbvoid fpu_implode(struct fpemu *, struct fpn *, int, u_int *);
711.1Ssimonb
721.1Ssimonb/* fpu_mul.c */
731.1Ssimonbstruct fpn *fpu_mul(struct fpemu *);
741.1Ssimonb
751.1Ssimonb/* fpu_sqrt.c */
761.1Ssimonbstruct fpn *fpu_sqrt(struct fpemu *);
771.1Ssimonb
781.1Ssimonb/* fpu_subr.c */
791.1Ssimonbint fpu_shr(struct fpn *, int);
801.1Ssimonbvoid fpu_norm(struct fpn *);
811.1Ssimonbstruct fpn *fpu_newnan(struct fpemu *);
821.5Smatt
831.5Smatt#endif /* _POWERPC_FPU_FPU_EXTERN_H_ */
84