forked from luck/tmp_suning_uos_patched
x86: lindent arch/i386/math-emu, cleanup
manually clean up some of the damage that lindent caused. (this is a separate commit so that in the unlikely case of a typo we can bisect it down to the manual edits.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
3d0d14f983
commit
e8d591dc71
|
@ -374,7 +374,7 @@ asmlinkage void FPU_exception(int n)
|
|||
|
||||
/* Real operation attempted on a NaN. */
|
||||
/* Returns < 0 if the exception is unmasked */
|
||||
int real_1op_NaN(FPU_REG * a)
|
||||
int real_1op_NaN(FPU_REG *a)
|
||||
{
|
||||
int signalling, isNaN;
|
||||
|
||||
|
@ -573,7 +573,7 @@ asmlinkage int denormal_operand(void)
|
|||
}
|
||||
}
|
||||
|
||||
asmlinkage int arith_overflow(FPU_REG * dest)
|
||||
asmlinkage int arith_overflow(FPU_REG *dest)
|
||||
{
|
||||
int tag = TAG_Valid;
|
||||
|
||||
|
@ -601,7 +601,7 @@ asmlinkage int arith_overflow(FPU_REG * dest)
|
|||
|
||||
}
|
||||
|
||||
asmlinkage int arith_underflow(FPU_REG * dest)
|
||||
asmlinkage int arith_underflow(FPU_REG *dest)
|
||||
{
|
||||
int tag = TAG_Valid;
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ struct fpu__reg {
|
|||
|
||||
typedef void (*FUNC) (void);
|
||||
typedef struct fpu__reg FPU_REG;
|
||||
typedef void (*FUNC_ST0) (FPU_REG * st0_ptr, u_char st0_tag);
|
||||
typedef void (*FUNC_ST0) (FPU_REG *st0_ptr, u_char st0_tag);
|
||||
typedef struct {
|
||||
u_char address_size, operand_size, segment;
|
||||
} overrides;
|
||||
|
@ -166,7 +166,7 @@ extern u_char const data_sizes_16[32];
|
|||
#define signpositive(a) ( (signbyte(a) & 0x80) == 0 )
|
||||
#define signnegative(a) (signbyte(a) & 0x80)
|
||||
|
||||
static inline void reg_copy(FPU_REG const *x, FPU_REG * y)
|
||||
static inline void reg_copy(FPU_REG const *x, FPU_REG *y)
|
||||
{
|
||||
*(short *)&(y->exp) = *(const short *)&(x->exp);
|
||||
*(long long *)&(y->sigl) = *(const long long *)&(x->sigl);
|
||||
|
@ -187,8 +187,8 @@ static inline void reg_copy(FPU_REG const *x, FPU_REG * y)
|
|||
/*----- Prototypes for functions written in assembler -----*/
|
||||
/* extern void reg_move(FPU_REG *a, FPU_REG *b); */
|
||||
|
||||
asmlinkage int FPU_normalize(FPU_REG * x);
|
||||
asmlinkage int FPU_normalize_nuo(FPU_REG * x);
|
||||
asmlinkage int FPU_normalize(FPU_REG *x);
|
||||
asmlinkage int FPU_normalize_nuo(FPU_REG *x);
|
||||
asmlinkage int FPU_u_sub(FPU_REG const *arg1, FPU_REG const *arg2,
|
||||
FPU_REG * answ, unsigned int control_w, u_char sign,
|
||||
int expa, int expb);
|
||||
|
@ -200,12 +200,12 @@ asmlinkage int FPU_u_div(FPU_REG const *arg1, FPU_REG const *arg2,
|
|||
asmlinkage int FPU_u_add(FPU_REG const *arg1, FPU_REG const *arg2,
|
||||
FPU_REG * answ, unsigned int control_w, u_char sign,
|
||||
int expa, int expb);
|
||||
asmlinkage int wm_sqrt(FPU_REG * n, int dummy1, int dummy2,
|
||||
asmlinkage int wm_sqrt(FPU_REG *n, int dummy1, int dummy2,
|
||||
unsigned int control_w, u_char sign);
|
||||
asmlinkage unsigned FPU_shrx(void *l, unsigned x);
|
||||
asmlinkage unsigned FPU_shrxs(void *v, unsigned x);
|
||||
asmlinkage unsigned long FPU_div_small(unsigned long long *x, unsigned long y);
|
||||
asmlinkage int FPU_round(FPU_REG * arg, unsigned int extent, int dummy,
|
||||
asmlinkage int FPU_round(FPU_REG *arg, unsigned int extent, int dummy,
|
||||
unsigned int control_w, u_char sign);
|
||||
|
||||
#ifndef MAKING_PROTO
|
||||
|
|
|
@ -126,7 +126,7 @@ static u_char const type_table[64] = {
|
|||
u_char emulating = 0;
|
||||
#endif /* RE_ENTRANT_CHECKING */
|
||||
|
||||
static int valid_prefix(u_char * Byte, u_char __user ** fpu_eip,
|
||||
static int valid_prefix(u_char *Byte, u_char __user ** fpu_eip,
|
||||
overrides * override);
|
||||
|
||||
asmlinkage void math_emulate(long arg)
|
||||
|
@ -580,7 +580,7 @@ asmlinkage void math_emulate(long arg)
|
|||
all prefix bytes, further changes are needed in the emulator code
|
||||
which accesses user address space. Access to separate segments is
|
||||
important for msdos emulation. */
|
||||
static int valid_prefix(u_char * Byte, u_char __user ** fpu_eip,
|
||||
static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
|
||||
overrides * override)
|
||||
{
|
||||
u_char byte;
|
||||
|
@ -673,7 +673,7 @@ void math_abort(struct info *info, unsigned int signal)
|
|||
#define sstatus_word() \
|
||||
((S387->swd & ~SW_Top & 0xffff) | ((S387->ftop << SW_Top_Shift) & SW_Top))
|
||||
|
||||
int restore_i387_soft(void *s387, struct _fpstate __user * buf)
|
||||
int restore_i387_soft(void *s387, struct _fpstate __user *buf)
|
||||
{
|
||||
u_char __user *d = (u_char __user *) buf;
|
||||
int offset, other, i, tags, regnr, tag, newtop;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "status_w.h"
|
||||
#include "reg_constant.h"
|
||||
|
||||
static void fchs(FPU_REG * st0_ptr, u_char st0tag)
|
||||
static void fchs(FPU_REG *st0_ptr, u_char st0tag)
|
||||
{
|
||||
if (st0tag ^ TAG_Empty) {
|
||||
signbyte(st0_ptr) ^= SIGN_NEG;
|
||||
|
@ -25,7 +25,7 @@ static void fchs(FPU_REG * st0_ptr, u_char st0tag)
|
|||
FPU_stack_underflow();
|
||||
}
|
||||
|
||||
static void fabs(FPU_REG * st0_ptr, u_char st0tag)
|
||||
static void fabs(FPU_REG *st0_ptr, u_char st0tag)
|
||||
{
|
||||
if (st0tag ^ TAG_Empty) {
|
||||
setpositive(st0_ptr);
|
||||
|
@ -34,7 +34,7 @@ static void fabs(FPU_REG * st0_ptr, u_char st0tag)
|
|||
FPU_stack_underflow();
|
||||
}
|
||||
|
||||
static void ftst_(FPU_REG * st0_ptr, u_char st0tag)
|
||||
static void ftst_(FPU_REG *st0_ptr, u_char st0tag)
|
||||
{
|
||||
switch (st0tag) {
|
||||
case TAG_Zero:
|
||||
|
@ -85,7 +85,7 @@ static void ftst_(FPU_REG * st0_ptr, u_char st0tag)
|
|||
}
|
||||
}
|
||||
|
||||
static void fxam(FPU_REG * st0_ptr, u_char st0tag)
|
||||
static void fxam(FPU_REG *st0_ptr, u_char st0tag)
|
||||
{
|
||||
int c = 0;
|
||||
switch (st0tag) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
extern void FPU_illegal(void);
|
||||
extern void FPU_printall(void);
|
||||
asmlinkage void FPU_exception(int n);
|
||||
extern int real_1op_NaN(FPU_REG * a);
|
||||
extern int real_1op_NaN(FPU_REG *a);
|
||||
extern int real_2op_NaN(FPU_REG const *b, u_char tagb, int deststnr,
|
||||
FPU_REG const *defaultNaN);
|
||||
asmlinkage int arith_invalid(int deststnr);
|
||||
|
@ -14,8 +14,8 @@ extern int set_precision_flag(int flags);
|
|||
asmlinkage void set_precision_flag_up(void);
|
||||
asmlinkage void set_precision_flag_down(void);
|
||||
asmlinkage int denormal_operand(void);
|
||||
asmlinkage int arith_overflow(FPU_REG * dest);
|
||||
asmlinkage int arith_underflow(FPU_REG * dest);
|
||||
asmlinkage int arith_overflow(FPU_REG *dest);
|
||||
asmlinkage int arith_underflow(FPU_REG *dest);
|
||||
extern void FPU_stack_overflow(void);
|
||||
extern void FPU_stack_underflow(void);
|
||||
extern void FPU_stack_underflow_i(int i);
|
||||
|
@ -84,19 +84,19 @@ extern void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
|
|||
extern int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
|
||||
void __user * data_address);
|
||||
/* poly_2xm1.c */
|
||||
extern int poly_2xm1(u_char sign, FPU_REG * arg, FPU_REG * result);
|
||||
extern int poly_2xm1(u_char sign, FPU_REG * arg, FPU_REG *result);
|
||||
/* poly_atan.c */
|
||||
extern void poly_atan(FPU_REG * st0_ptr, u_char st0_tag, FPU_REG * st1_ptr,
|
||||
extern void poly_atan(FPU_REG * st0_ptr, u_char st0_tag, FPU_REG *st1_ptr,
|
||||
u_char st1_tag);
|
||||
/* poly_l2.c */
|
||||
extern void poly_l2(FPU_REG * st0_ptr, FPU_REG * st1_ptr, u_char st1_sign);
|
||||
extern int poly_l2p1(u_char s0, u_char s1, FPU_REG * r0, FPU_REG * r1,
|
||||
extern void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char st1_sign);
|
||||
extern int poly_l2p1(u_char s0, u_char s1, FPU_REG *r0, FPU_REG *r1,
|
||||
FPU_REG * d);
|
||||
/* poly_sin.c */
|
||||
extern void poly_sine(FPU_REG * st0_ptr);
|
||||
extern void poly_cos(FPU_REG * st0_ptr);
|
||||
extern void poly_sine(FPU_REG *st0_ptr);
|
||||
extern void poly_cos(FPU_REG *st0_ptr);
|
||||
/* poly_tan.c */
|
||||
extern void poly_tan(FPU_REG * st0_ptr);
|
||||
extern void poly_tan(FPU_REG *st0_ptr);
|
||||
/* reg_add_sub.c */
|
||||
extern int FPU_add(FPU_REG const *b, u_char tagb, int destrnr, int control_w);
|
||||
extern int FPU_sub(int flags, int rm, int control_w);
|
||||
|
@ -111,34 +111,34 @@ extern void fucompp(void);
|
|||
/* reg_constant.c */
|
||||
extern void fconst(void);
|
||||
/* reg_ld_str.c */
|
||||
extern int FPU_load_extended(long double __user * s, int stnr);
|
||||
extern int FPU_load_double(double __user * dfloat, FPU_REG * loaded_data);
|
||||
extern int FPU_load_single(float __user * single, FPU_REG * loaded_data);
|
||||
extern int FPU_load_int64(long long __user * _s);
|
||||
extern int FPU_load_int32(long __user * _s, FPU_REG * loaded_data);
|
||||
extern int FPU_load_int16(short __user * _s, FPU_REG * loaded_data);
|
||||
extern int FPU_load_bcd(u_char __user * s);
|
||||
extern int FPU_store_extended(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
extern int FPU_load_extended(long double __user *s, int stnr);
|
||||
extern int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data);
|
||||
extern int FPU_load_single(float __user *single, FPU_REG *loaded_data);
|
||||
extern int FPU_load_int64(long long __user *_s);
|
||||
extern int FPU_load_int32(long __user *_s, FPU_REG *loaded_data);
|
||||
extern int FPU_load_int16(short __user *_s, FPU_REG *loaded_data);
|
||||
extern int FPU_load_bcd(u_char __user *s);
|
||||
extern int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
long double __user * d);
|
||||
extern int FPU_store_double(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
double __user * dfloat);
|
||||
extern int FPU_store_single(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
float __user * single);
|
||||
extern int FPU_store_int64(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
long long __user * d);
|
||||
extern int FPU_store_int32(FPU_REG * st0_ptr, u_char st0_tag, long __user * d);
|
||||
extern int FPU_store_int16(FPU_REG * st0_ptr, u_char st0_tag, short __user * d);
|
||||
extern int FPU_store_bcd(FPU_REG * st0_ptr, u_char st0_tag, u_char __user * d);
|
||||
extern int FPU_round_to_int(FPU_REG * r, u_char tag);
|
||||
extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user * s);
|
||||
extern void frstor(fpu_addr_modes addr_modes, u_char __user * data_address);
|
||||
extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user * d);
|
||||
extern void fsave(fpu_addr_modes addr_modes, u_char __user * data_address);
|
||||
extern int FPU_tagof(FPU_REG * ptr);
|
||||
extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d);
|
||||
extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d);
|
||||
extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d);
|
||||
extern int FPU_round_to_int(FPU_REG *r, u_char tag);
|
||||
extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s);
|
||||
extern void frstor(fpu_addr_modes addr_modes, u_char __user *data_address);
|
||||
extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d);
|
||||
extern void fsave(fpu_addr_modes addr_modes, u_char __user *data_address);
|
||||
extern int FPU_tagof(FPU_REG *ptr);
|
||||
/* reg_mul.c */
|
||||
extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
|
||||
|
||||
extern int FPU_div(int flags, int regrm, int control_w);
|
||||
/* reg_convert.c */
|
||||
extern int FPU_to_exp16(FPU_REG const *a, FPU_REG * x);
|
||||
extern int FPU_to_exp16(FPU_REG const *a, FPU_REG *x);
|
||||
#endif /* _FPU_PROTO_H */
|
||||
|
|
|
@ -30,7 +30,7 @@ static void rem_kernel(unsigned long long st0, unsigned long long *y,
|
|||
/* Limited measurements show no results worse than 64 bit precision
|
||||
except for the results for arguments close to 2^63, where the
|
||||
precision of the result sometimes degrades to about 63.9 bits */
|
||||
static int trig_arg(FPU_REG * st0_ptr, int even)
|
||||
static int trig_arg(FPU_REG *st0_ptr, int even)
|
||||
{
|
||||
FPU_REG tmp;
|
||||
u_char tmptag;
|
||||
|
@ -176,7 +176,7 @@ static void convert_l2reg(long const *arg, int deststnr)
|
|||
return;
|
||||
}
|
||||
|
||||
static void single_arg_error(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void single_arg_error(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
if (st0_tag == TAG_Empty)
|
||||
FPU_stack_underflow(); /* Puts a QNaN in st(0) */
|
||||
|
@ -188,7 +188,7 @@ static void single_arg_error(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
#endif /* PARANOID */
|
||||
}
|
||||
|
||||
static void single_arg_2_error(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void single_arg_2_error(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
int isNaN;
|
||||
|
||||
|
@ -229,7 +229,7 @@ static void single_arg_2_error(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
static void f2xm1(FPU_REG * st0_ptr, u_char tag)
|
||||
static void f2xm1(FPU_REG *st0_ptr, u_char tag)
|
||||
{
|
||||
FPU_REG a;
|
||||
|
||||
|
@ -272,7 +272,7 @@ static void f2xm1(FPU_REG * st0_ptr, u_char tag)
|
|||
}
|
||||
}
|
||||
|
||||
static void fptan(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fptan(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st_new_ptr;
|
||||
int q;
|
||||
|
@ -351,7 +351,7 @@ static void fptan(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
single_arg_2_error(st0_ptr, st0_tag);
|
||||
}
|
||||
|
||||
static void fxtract(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fxtract(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st_new_ptr;
|
||||
u_char sign;
|
||||
|
@ -444,7 +444,7 @@ static void fincstp(void)
|
|||
top++;
|
||||
}
|
||||
|
||||
static void fsqrt_(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fsqrt_(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
int expon;
|
||||
|
||||
|
@ -502,7 +502,7 @@ static void fsqrt_(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
|
||||
}
|
||||
|
||||
static void frndint_(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void frndint_(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
int flags, tag;
|
||||
|
||||
|
@ -546,7 +546,7 @@ static void frndint_(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
single_arg_error(st0_ptr, st0_tag);
|
||||
}
|
||||
|
||||
static int fsin(FPU_REG * st0_ptr, u_char tag)
|
||||
static int fsin(FPU_REG *st0_ptr, u_char tag)
|
||||
{
|
||||
u_char arg_sign = getsign(st0_ptr);
|
||||
|
||||
|
@ -607,7 +607,7 @@ static int fsin(FPU_REG * st0_ptr, u_char tag)
|
|||
}
|
||||
}
|
||||
|
||||
static int f_cos(FPU_REG * st0_ptr, u_char tag)
|
||||
static int f_cos(FPU_REG *st0_ptr, u_char tag)
|
||||
{
|
||||
u_char st0_sign;
|
||||
|
||||
|
@ -677,12 +677,12 @@ static int f_cos(FPU_REG * st0_ptr, u_char tag)
|
|||
}
|
||||
}
|
||||
|
||||
static void fcos(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fcos(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
f_cos(st0_ptr, st0_tag);
|
||||
}
|
||||
|
||||
static void fsincos(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fsincos(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st_new_ptr;
|
||||
FPU_REG arg;
|
||||
|
@ -775,7 +775,7 @@ static void rem_kernel(unsigned long long st0, unsigned long long *y,
|
|||
/* Remainder of st(0) / st(1) */
|
||||
/* This routine produces exact results, i.e. there is never any
|
||||
rounding or truncation, etc of the result. */
|
||||
static void do_fprem(FPU_REG * st0_ptr, u_char st0_tag, int round)
|
||||
static void do_fprem(FPU_REG *st0_ptr, u_char st0_tag, int round)
|
||||
{
|
||||
FPU_REG *st1_ptr = &st(1);
|
||||
u_char st1_tag = FPU_gettagi(1);
|
||||
|
@ -1017,7 +1017,7 @@ static void do_fprem(FPU_REG * st0_ptr, u_char st0_tag, int round)
|
|||
}
|
||||
|
||||
/* ST(1) <- ST(1) * log ST; pop ST */
|
||||
static void fyl2x(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fyl2x(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st1_ptr = &st(1), exponent;
|
||||
u_char st1_tag = FPU_gettagi(1);
|
||||
|
@ -1188,7 +1188,7 @@ static void fyl2x(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
FPU_pop();
|
||||
}
|
||||
|
||||
static void fpatan(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fpatan(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st1_ptr = &st(1);
|
||||
u_char st1_tag = FPU_gettagi(1);
|
||||
|
@ -1298,17 +1298,17 @@ static void fpatan(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
set_precision_flag_up(); /* We do not really know if up or down */
|
||||
}
|
||||
|
||||
static void fprem(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fprem(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
do_fprem(st0_ptr, st0_tag, RC_CHOP);
|
||||
}
|
||||
|
||||
static void fprem1(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fprem1(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
do_fprem(st0_ptr, st0_tag, RC_RND);
|
||||
}
|
||||
|
||||
static void fyl2xp1(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fyl2xp1(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
u_char sign, sign1;
|
||||
FPU_REG *st1_ptr = &st(1), a, b;
|
||||
|
@ -1477,7 +1477,7 @@ static void fyl2xp1(FPU_REG * st0_ptr, u_char st0_tag)
|
|||
|
||||
}
|
||||
|
||||
static void fscale(FPU_REG * st0_ptr, u_char st0_tag)
|
||||
static void fscale(FPU_REG *st0_ptr, u_char st0_tag)
|
||||
{
|
||||
FPU_REG *st1_ptr = &st(1);
|
||||
u_char st1_tag = FPU_gettagi(1);
|
||||
|
|
|
@ -33,12 +33,12 @@ asmlinkage void polynomial_Xsig(Xsig *, const unsigned long long *x,
|
|||
|
||||
asmlinkage void mul32_Xsig(Xsig *, const unsigned long mult);
|
||||
asmlinkage void mul64_Xsig(Xsig *, const unsigned long long *mult);
|
||||
asmlinkage void mul_Xsig_Xsig(Xsig * dest, const Xsig * mult);
|
||||
asmlinkage void mul_Xsig_Xsig(Xsig *dest, const Xsig *mult);
|
||||
|
||||
asmlinkage void shr_Xsig(Xsig *, const int n);
|
||||
asmlinkage int round_Xsig(Xsig *);
|
||||
asmlinkage int norm_Xsig(Xsig *);
|
||||
asmlinkage void div_Xsig(Xsig * x1, const Xsig * x2, const Xsig * dest);
|
||||
asmlinkage void div_Xsig(Xsig *x1, const Xsig *x2, const Xsig *dest);
|
||||
|
||||
/* Macro to extract the most significant 32 bits from a long long */
|
||||
#define LL_MSW(x) (((unsigned long *)&x)[1])
|
||||
|
@ -70,7 +70,7 @@ static inline unsigned long mul_32_32(const unsigned long arg1,
|
|||
}
|
||||
|
||||
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
|
||||
static inline void add_Xsig_Xsig(Xsig * dest, const Xsig * x2)
|
||||
static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
|
||||
{
|
||||
asm volatile ("movl %1,%%edi; movl %2,%%esi;\n"
|
||||
"movl (%%esi),%%eax; addl %%eax,(%%edi);\n"
|
||||
|
@ -84,7 +84,7 @@ static inline void add_Xsig_Xsig(Xsig * dest, const Xsig * x2)
|
|||
/* Note: the constraints in the asm statement didn't always work properly
|
||||
with gcc 2.5.8. Changing from using edi to using ecx got around the
|
||||
problem, but keep fingers crossed! */
|
||||
static inline void add_two_Xsig(Xsig * dest, const Xsig * x2, long int *exp)
|
||||
static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, long int *exp)
|
||||
{
|
||||
asm volatile ("movl %2,%%ecx; movl %3,%%esi;\n"
|
||||
"movl (%%esi),%%eax; addl %%eax,(%%ecx);\n"
|
||||
|
@ -101,7 +101,7 @@ static inline void add_two_Xsig(Xsig * dest, const Xsig * x2, long int *exp)
|
|||
|
||||
/* Negate (subtract from 1.0) the 12 byte Xsig */
|
||||
/* This is faster in a loop on my 386 than using the "neg" instruction. */
|
||||
static inline void negate_Xsig(Xsig * x)
|
||||
static inline void negate_Xsig(Xsig *x)
|
||||
{
|
||||
asm volatile ("movl %1,%%esi;\n"
|
||||
"xorl %%ecx,%%ecx;\n"
|
||||
|
|
|
@ -49,7 +49,7 @@ static const Xsig *shiftterm[] = { &shiftterm0, &shiftterm1,
|
|||
/*--- poly_2xm1() -----------------------------------------------------------+
|
||||
| Requires st(0) which is TAG_Valid and < 1. |
|
||||
+---------------------------------------------------------------------------*/
|
||||
int poly_2xm1(u_char sign, FPU_REG * arg, FPU_REG * result)
|
||||
int poly_2xm1(u_char sign, FPU_REG *arg, FPU_REG *result)
|
||||
{
|
||||
long int exponent, shift;
|
||||
unsigned long long Xll;
|
||||
|
|
|
@ -48,8 +48,8 @@ static const Xsig pi_signif = MK_XSIG(0xc90fdaa2, 0x2168c234, 0xc4c6628b);
|
|||
/*--- poly_atan() -----------------------------------------------------------+
|
||||
| |
|
||||
+---------------------------------------------------------------------------*/
|
||||
void poly_atan(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
FPU_REG * st1_ptr, u_char st1_tag)
|
||||
void poly_atan(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
FPU_REG *st1_ptr, u_char st1_tag)
|
||||
{
|
||||
u_char transformed, inverted, sign1, sign2;
|
||||
int exponent;
|
||||
|
|
|
@ -23,7 +23,7 @@ static void log2_kernel(FPU_REG const *arg, u_char argsign,
|
|||
/*--- poly_l2() -------------------------------------------------------------+
|
||||
| Base 2 logarithm by a polynomial approximation. |
|
||||
+---------------------------------------------------------------------------*/
|
||||
void poly_l2(FPU_REG * st0_ptr, FPU_REG * st1_ptr, u_char st1_sign)
|
||||
void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char st1_sign)
|
||||
{
|
||||
long int exponent, expon, expon_expon;
|
||||
Xsig accumulator, expon_accum, yaccum;
|
||||
|
@ -178,7 +178,7 @@ static const unsigned long leadterm = 0xb8000000;
|
|||
| Base 2 logarithm by a polynomial approximation. |
|
||||
| log2(x+1) |
|
||||
+---------------------------------------------------------------------------*/
|
||||
static void log2_kernel(FPU_REG const *arg, u_char argsign, Xsig * accum_result,
|
||||
static void log2_kernel(FPU_REG const *arg, u_char argsign, Xsig *accum_result,
|
||||
long int *expon)
|
||||
{
|
||||
long int exponent, adj;
|
||||
|
|
|
@ -54,7 +54,7 @@ static const unsigned long long neg_terms_h[N_COEFF_NH] = {
|
|||
/*--- poly_sine() -----------------------------------------------------------+
|
||||
| |
|
||||
+---------------------------------------------------------------------------*/
|
||||
void poly_sine(FPU_REG * st0_ptr)
|
||||
void poly_sine(FPU_REG *st0_ptr)
|
||||
{
|
||||
int exponent, echange;
|
||||
Xsig accumulator, argSqrd, argTo4;
|
||||
|
@ -197,7 +197,7 @@ void poly_sine(FPU_REG * st0_ptr)
|
|||
/*--- poly_cos() ------------------------------------------------------------+
|
||||
| |
|
||||
+---------------------------------------------------------------------------*/
|
||||
void poly_cos(FPU_REG * st0_ptr)
|
||||
void poly_cos(FPU_REG *st0_ptr)
|
||||
{
|
||||
FPU_REG result;
|
||||
long int exponent, exp2, echange;
|
||||
|
|
|
@ -47,7 +47,7 @@ static const unsigned long long twothirds = 0xaaaaaaaaaaaaaaabLL;
|
|||
/*--- poly_tan() ------------------------------------------------------------+
|
||||
| |
|
||||
+---------------------------------------------------------------------------*/
|
||||
void poly_tan(FPU_REG * st0_ptr)
|
||||
void poly_tan(FPU_REG *st0_ptr)
|
||||
{
|
||||
long int exponent;
|
||||
int invert;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "exception.h"
|
||||
#include "fpu_emu.h"
|
||||
|
||||
int FPU_to_exp16(FPU_REG const *a, FPU_REG * x)
|
||||
int FPU_to_exp16(FPU_REG const *a, FPU_REG *x)
|
||||
{
|
||||
int sign = getsign(a);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define SINGLE_Ebias 127
|
||||
#define SINGLE_Emin (-126) /* smallest valid exponent */
|
||||
|
||||
static u_char normalize_no_excep(FPU_REG * r, int exp, int sign)
|
||||
static u_char normalize_no_excep(FPU_REG *r, int exp, int sign)
|
||||
{
|
||||
u_char tag;
|
||||
|
||||
|
@ -49,7 +49,7 @@ static u_char normalize_no_excep(FPU_REG * r, int exp, int sign)
|
|||
return tag;
|
||||
}
|
||||
|
||||
int FPU_tagof(FPU_REG * ptr)
|
||||
int FPU_tagof(FPU_REG *ptr)
|
||||
{
|
||||
int exp;
|
||||
|
||||
|
@ -78,7 +78,7 @@ int FPU_tagof(FPU_REG * ptr)
|
|||
}
|
||||
|
||||
/* Get a long double from user memory */
|
||||
int FPU_load_extended(long double __user * s, int stnr)
|
||||
int FPU_load_extended(long double __user *s, int stnr)
|
||||
{
|
||||
FPU_REG *sti_ptr = &st(stnr);
|
||||
|
||||
|
@ -91,7 +91,7 @@ int FPU_load_extended(long double __user * s, int stnr)
|
|||
}
|
||||
|
||||
/* Get a double from user memory */
|
||||
int FPU_load_double(double __user * dfloat, FPU_REG * loaded_data)
|
||||
int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data)
|
||||
{
|
||||
int exp, tag, negative;
|
||||
unsigned m64, l64;
|
||||
|
@ -152,7 +152,7 @@ int FPU_load_double(double __user * dfloat, FPU_REG * loaded_data)
|
|||
}
|
||||
|
||||
/* Get a float from user memory */
|
||||
int FPU_load_single(float __user * single, FPU_REG * loaded_data)
|
||||
int FPU_load_single(float __user *single, FPU_REG *loaded_data)
|
||||
{
|
||||
unsigned m32;
|
||||
int exp, tag, negative;
|
||||
|
@ -206,7 +206,7 @@ int FPU_load_single(float __user * single, FPU_REG * loaded_data)
|
|||
}
|
||||
|
||||
/* Get a long long from user memory */
|
||||
int FPU_load_int64(long long __user * _s)
|
||||
int FPU_load_int64(long long __user *_s)
|
||||
{
|
||||
long long s;
|
||||
int sign;
|
||||
|
@ -236,7 +236,7 @@ int FPU_load_int64(long long __user * _s)
|
|||
}
|
||||
|
||||
/* Get a long from user memory */
|
||||
int FPU_load_int32(long __user * _s, FPU_REG * loaded_data)
|
||||
int FPU_load_int32(long __user *_s, FPU_REG *loaded_data)
|
||||
{
|
||||
long s;
|
||||
int negative;
|
||||
|
@ -265,7 +265,7 @@ int FPU_load_int32(long __user * _s, FPU_REG * loaded_data)
|
|||
}
|
||||
|
||||
/* Get a short from user memory */
|
||||
int FPU_load_int16(short __user * _s, FPU_REG * loaded_data)
|
||||
int FPU_load_int16(short __user *_s, FPU_REG *loaded_data)
|
||||
{
|
||||
int s, negative;
|
||||
|
||||
|
@ -294,7 +294,7 @@ int FPU_load_int16(short __user * _s, FPU_REG * loaded_data)
|
|||
}
|
||||
|
||||
/* Get a packed bcd array from user memory */
|
||||
int FPU_load_bcd(u_char __user * s)
|
||||
int FPU_load_bcd(u_char __user *s)
|
||||
{
|
||||
FPU_REG *st0_ptr = &st(0);
|
||||
int pos;
|
||||
|
@ -333,7 +333,7 @@ int FPU_load_bcd(u_char __user * s)
|
|||
/*===========================================================================*/
|
||||
|
||||
/* Put a long double into user memory */
|
||||
int FPU_store_extended(FPU_REG * st0_ptr, u_char st0_tag,
|
||||
int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag,
|
||||
long double __user * d)
|
||||
{
|
||||
/*
|
||||
|
@ -375,7 +375,7 @@ int FPU_store_extended(FPU_REG * st0_ptr, u_char st0_tag,
|
|||
}
|
||||
|
||||
/* Put a double into user memory */
|
||||
int FPU_store_double(FPU_REG * st0_ptr, u_char st0_tag, double __user * dfloat)
|
||||
int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double __user *dfloat)
|
||||
{
|
||||
unsigned long l[2];
|
||||
unsigned long increment = 0; /* avoid gcc warnings */
|
||||
|
@ -565,7 +565,7 @@ int FPU_store_double(FPU_REG * st0_ptr, u_char st0_tag, double __user * dfloat)
|
|||
}
|
||||
|
||||
/* Put a float into user memory */
|
||||
int FPU_store_single(FPU_REG * st0_ptr, u_char st0_tag, float __user * single)
|
||||
int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float __user *single)
|
||||
{
|
||||
long templ = 0;
|
||||
unsigned long increment = 0; /* avoid gcc warnings */
|
||||
|
@ -754,7 +754,7 @@ int FPU_store_single(FPU_REG * st0_ptr, u_char st0_tag, float __user * single)
|
|||
}
|
||||
|
||||
/* Put a long long into user memory */
|
||||
int FPU_store_int64(FPU_REG * st0_ptr, u_char st0_tag, long long __user * d)
|
||||
int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long __user *d)
|
||||
{
|
||||
FPU_REG t;
|
||||
long long tll;
|
||||
|
@ -804,7 +804,7 @@ int FPU_store_int64(FPU_REG * st0_ptr, u_char st0_tag, long long __user * d)
|
|||
}
|
||||
|
||||
/* Put a long into user memory */
|
||||
int FPU_store_int32(FPU_REG * st0_ptr, u_char st0_tag, long __user * d)
|
||||
int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d)
|
||||
{
|
||||
FPU_REG t;
|
||||
int precision_loss;
|
||||
|
@ -850,7 +850,7 @@ int FPU_store_int32(FPU_REG * st0_ptr, u_char st0_tag, long __user * d)
|
|||
}
|
||||
|
||||
/* Put a short into user memory */
|
||||
int FPU_store_int16(FPU_REG * st0_ptr, u_char st0_tag, short __user * d)
|
||||
int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d)
|
||||
{
|
||||
FPU_REG t;
|
||||
int precision_loss;
|
||||
|
@ -896,7 +896,7 @@ int FPU_store_int16(FPU_REG * st0_ptr, u_char st0_tag, short __user * d)
|
|||
}
|
||||
|
||||
/* Put a packed bcd array into user memory */
|
||||
int FPU_store_bcd(FPU_REG * st0_ptr, u_char st0_tag, u_char __user * d)
|
||||
int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d)
|
||||
{
|
||||
FPU_REG t;
|
||||
unsigned long long ll;
|
||||
|
@ -971,7 +971,7 @@ int FPU_store_bcd(FPU_REG * st0_ptr, u_char st0_tag, u_char __user * d)
|
|||
/* Overflow is signalled by a non-zero return value (in eax).
|
||||
In the case of overflow, the returned significand always has the
|
||||
largest possible value */
|
||||
int FPU_round_to_int(FPU_REG * r, u_char tag)
|
||||
int FPU_round_to_int(FPU_REG *r, u_char tag)
|
||||
{
|
||||
u_char very_big;
|
||||
unsigned eax;
|
||||
|
@ -1028,7 +1028,7 @@ int FPU_round_to_int(FPU_REG * r, u_char tag)
|
|||
|
||||
/*===========================================================================*/
|
||||
|
||||
u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user * s)
|
||||
u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s)
|
||||
{
|
||||
unsigned short tag_word = 0;
|
||||
u_char tag;
|
||||
|
@ -1121,7 +1121,7 @@ u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user * s)
|
|||
return s;
|
||||
}
|
||||
|
||||
void frstor(fpu_addr_modes addr_modes, u_char __user * data_address)
|
||||
void frstor(fpu_addr_modes addr_modes, u_char __user *data_address)
|
||||
{
|
||||
int i, regnr;
|
||||
u_char __user *s = fldenv(addr_modes, data_address);
|
||||
|
@ -1144,7 +1144,7 @@ void frstor(fpu_addr_modes addr_modes, u_char __user * data_address)
|
|||
|
||||
}
|
||||
|
||||
u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user * d)
|
||||
u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d)
|
||||
{
|
||||
if ((addr_modes.default_mode == VM86) ||
|
||||
((addr_modes.default_mode == PM16)
|
||||
|
@ -1200,7 +1200,7 @@ u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user * d)
|
|||
return d;
|
||||
}
|
||||
|
||||
void fsave(fpu_addr_modes addr_modes, u_char __user * data_address)
|
||||
void fsave(fpu_addr_modes addr_modes, u_char __user *data_address)
|
||||
{
|
||||
u_char __user *d;
|
||||
int offset = (top & 7) * 10, other = 80 - offset;
|
||||
|
|
Loading…
Reference in New Issue
Block a user