xref: /onnv-gate/usr/src/uts/sparc/sys/fpu/fpusystm.h (revision 7:420a1f4ae7e6)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
230Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef _SYS_FPU_FPUSYSTM_H
280Sstevel@tonic-gate #define	_SYS_FPU_FPUSYSTM_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate /*
330Sstevel@tonic-gate  * ISA-dependent FPU interfaces
340Sstevel@tonic-gate  */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #ifdef __cplusplus
370Sstevel@tonic-gate extern "C" {
380Sstevel@tonic-gate #endif
390Sstevel@tonic-gate 
400Sstevel@tonic-gate #ifdef _KERNEL
410Sstevel@tonic-gate 
420Sstevel@tonic-gate struct fpu;
430Sstevel@tonic-gate struct regs;
440Sstevel@tonic-gate 
450Sstevel@tonic-gate #if !defined(DEBUG) && !defined(NEED_FPU_EXISTS)
460Sstevel@tonic-gate #define	fpu_exists 1
470Sstevel@tonic-gate #else
480Sstevel@tonic-gate extern int fpu_exists;
490Sstevel@tonic-gate #endif
500Sstevel@tonic-gate 
510Sstevel@tonic-gate extern int fpu_version;
520Sstevel@tonic-gate extern int fpdispr;
530Sstevel@tonic-gate 
540Sstevel@tonic-gate extern void fpu_probe(void);
550Sstevel@tonic-gate extern void fp_disable(void);
560Sstevel@tonic-gate extern void fp_disabled(struct regs *);
570Sstevel@tonic-gate extern void fp_clearregs(kfpu_t *);
580Sstevel@tonic-gate extern void fp_enable(void);
590Sstevel@tonic-gate extern void fp_fksave(kfpu_t *);
600Sstevel@tonic-gate extern void fp_runq(struct regs *);
610Sstevel@tonic-gate extern void fp_load(kfpu_t *);
620Sstevel@tonic-gate extern void fp_save(kfpu_t *);
630Sstevel@tonic-gate extern void fp_restore(kfpu_t *);
640Sstevel@tonic-gate extern void run_fpq(klwp_t *, fpregset_t *);
650Sstevel@tonic-gate extern void syncfpu(void);
660Sstevel@tonic-gate extern void _fp_read_pfsr(uint64_t *fsr);
670Sstevel@tonic-gate extern void _fp_write_pfsr(uint64_t *);
680Sstevel@tonic-gate extern void _fp_read_pfreg(uint32_t *, uint_t);
690Sstevel@tonic-gate extern void _fp_write_pfreg(uint32_t *, uint_t);
700Sstevel@tonic-gate extern void fp_free(kfpu_t *, int);
710Sstevel@tonic-gate extern void fp_fork(klwp_t *, klwp_t *);
720Sstevel@tonic-gate extern void fp_v8_load(kfpu_t *);
730Sstevel@tonic-gate extern void fp_v8p_load(kfpu_t *);
740Sstevel@tonic-gate extern void fp_v8_fksave(kfpu_t *);
750Sstevel@tonic-gate extern void fp_v8p_fksave(kfpu_t *);
760Sstevel@tonic-gate extern uint32_t _fp_read_fprs(void);
770Sstevel@tonic-gate extern void _fp_write_fprs(uint32_t);
780Sstevel@tonic-gate extern void save_gsr(kfpu_t *);
790Sstevel@tonic-gate extern void restore_gsr(kfpu_t *);
800Sstevel@tonic-gate extern uint64_t get_gsr(kfpu_t *);
810Sstevel@tonic-gate extern void set_gsr(uint64_t, kfpu_t *);
82*7Sdf157793 extern uint64_t _fp_read_pgsr(kfpu_t *);
83*7Sdf157793 extern void _fp_write_pgsr(uint64_t, kfpu_t *);
840Sstevel@tonic-gate extern void _fp_read_pdreg(uint64_t *, uint_t);
850Sstevel@tonic-gate extern void _fp_write_pdreg(uint64_t *, uint_t);
860Sstevel@tonic-gate 
870Sstevel@tonic-gate #endif	/* _KERNEL */
880Sstevel@tonic-gate 
890Sstevel@tonic-gate #ifdef __cplusplus
900Sstevel@tonic-gate }
910Sstevel@tonic-gate #endif
920Sstevel@tonic-gate 
930Sstevel@tonic-gate #endif	/* _SYS_FPU_FPUSYSTM_H */
94