blob: 92daae13249245e31783b31756b3b88608f9cf68 [file] [log] [blame]
Kyle Swenson8d8f6542021-03-15 11:02:55 -06001/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14 *
15 * Copyright Novell Inc. 2010
16 *
17 * Authors: Alexander Graf <agraf@suse.de>
18 */
19
20#ifndef __ASM_KVM_FPU_H__
21#define __ASM_KVM_FPU_H__
22
23#include <linux/types.h>
24
25extern void fps_fres(u64 *fpscr, u32 *dst, u32 *src1);
26extern void fps_frsqrte(u64 *fpscr, u32 *dst, u32 *src1);
27extern void fps_fsqrts(u64 *fpscr, u32 *dst, u32 *src1);
28
29extern void fps_fadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
30extern void fps_fdivs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
31extern void fps_fmuls(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
32extern void fps_fsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2);
33
34extern void fps_fmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
35 u32 *src3);
36extern void fps_fmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
37 u32 *src3);
38extern void fps_fnmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
39 u32 *src3);
40extern void fps_fnmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
41 u32 *src3);
42extern void fps_fsel(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2,
43 u32 *src3);
44
45#define FPD_ONE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
46 u64 *dst, u64 *src1);
47#define FPD_TWO_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
48 u64 *dst, u64 *src1, u64 *src2);
49#define FPD_THREE_IN(name) extern void fpd_ ## name(u64 *fpscr, u32 *cr, \
50 u64 *dst, u64 *src1, u64 *src2, u64 *src3);
51
52extern void fpd_fcmpu(u64 *fpscr, u32 *cr, u64 *src1, u64 *src2);
53extern void fpd_fcmpo(u64 *fpscr, u32 *cr, u64 *src1, u64 *src2);
54
55FPD_ONE_IN(fsqrts)
56FPD_ONE_IN(frsqrtes)
57FPD_ONE_IN(fres)
58FPD_ONE_IN(frsp)
59FPD_ONE_IN(fctiw)
60FPD_ONE_IN(fctiwz)
61FPD_ONE_IN(fsqrt)
62FPD_ONE_IN(fre)
63FPD_ONE_IN(frsqrte)
64FPD_ONE_IN(fneg)
65FPD_ONE_IN(fabs)
66FPD_TWO_IN(fadds)
67FPD_TWO_IN(fsubs)
68FPD_TWO_IN(fdivs)
69FPD_TWO_IN(fmuls)
70FPD_TWO_IN(fcpsgn)
71FPD_TWO_IN(fdiv)
72FPD_TWO_IN(fadd)
73FPD_TWO_IN(fmul)
74FPD_TWO_IN(fsub)
75FPD_THREE_IN(fmsubs)
76FPD_THREE_IN(fmadds)
77FPD_THREE_IN(fnmsubs)
78FPD_THREE_IN(fnmadds)
79FPD_THREE_IN(fsel)
80FPD_THREE_IN(fmsub)
81FPD_THREE_IN(fmadd)
82FPD_THREE_IN(fnmsub)
83FPD_THREE_IN(fnmadd)
84
85extern void kvm_cvt_fd(u32 *from, u64 *to);
86extern void kvm_cvt_df(u64 *from, u32 *to);
87
88#endif