blob: aa49b6a0d850c616d1f257c563d8ad92ab255d95 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _FPU_PROTO_H
2#define _FPU_PROTO_H
3
4/* errors.c */
5extern void FPU_illegal(void);
6extern void FPU_printall(void);
7asmlinkage void FPU_exception(int n);
Ingo Molnare8d591d2008-01-30 13:30:12 +01008extern int real_1op_NaN(FPU_REG *a);
Linus Torvalds1da177e2005-04-16 15:20:36 -07009extern int real_2op_NaN(FPU_REG const *b, u_char tagb, int deststnr,
10 FPU_REG const *defaultNaN);
11asmlinkage int arith_invalid(int deststnr);
12asmlinkage int FPU_divide_by_zero(int deststnr, u_char sign);
13extern int set_precision_flag(int flags);
14asmlinkage void set_precision_flag_up(void);
15asmlinkage void set_precision_flag_down(void);
16asmlinkage int denormal_operand(void);
Ingo Molnare8d591d2008-01-30 13:30:12 +010017asmlinkage int arith_overflow(FPU_REG *dest);
18asmlinkage int arith_underflow(FPU_REG *dest);
Linus Torvalds1da177e2005-04-16 15:20:36 -070019extern void FPU_stack_overflow(void);
20extern void FPU_stack_underflow(void);
21extern void FPU_stack_underflow_i(int i);
22extern void FPU_stack_underflow_pop(int i);
23/* fpu_arith.c */
24extern void fadd__(void);
25extern void fmul__(void);
26extern void fsub__(void);
27extern void fsubr_(void);
28extern void fdiv__(void);
29extern void fdivr_(void);
30extern void fadd_i(void);
31extern void fmul_i(void);
32extern void fsubri(void);
33extern void fsub_i(void);
34extern void fdivri(void);
35extern void fdiv_i(void);
36extern void faddp_(void);
37extern void fmulp_(void);
38extern void fsubrp(void);
39extern void fsubp_(void);
40extern void fdivrp(void);
41extern void fdivp_(void);
42/* fpu_aux.c */
43extern void finit(void);
44extern void finit_(void);
45extern void fstsw_(void);
46extern void fp_nop(void);
47extern void fld_i_(void);
48extern void fxch_i(void);
49extern void ffree_(void);
50extern void ffreep(void);
51extern void fst_i_(void);
52extern void fstp_i(void);
53/* fpu_entry.c */
54asmlinkage extern void math_emulate(long arg);
55extern void math_abort(struct info *info, unsigned int signal);
56/* fpu_etc.c */
57extern void FPU_etc(void);
58/* fpu_tags.c */
59extern int FPU_gettag0(void);
60extern int FPU_gettagi(int stnr);
61extern int FPU_gettag(int regnr);
62extern void FPU_settag0(int tag);
63extern void FPU_settagi(int stnr, int tag);
64extern void FPU_settag(int regnr, int tag);
65extern int FPU_Special(FPU_REG const *ptr);
66extern int isNaN(FPU_REG const *ptr);
67extern void FPU_pop(void);
68extern int FPU_empty_i(int stnr);
Ingo Molnar3d0d14f2008-01-30 13:30:11 +010069extern int FPU_stackoverflow(FPU_REG ** st_new_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070070extern void FPU_copy_to_regi(FPU_REG const *r, u_char tag, int stnr);
71extern void FPU_copy_to_reg1(FPU_REG const *r, u_char tag);
72extern void FPU_copy_to_reg0(FPU_REG const *r, u_char tag);
73/* fpu_trig.c */
74extern void FPU_triga(void);
75extern void FPU_trigb(void);
76/* get_address.c */
77extern void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +010078 struct address *addr,
79 fpu_addr_modes addr_modes);
Linus Torvalds1da177e2005-04-16 15:20:36 -070080extern void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +010081 struct address *addr,
82 fpu_addr_modes addr_modes);
Linus Torvalds1da177e2005-04-16 15:20:36 -070083/* load_store.c */
84extern int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +010085 void __user * data_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -070086/* poly_2xm1.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +010087extern int poly_2xm1(u_char sign, FPU_REG * arg, FPU_REG *result);
Linus Torvalds1da177e2005-04-16 15:20:36 -070088/* poly_atan.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +010089extern void poly_atan(FPU_REG * st0_ptr, u_char st0_tag, FPU_REG *st1_ptr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070090 u_char st1_tag);
91/* poly_l2.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +010092extern void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char st1_sign);
93extern int poly_l2p1(u_char s0, u_char s1, FPU_REG *r0, FPU_REG *r1,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +010094 FPU_REG * d);
Linus Torvalds1da177e2005-04-16 15:20:36 -070095/* poly_sin.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +010096extern void poly_sine(FPU_REG *st0_ptr);
97extern void poly_cos(FPU_REG *st0_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070098/* poly_tan.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +010099extern void poly_tan(FPU_REG *st0_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100/* reg_add_sub.c */
101extern int FPU_add(FPU_REG const *b, u_char tagb, int destrnr, int control_w);
102extern int FPU_sub(int flags, int rm, int control_w);
103/* reg_compare.c */
104extern int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag);
105extern void fcom_st(void);
106extern void fcompst(void);
107extern void fcompp(void);
108extern void fucom_(void);
109extern void fucomp(void);
110extern void fucompp(void);
111/* reg_constant.c */
112extern void fconst(void);
113/* reg_ld_str.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +0100114extern int FPU_load_extended(long double __user *s, int stnr);
115extern int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data);
116extern int FPU_load_single(float __user *single, FPU_REG *loaded_data);
117extern int FPU_load_int64(long long __user *_s);
118extern int FPU_load_int32(long __user *_s, FPU_REG *loaded_data);
119extern int FPU_load_int16(short __user *_s, FPU_REG *loaded_data);
120extern int FPU_load_bcd(u_char __user *s);
121extern int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +0100122 long double __user * d);
Ingo Molnare8d591d2008-01-30 13:30:12 +0100123extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +0100124 double __user * dfloat);
Ingo Molnare8d591d2008-01-30 13:30:12 +0100125extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +0100126 float __user * single);
Ingo Molnare8d591d2008-01-30 13:30:12 +0100127extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag,
Ingo Molnar3d0d14f2008-01-30 13:30:11 +0100128 long long __user * d);
Ingo Molnare8d591d2008-01-30 13:30:12 +0100129extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d);
130extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d);
131extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d);
132extern int FPU_round_to_int(FPU_REG *r, u_char tag);
133extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s);
134extern void frstor(fpu_addr_modes addr_modes, u_char __user *data_address);
135extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d);
136extern void fsave(fpu_addr_modes addr_modes, u_char __user *data_address);
137extern int FPU_tagof(FPU_REG *ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138/* reg_mul.c */
139extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
140
141extern int FPU_div(int flags, int regrm, int control_w);
142/* reg_convert.c */
Ingo Molnare8d591d2008-01-30 13:30:12 +0100143extern int FPU_to_exp16(FPU_REG const *a, FPU_REG *x);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144#endif /* _FPU_PROTO_H */