Skip to content

Commit

Permalink
x86: lindent arch/i386/math-emu, cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 3d0d14f commit e8d591d
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 101 deletions.
6 changes: 3 additions & 3 deletions arch/x86/math-emu/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions arch/x86/math-emu/fpu_emu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/math-emu/fpu_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/math-emu/fpu_etc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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:
Expand Down Expand Up @@ -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) {
Expand Down
62 changes: 31 additions & 31 deletions arch/x86/math-emu/fpu_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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 */
38 changes: 19 additions & 19 deletions arch/x86/math-emu/fpu_trig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) */
Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Loading

0 comments on commit e8d591d

Please sign in to comment.