Commit 9faf0b63 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] x86 math-emu update

From 2.4, mostly just things like quietening compiler warnings.
parent 8f372a59
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
of the stack frame of math_emulate() */ of the stack frame of math_emulate() */
#define SETUP_DATA_AREA(arg) FPU_info = (struct info *) &arg #define SETUP_DATA_AREA(arg) FPU_info = (struct info *) &arg
/* s is always from a cpu register, and the cpu does bounds checking
* during register load --> no further bounds checks needed */
#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3]) #define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
#define SEG_D_SIZE(x) ((x).b & (3 << 21)) #define SEG_D_SIZE(x) ((x).b & (3 << 21))
#define SEG_G_BIT(x) ((x).b & (1 << 23)) #define SEG_G_BIT(x) ((x).b & (1 << 23))
......
...@@ -140,7 +140,7 @@ int FPU_sub(int flags, int rm, int control_w) ...@@ -140,7 +140,7 @@ int FPU_sub(int flags, int rm, int control_w)
FPU_REG const *a, *b; FPU_REG const *a, *b;
FPU_REG *dest; FPU_REG *dest;
u_char taga, tagb, signa, signb, saved_sign, sign; u_char taga, tagb, signa, signb, saved_sign, sign;
int diff, tag, expa, expb, deststnr; int diff, tag = 0, expa, expb, deststnr;
a = &st(0); a = &st(0);
taga = FPU_gettag0(); taga = FPU_gettag0();
......
...@@ -174,7 +174,7 @@ static int compare(FPU_REG const *b, int tagb) ...@@ -174,7 +174,7 @@ static int compare(FPU_REG const *b, int tagb)
/* This function requires that st(0) is not empty */ /* This function requires that st(0) is not empty */
int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag)
{ {
int f, c; int f = 0, c;
c = compare(loaded_data, loaded_tag); c = compare(loaded_data, loaded_tag);
...@@ -216,7 +216,7 @@ int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) ...@@ -216,7 +216,7 @@ int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag)
static int compare_st_st(int nr) static int compare_st_st(int nr)
{ {
int f, c; int f = 0, c;
FPU_REG *st_ptr; FPU_REG *st_ptr;
if ( !NOT_EMPTY(0) || !NOT_EMPTY(nr) ) if ( !NOT_EMPTY(0) || !NOT_EMPTY(nr) )
...@@ -268,7 +268,7 @@ static int compare_st_st(int nr) ...@@ -268,7 +268,7 @@ static int compare_st_st(int nr)
static int compare_u_st_st(int nr) static int compare_u_st_st(int nr)
{ {
int f, c; int f = 0, c;
FPU_REG *st_ptr; FPU_REG *st_ptr;
if ( !NOT_EMPTY(0) || !NOT_EMPTY(nr) ) if ( !NOT_EMPTY(0) || !NOT_EMPTY(nr) )
......
...@@ -203,4 +203,5 @@ int FPU_div(int flags, int rm, int control_w) ...@@ -203,4 +203,5 @@ int FPU_div(int flags, int rm, int control_w)
} }
#endif /* PARANOID */ #endif /* PARANOID */
return 0;
} }
...@@ -632,7 +632,7 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat) ...@@ -632,7 +632,7 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat)
/* Put a float into user memory */ /* Put a float into user memory */
int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single) int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single)
{ {
long templ; long templ = 0;
unsigned long increment = 0; /* avoid gcc warnings */ unsigned long increment = 0; /* avoid gcc warnings */
int precision_loss; int precision_loss;
int exp; int exp;
......
...@@ -128,4 +128,5 @@ int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w) ...@@ -128,4 +128,5 @@ int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w)
} }
#endif /* PARANOID */ #endif /* PARANOID */
return 0;
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef __MATH_EMU_OP_1_H__ #ifndef __MATH_EMU_OP_1_H__
#define __MATH_EMU_OP_1_H__ #define __MATH_EMU_OP_1_H__
#define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f #define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f=0
#define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f) #define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f)
#define _FP_FRAC_SET_1(X,I) (X##_f = I) #define _FP_FRAC_SET_1(X,I) (X##_f = I)
#define _FP_FRAC_HIGH_1(X) (X##_f) #define _FP_FRAC_HIGH_1(X) (X##_f)
......
...@@ -154,11 +154,11 @@ do { \ ...@@ -154,11 +154,11 @@ do { \
#define _FP_CLS_COMBINE(x,y) (((x) << 2) | (y)) #define _FP_CLS_COMBINE(x,y) (((x) << 2) | (y))
#include "op-1.h" #include <math-emu/op-1.h>
#include "op-2.h" #include <math-emu/op-2.h>
#include "op-4.h" #include <math-emu/op-4.h>
#include "op-8.h" #include <math-emu/op-8.h>
#include "op-common.h" #include <math-emu/op-common.h>
/* Sigh. Silly things longlong.h needs. */ /* Sigh. Silly things longlong.h needs. */
#define UWtype _FP_W_TYPE #define UWtype _FP_W_TYPE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment