Commit 56177d2a authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: i387 math-emu annotation

arch/i386/math-emu/* annotated.
parent 0fd81bef
......@@ -41,18 +41,18 @@ void Un_impl(void)
RE_ENTRANT_CHECK_OFF;
/* No need to verify_area(), we have previously fetched these bytes. */
printk("Unimplemented FPU Opcode at eip=%p : ", (void *) address);
printk("Unimplemented FPU Opcode at eip=%p : ", (void __user *) address);
if ( FPU_CS == __USER_CS )
{
while ( 1 )
{
FPU_get_user(byte1, (u_char *) address);
FPU_get_user(byte1, (u_char __user *) address);
if ( (byte1 & 0xf8) == 0xd8 ) break;
printk("[%02x]", byte1);
address++;
}
printk("%02x ", byte1);
FPU_get_user(FPU_modrm, 1 + (u_char *) address);
FPU_get_user(FPU_modrm, 1 + (u_char __user *) address);
if (FPU_modrm >= 0300)
printk("%02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
......@@ -98,7 +98,7 @@ void FPU_printall(void)
#define MAX_PRINTED_BYTES 20
for ( i = 0; i < MAX_PRINTED_BYTES; i++ )
{
FPU_get_user(byte1, (u_char *) address);
FPU_get_user(byte1, (u_char __user *) address);
if ( (byte1 & 0xf8) == 0xd8 )
{
printk(" %02x", byte1);
......@@ -111,7 +111,7 @@ void FPU_printall(void)
printk(" [more..]\n");
else
{
FPU_get_user(FPU_modrm, 1 + (u_char *) address);
FPU_get_user(FPU_modrm, 1 + (u_char __user *) address);
if (FPU_modrm >= 0300)
printk(" %02x (%02x+%d)\n", FPU_modrm, FPU_modrm & 0xf8, FPU_modrm & 7);
......
......@@ -16,7 +16,7 @@
#include "status_w.h"
void fadd__()
void fadd__(void)
{
/* fadd st,st(i) */
int i = FPU_rm;
......@@ -25,7 +25,7 @@ void fadd__()
}
void fmul__()
void fmul__(void)
{
/* fmul st,st(i) */
int i = FPU_rm;
......@@ -35,7 +35,7 @@ void fmul__()
void fsub__()
void fsub__(void)
{
/* fsub st,st(i) */
clear_C1();
......@@ -43,7 +43,7 @@ void fsub__()
}
void fsubr_()
void fsubr_(void)
{
/* fsubr st,st(i) */
clear_C1();
......@@ -51,7 +51,7 @@ void fsubr_()
}
void fdiv__()
void fdiv__(void)
{
/* fdiv st,st(i) */
clear_C1();
......@@ -59,7 +59,7 @@ void fdiv__()
}
void fdivr_()
void fdivr_(void)
{
/* fdivr st,st(i) */
clear_C1();
......@@ -68,7 +68,7 @@ void fdivr_()
void fadd_i()
void fadd_i(void)
{
/* fadd st(i),st */
int i = FPU_rm;
......@@ -77,7 +77,7 @@ void fadd_i()
}
void fmul_i()
void fmul_i(void)
{
/* fmul st(i),st */
clear_C1();
......@@ -85,7 +85,7 @@ void fmul_i()
}
void fsubri()
void fsubri(void)
{
/* fsubr st(i),st */
clear_C1();
......@@ -93,7 +93,7 @@ void fsubri()
}
void fsub_i()
void fsub_i(void)
{
/* fsub st(i),st */
clear_C1();
......@@ -101,7 +101,7 @@ void fsub_i()
}
void fdivri()
void fdivri(void)
{
/* fdivr st(i),st */
clear_C1();
......@@ -109,7 +109,7 @@ void fdivri()
}
void fdiv_i()
void fdiv_i(void)
{
/* fdiv st(i),st */
clear_C1();
......@@ -118,7 +118,7 @@ void fdiv_i()
void faddp_()
void faddp_(void)
{
/* faddp st(i),st */
int i = FPU_rm;
......@@ -128,7 +128,7 @@ void faddp_()
}
void fmulp_()
void fmulp_(void)
{
/* fmulp st(i),st */
clear_C1();
......@@ -138,7 +138,7 @@ void fmulp_()
void fsubrp()
void fsubrp(void)
{
/* fsubrp st(i),st */
clear_C1();
......@@ -147,7 +147,7 @@ void fsubrp()
}
void fsubp_()
void fsubp_(void)
{
/* fsubp st(i),st */
clear_C1();
......@@ -156,7 +156,7 @@ void fsubp_()
}
void fdivrp()
void fdivrp(void)
{
/* fdivrp st(i),st */
clear_C1();
......@@ -165,7 +165,7 @@ void fdivrp()
}
void fdivp_()
void fdivp_(void)
{
/* fdivp st(i),st */
clear_C1();
......
......@@ -30,7 +30,7 @@ void fclex(void)
}
/* Needs to be externally visible */
void finit()
void finit(void)
{
control_word = 0x037f;
partial_status = 0;
......@@ -58,7 +58,7 @@ static FUNC const finit_table[] = {
fsetpm, FPU_illegal, FPU_illegal, FPU_illegal
};
void finit_()
void finit_(void)
{
(finit_table[FPU_rm])();
}
......@@ -75,7 +75,7 @@ static FUNC const fstsw_table[] = {
FPU_illegal, FPU_illegal, FPU_illegal, FPU_illegal
};
void fstsw_()
void fstsw_(void)
{
(fstsw_table[FPU_rm])();
}
......@@ -86,13 +86,13 @@ static FUNC const fp_nop_table[] = {
FPU_illegal, FPU_illegal, FPU_illegal, FPU_illegal
};
void fp_nop()
void fp_nop(void)
{
(fp_nop_table[FPU_rm])();
}
void fld_i_()
void fld_i_(void)
{
FPU_REG *st_new_ptr;
int i;
......@@ -124,7 +124,7 @@ void fld_i_()
}
void fxch_i()
void fxch_i(void)
{
/* fxch st(i) */
FPU_REG t;
......@@ -173,14 +173,14 @@ void fxch_i()
}
void ffree_()
void ffree_(void)
{
/* ffree st(i) */
FPU_settagi(FPU_rm, TAG_Empty);
}
void ffreep()
void ffreep(void)
{
/* ffree st(i) + pop - unofficial code */
FPU_settagi(FPU_rm, TAG_Empty);
......@@ -188,14 +188,14 @@ void ffreep()
}
void fst_i_()
void fst_i_(void)
{
/* fst st(i) */
FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm);
}
void fstp_i()
void fstp_i(void)
{
/* fstp st(i) */
FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm);
......
......@@ -128,7 +128,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 **fpu_eip,
static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
overrides *override);
asmlinkage void math_emulate(long arg)
......@@ -140,7 +140,7 @@ asmlinkage void math_emulate(long arg)
FPU_REG loaded_data;
FPU_REG *st0_ptr;
u_char loaded_tag, st0_tag;
void *data_address;
void __user *data_address;
struct address data_sel_off;
struct address entry_sel_off;
unsigned long code_base = 0;
......@@ -192,7 +192,8 @@ asmlinkage void math_emulate(long arg)
math_abort(FPU_info, SIGILL);
}
if ( SEG_D_SIZE(code_descriptor = LDT_DESCRIPTOR(FPU_CS)) )
code_descriptor = LDT_DESCRIPTOR(FPU_CS);
if ( SEG_D_SIZE(code_descriptor) )
{
/* The above test may be wrong, the book is not clear */
/* Segmented 32 bit protected mode */
......@@ -214,7 +215,7 @@ asmlinkage void math_emulate(long arg)
if (current->ptrace & PT_PTRACED)
FPU_lookahead = 0;
if ( !valid_prefix(&byte1, (u_char **)&FPU_EIP,
if ( !valid_prefix(&byte1, (u_char __user **)&FPU_EIP,
&addr_modes.override) )
{
RE_ENTRANT_CHECK_OFF;
......@@ -257,7 +258,7 @@ asmlinkage void math_emulate(long arg)
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(1);
FPU_get_user(FPU_modrm, (u_char *) FPU_EIP);
FPU_get_user(FPU_modrm, (u_char __user *) FPU_EIP);
RE_ENTRANT_CHECK_ON;
FPU_EIP++;
......@@ -336,23 +337,23 @@ asmlinkage void math_emulate(long arg)
switch ( (byte1 >> 1) & 3 )
{
case 0:
unmasked = FPU_load_single((float *)data_address,
unmasked = FPU_load_single((float __user *)data_address,
&loaded_data);
loaded_tag = unmasked & 0xff;
unmasked &= ~0xff;
break;
case 1:
loaded_tag = FPU_load_int32((long *)data_address, &loaded_data);
loaded_tag = FPU_load_int32((long __user *)data_address, &loaded_data);
break;
case 2:
unmasked = FPU_load_double((double *)data_address,
unmasked = FPU_load_double((double __user *)data_address,
&loaded_data);
loaded_tag = unmasked & 0xff;
unmasked &= ~0xff;
break;
case 3:
default: /* Used here to suppress gcc warnings. */
loaded_tag = FPU_load_int16((short *)data_address, &loaded_data);
loaded_tag = FPU_load_int16((short __user *)data_address, &loaded_data);
break;
}
......@@ -563,7 +564,7 @@ asmlinkage void math_emulate(long arg)
if (FPU_lookahead && !need_resched())
{
FPU_ORIG_EIP = FPU_EIP - code_base;
if ( valid_prefix(&byte1, (u_char **)&FPU_EIP,
if ( valid_prefix(&byte1, (u_char __user **)&FPU_EIP,
&addr_modes.override) )
goto do_another_FPU_instruction;
}
......@@ -579,11 +580,11 @@ 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 **fpu_eip,
static int valid_prefix(u_char *Byte, u_char __user **fpu_eip,
overrides *override)
{
u_char byte;
u_char *ip = *fpu_eip;
u_char __user *ip = *fpu_eip;
*override = (overrides) { 0, 0, PREFIX_DEFAULT }; /* defaults */
......@@ -679,9 +680,9 @@ 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 *buf)
int restore_i387_soft(void *s387, struct _fpstate __user *buf)
{
u_char *d = (u_char *)buf;
u_char __user *d = (u_char __user *)buf;
int offset, other, i, tags, regnr, tag, newtop;
RE_ENTRANT_CHECK_OFF;
......@@ -725,9 +726,9 @@ int restore_i387_soft(void *s387, struct _fpstate *buf)
}
int save_i387_soft(void *s387, struct _fpstate * buf)
int save_i387_soft(void *s387, struct _fpstate __user * buf)
{
u_char *d = (u_char *)buf;
u_char __user *d = (u_char __user *)buf;
int offset = (S387->ftop & 7) * 10, other = 80 - offset;
RE_ENTRANT_CHECK_OFF;
......
......@@ -137,7 +137,7 @@ static FUNC_ST0 const fp_etc_table[] = {
ftst_, fxam, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal
};
void FPU_etc()
void FPU_etc(void)
{
(fp_etc_table[FPU_rm])(&st(0), FPU_gettag0());
}
......@@ -77,13 +77,13 @@ extern void FPU_copy_to_reg0(FPU_REG const *r, u_char tag);
extern void FPU_triga(void);
extern void FPU_trigb(void);
/* get_address.c */
extern void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
extern void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
struct address *addr, fpu_addr_modes addr_modes);
extern void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
extern void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
struct address *addr, fpu_addr_modes addr_modes);
/* load_store.c */
extern int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
void *data_address);
void __user *data_address);
/* poly_2xm1.c */
extern int poly_2xm1(u_char sign, FPU_REG *arg, FPU_REG *result);
/* poly_atan.c */
......@@ -112,26 +112,26 @@ extern void fucompp(void);
/* reg_constant.c */
extern void fconst(void);
/* reg_ld_str.c */
extern int FPU_load_extended(long double *s, int stnr);
extern int FPU_load_double(double *dfloat, FPU_REG *loaded_data);
extern int FPU_load_single(float *single, FPU_REG *loaded_data);
extern int FPU_load_int64(long long *_s);
extern int FPU_load_int32(long *_s, FPU_REG *loaded_data);
extern int FPU_load_int16(short *_s, FPU_REG *loaded_data);
extern int FPU_load_bcd(u_char *s);
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 *d);
extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat);
extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single);
extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d);
extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d);
extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d);
extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d);
long double __user *d);
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, float __user *single);
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 *fldenv(fpu_addr_modes addr_modes, u_char *s);
extern void frstor(fpu_addr_modes addr_modes, u_char *data_address);
extern u_char *fstenv(fpu_addr_modes addr_modes, u_char *d);
extern void fsave(fpu_addr_modes addr_modes, u_char *data_address);
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);
......
......@@ -80,7 +80,7 @@
/* A simpler test than verify_area() can probably be done for
FPU_code_verify_area() because the only possible error is to step
past the upper boundary of a legal code area. */
#define FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void *)FPU_EIP,z)
#define FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void __user *)FPU_EIP,z)
#endif
#define FPU_get_user(x,y) get_user((x),(y))
......
......@@ -82,7 +82,7 @@ static int sib(int mod, unsigned long *fpu_eip)
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(1);
FPU_get_user(base, (u_char *) (*fpu_eip)); /* The SIB byte */
FPU_get_user(base, (u_char __user *) (*fpu_eip)); /* The SIB byte */
RE_ENTRANT_CHECK_ON;
(*fpu_eip)++;
ss = base >> 6;
......@@ -112,7 +112,7 @@ static int sib(int mod, unsigned long *fpu_eip)
long displacement;
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(1);
FPU_get_user(displacement, (signed char *) (*fpu_eip));
FPU_get_user(displacement, (signed char __user *) (*fpu_eip));
offset += displacement;
RE_ENTRANT_CHECK_ON;
(*fpu_eip)++;
......@@ -123,7 +123,7 @@ static int sib(int mod, unsigned long *fpu_eip)
long displacement;
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(4);
FPU_get_user(displacement, (long *) (*fpu_eip));
FPU_get_user(displacement, (long __user *) (*fpu_eip));
offset += displacement;
RE_ENTRANT_CHECK_ON;
(*fpu_eip) += 4;
......@@ -241,7 +241,7 @@ static long pm_address(u_char FPU_modrm, u_char segment,
*/
void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
struct address *addr,
fpu_addr_modes addr_modes)
{
......@@ -277,24 +277,24 @@ void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
/* Special case: disp32 */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(4);
FPU_get_user(address, (unsigned long *) (*fpu_eip));
FPU_get_user(address, (unsigned long __user *) (*fpu_eip));
(*fpu_eip) += 4;
RE_ENTRANT_CHECK_ON;
addr->offset = address;
return (void *) address;
return (void __user *) address;
}
else
{
address = *cpu_reg_ptr; /* Just return the contents
of the cpu register */
addr->offset = address;
return (void *) address;
return (void __user *) address;
}
case 1:
/* 8 bit signed displacement */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(1);
FPU_get_user(address, (signed char *) (*fpu_eip));
FPU_get_user(address, (signed char __user *) (*fpu_eip));
RE_ENTRANT_CHECK_ON;
(*fpu_eip)++;
break;
......@@ -302,7 +302,7 @@ void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
/* 32 bit displacement */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(4);
FPU_get_user(address, (long *) (*fpu_eip));
FPU_get_user(address, (long __user *) (*fpu_eip));
(*fpu_eip) += 4;
RE_ENTRANT_CHECK_ON;
break;
......@@ -331,11 +331,11 @@ void *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
EXCEPTION(EX_INTERNAL|0x133);
}
return (void *)address;
return (void __user *)address;
}
void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
struct address *addr,
fpu_addr_modes addr_modes)
{
......@@ -363,7 +363,7 @@ void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
/* Special case: disp16 */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(2);
FPU_get_user(address, (unsigned short *) (*fpu_eip));
FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
(*fpu_eip) += 2;
RE_ENTRANT_CHECK_ON;
goto add_segment;
......@@ -373,7 +373,7 @@ void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
/* 8 bit signed displacement */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(1);
FPU_get_user(address, (signed char *) (*fpu_eip));
FPU_get_user(address, (signed char __user *) (*fpu_eip));
RE_ENTRANT_CHECK_ON;
(*fpu_eip)++;
break;
......@@ -381,7 +381,7 @@ void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
/* 16 bit displacement */
RE_ENTRANT_CHECK_OFF;
FPU_code_verify_area(2);
FPU_get_user(address, (unsigned short *) (*fpu_eip));
FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
(*fpu_eip) += 2;
RE_ENTRANT_CHECK_ON;
break;
......@@ -445,5 +445,5 @@ void *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
EXCEPTION(EX_INTERNAL|0x131);
}
return (void *)address ;
return (void __user *)address ;
}
......@@ -61,7 +61,7 @@ u_char const data_sizes_32[32] = {
};
int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
void *data_address)
void __user *data_address)
{
FPU_REG loaded_data;
FPU_REG *st0_ptr;
......@@ -119,7 +119,7 @@ int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
{
case 000: /* fld m32real */
clear_C1();
loaded_tag = FPU_load_single((float *)data_address, &loaded_data);
loaded_tag = FPU_load_single((float __user *)data_address, &loaded_data);
if ( (loaded_tag == TAG_Special)
&& isNaN(&loaded_data)
&& (real_1op_NaN(&loaded_data) < 0) )
......@@ -131,12 +131,12 @@ int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
break;
case 001: /* fild m32int */
clear_C1();
loaded_tag = FPU_load_int32((long *)data_address, &loaded_data);
loaded_tag = FPU_load_int32((long __user *)data_address, &loaded_data);
FPU_copy_to_reg0(&loaded_data, loaded_tag);
break;
case 002: /* fld m64real */
clear_C1();
loaded_tag = FPU_load_double((double *)data_address, &loaded_data);
loaded_tag = FPU_load_double((double __user *)data_address, &loaded_data);
if ( (loaded_tag == TAG_Special)
&& isNaN(&loaded_data)
&& (real_1op_NaN(&loaded_data) < 0) )
......@@ -148,68 +148,68 @@ int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
break;
case 003: /* fild m16int */
clear_C1();
loaded_tag = FPU_load_int16((short *)data_address, &loaded_data);
loaded_tag = FPU_load_int16((short __user *)data_address, &loaded_data);
FPU_copy_to_reg0(&loaded_data, loaded_tag);
break;
case 010: /* fst m32real */
clear_C1();
FPU_store_single(st0_ptr, st0_tag, (float *)data_address);
FPU_store_single(st0_ptr, st0_tag, (float __user *)data_address);
break;
case 011: /* fist m32int */
clear_C1();
FPU_store_int32(st0_ptr, st0_tag, (long *)data_address);
FPU_store_int32(st0_ptr, st0_tag, (long __user *)data_address);
break;
case 012: /* fst m64real */
clear_C1();
FPU_store_double(st0_ptr, st0_tag, (double *)data_address);
FPU_store_double(st0_ptr, st0_tag, (double __user *)data_address);
break;
case 013: /* fist m16int */
clear_C1();
FPU_store_int16(st0_ptr, st0_tag, (short *)data_address);
FPU_store_int16(st0_ptr, st0_tag, (short __user *)data_address);
break;
case 014: /* fstp m32real */
clear_C1();
if ( FPU_store_single(st0_ptr, st0_tag, (float *)data_address) )
if ( FPU_store_single(st0_ptr, st0_tag, (float __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 015: /* fistp m32int */
clear_C1();
if ( FPU_store_int32(st0_ptr, st0_tag, (long *)data_address) )
if ( FPU_store_int32(st0_ptr, st0_tag, (long __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 016: /* fstp m64real */
clear_C1();
if ( FPU_store_double(st0_ptr, st0_tag, (double *)data_address) )
if ( FPU_store_double(st0_ptr, st0_tag, (double __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 017: /* fistp m16int */
clear_C1();
if ( FPU_store_int16(st0_ptr, st0_tag, (short *)data_address) )
if ( FPU_store_int16(st0_ptr, st0_tag, (short __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 020: /* fldenv m14/28byte */
fldenv(addr_modes, (u_char *)data_address);
fldenv(addr_modes, (u_char __user *)data_address);
/* Ensure that the values just loaded are not changed by
fix-up operations. */
return 1;
case 022: /* frstor m94/108byte */
frstor(addr_modes, (u_char *)data_address);
frstor(addr_modes, (u_char __user *)data_address);
/* Ensure that the values just loaded are not changed by
fix-up operations. */
return 1;
case 023: /* fbld m80dec */
clear_C1();
loaded_tag = FPU_load_bcd((u_char *)data_address);
loaded_tag = FPU_load_bcd((u_char __user *)data_address);
FPU_settag0(loaded_tag);
break;
case 024: /* fldcw */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_READ, data_address, 2);
FPU_get_user(control_word, (unsigned short *) data_address);
FPU_get_user(control_word, (unsigned short __user *) data_address);
RE_ENTRANT_CHECK_ON;
if ( partial_status & ~control_word & CW_Exceptions )
partial_status |= (SW_Summary | SW_Backward);
......@@ -221,47 +221,47 @@ int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
return 1;
case 025: /* fld m80real */
clear_C1();
loaded_tag = FPU_load_extended((long double *)data_address, 0);
loaded_tag = FPU_load_extended((long double __user *)data_address, 0);
FPU_settag0(loaded_tag);
break;
case 027: /* fild m64int */
clear_C1();
loaded_tag = FPU_load_int64((long long *)data_address);
loaded_tag = FPU_load_int64((long long __user *)data_address);
FPU_settag0(loaded_tag);
break;
case 030: /* fstenv m14/28byte */
fstenv(addr_modes, (u_char *)data_address);
fstenv(addr_modes, (u_char __user *)data_address);
return 1;
case 032: /* fsave */
fsave(addr_modes, (u_char *)data_address);
fsave(addr_modes, (u_char __user *)data_address);
return 1;
case 033: /* fbstp m80dec */
clear_C1();
if ( FPU_store_bcd(st0_ptr, st0_tag, (u_char *)data_address) )
if ( FPU_store_bcd(st0_ptr, st0_tag, (u_char __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 034: /* fstcw m16int */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,data_address,2);
FPU_put_user(control_word, (unsigned short *) data_address);
FPU_put_user(control_word, (unsigned short __user *) data_address);
RE_ENTRANT_CHECK_ON;
return 1;
case 035: /* fstp m80real */
clear_C1();
if ( FPU_store_extended(st0_ptr, st0_tag, (long double *)data_address) )
if ( FPU_store_extended(st0_ptr, st0_tag, (long double __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
case 036: /* fstsw m2byte */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,data_address,2);
FPU_put_user(status_word(),(unsigned short *) data_address);
FPU_put_user(status_word(),(unsigned short __user *) data_address);
RE_ENTRANT_CHECK_ON;
return 1;
case 037: /* fistp m64int */
clear_C1();
if ( FPU_store_int64(st0_ptr, st0_tag, (long long *)data_address) )
if ( FPU_store_int64(st0_ptr, st0_tag, (long long __user *)data_address) )
pop_0(); /* pop only if the number was actually stored
(see the 80486 manual p16-28) */
break;
......
......@@ -324,14 +324,14 @@ static int compare_u_st_st(int nr)
/*---------------------------------------------------------------------------*/
void fcom_st()
void fcom_st(void)
{
/* fcom st(i) */
compare_st_st(FPU_rm);
}
void fcompst()
void fcompst(void)
{
/* fcomp st(i) */
if ( !compare_st_st(FPU_rm) )
......@@ -339,7 +339,7 @@ void fcompst()
}
void fcompp()
void fcompp(void)
{
/* fcompp */
if (FPU_rm != 1)
......@@ -352,7 +352,7 @@ void fcompp()
}
void fucom_()
void fucom_(void)
{
/* fucom st(i) */
compare_u_st_st(FPU_rm);
......@@ -360,7 +360,7 @@ void fucom_()
}
void fucomp()
void fucomp(void)
{
/* fucomp st(i) */
if ( !compare_u_st_st(FPU_rm) )
......@@ -368,7 +368,7 @@ void fucomp()
}
void fucompp()
void fucompp(void)
{
/* fucompp */
if (FPU_rm == 1)
......
......@@ -86,7 +86,7 @@ int FPU_tagof(FPU_REG *ptr)
/* Get a long double from user memory */
int FPU_load_extended(long double *s, int stnr)
int FPU_load_extended(long double __user *s, int stnr)
{
FPU_REG *sti_ptr = &st(stnr);
......@@ -100,15 +100,15 @@ int FPU_load_extended(long double *s, int stnr)
/* Get a double from user memory */
int FPU_load_double(double *dfloat, FPU_REG *loaded_data)
int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data)
{
int exp, tag, negative;
unsigned m64, l64;
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_READ, dfloat, 8);
FPU_get_user(m64, 1 + (unsigned long *) dfloat);
FPU_get_user(l64, (unsigned long *) dfloat);
FPU_get_user(m64, 1 + (unsigned long __user *) dfloat);
FPU_get_user(l64, (unsigned long __user *) dfloat);
RE_ENTRANT_CHECK_ON;
negative = (m64 & 0x80000000) ? SIGN_Negative : SIGN_Positive;
......@@ -172,14 +172,14 @@ int FPU_load_double(double *dfloat, FPU_REG *loaded_data)
/* Get a float from user memory */
int FPU_load_single(float *single, FPU_REG *loaded_data)
int FPU_load_single(float __user *single, FPU_REG *loaded_data)
{
unsigned m32;
int exp, tag, negative;
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_READ, single, 4);
FPU_get_user(m32, (unsigned long *) single);
FPU_get_user(m32, (unsigned long __user *) single);
RE_ENTRANT_CHECK_ON;
negative = (m32 & 0x80000000) ? SIGN_Negative : SIGN_Positive;
......@@ -236,7 +236,7 @@ int FPU_load_single(float *single, FPU_REG *loaded_data)
/* Get a long long from user memory */
int FPU_load_int64(long long *_s)
int FPU_load_int64(long long __user *_s)
{
long long s;
int sign;
......@@ -268,7 +268,7 @@ int FPU_load_int64(long long *_s)
/* Get a long from user memory */
int FPU_load_int32(long *_s, FPU_REG *loaded_data)
int FPU_load_int32(long __user *_s, FPU_REG *loaded_data)
{
long s;
int negative;
......@@ -297,7 +297,7 @@ int FPU_load_int32(long *_s, FPU_REG *loaded_data)
/* Get a short from user memory */
int FPU_load_int16(short *_s, FPU_REG *loaded_data)
int FPU_load_int16(short __user *_s, FPU_REG *loaded_data)
{
int s, negative;
......@@ -326,7 +326,7 @@ int FPU_load_int16(short *_s, FPU_REG *loaded_data)
/* Get a packed bcd array from user memory */
int FPU_load_bcd(u_char *s)
int FPU_load_bcd(u_char __user *s)
{
FPU_REG *st0_ptr = &st(0);
int pos;
......@@ -341,7 +341,7 @@ int FPU_load_bcd(u_char *s)
{
l *= 10;
RE_ENTRANT_CHECK_OFF;
FPU_get_user(bcd, (u_char *) s+pos);
FPU_get_user(bcd, s+pos);
RE_ENTRANT_CHECK_ON;
l += bcd >> 4;
l *= 10;
......@@ -349,7 +349,7 @@ int FPU_load_bcd(u_char *s)
}
RE_ENTRANT_CHECK_OFF;
FPU_get_user(sign, (u_char *) s+9);
FPU_get_user(sign, s+9);
sign = sign & 0x80 ? SIGN_Negative : SIGN_Positive;
RE_ENTRANT_CHECK_ON;
......@@ -369,7 +369,7 @@ int FPU_load_bcd(u_char *s)
/*===========================================================================*/
/* Put a long double into user memory */
int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double *d)
int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double __user *d)
{
/*
The only exception raised by an attempt to store to an
......@@ -382,9 +382,9 @@ int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double *d)
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE, d, 10);
FPU_put_user(st0_ptr->sigl, (unsigned long *) d);
FPU_put_user(st0_ptr->sigh, (unsigned long *) ((u_char *)d + 4));
FPU_put_user(exponent16(st0_ptr), (unsigned short *) ((u_char *)d + 8));
FPU_put_user(st0_ptr->sigl, (unsigned long __user *) d);
FPU_put_user(st0_ptr->sigh, (unsigned long __user *) ((u_char __user *)d + 4));
FPU_put_user(exponent16(st0_ptr), (unsigned short __user *) ((u_char __user *)d + 8));
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -398,9 +398,9 @@ int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double *d)
/* Put out the QNaN indefinite */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,d,10);
FPU_put_user(0, (unsigned long *) d);
FPU_put_user(0xc0000000, 1 + (unsigned long *) d);
FPU_put_user(0xffff, 4 + (short *) d);
FPU_put_user(0, (unsigned long __user *) d);
FPU_put_user(0xc0000000, 1 + (unsigned long __user *) d);
FPU_put_user(0xffff, 4 + (short __user *) d);
RE_ENTRANT_CHECK_ON;
return 1;
}
......@@ -411,7 +411,7 @@ int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag, long double *d)
/* Put a double into user memory */
int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *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 */
......@@ -607,9 +607,9 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat)
/* The masked response */
/* Put out the QNaN indefinite */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,(void *)dfloat,8);
FPU_put_user(0, (unsigned long *) dfloat);
FPU_put_user(0xfff80000, 1 + (unsigned long *) dfloat);
FPU_verify_area(VERIFY_WRITE,dfloat,8);
FPU_put_user(0, (unsigned long __user *) dfloat);
FPU_put_user(0xfff80000, 1 + (unsigned long __user *) dfloat);
RE_ENTRANT_CHECK_ON;
return 1;
}
......@@ -620,9 +620,9 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat)
l[1] |= 0x80000000;
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,(void *)dfloat,8);
FPU_put_user(l[0], (unsigned long *)dfloat);
FPU_put_user(l[1], 1 + (unsigned long *)dfloat);
FPU_verify_area(VERIFY_WRITE,dfloat,8);
FPU_put_user(l[0], (unsigned long __user *)dfloat);
FPU_put_user(l[1], 1 + (unsigned long __user *)dfloat);
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -630,7 +630,7 @@ int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat)
/* 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 __user *single)
{
long templ = 0;
unsigned long increment = 0; /* avoid gcc warnings */
......@@ -826,8 +826,8 @@ int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single)
/* The masked response */
/* Put out the QNaN indefinite */
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,(void *)single,4);
FPU_put_user(0xffc00000, (unsigned long *) single);
FPU_verify_area(VERIFY_WRITE,single,4);
FPU_put_user(0xffc00000, (unsigned long __user *) single);
RE_ENTRANT_CHECK_ON;
return 1;
}
......@@ -845,8 +845,8 @@ int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single)
templ |= 0x80000000;
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,(void *)single,4);
FPU_put_user(templ,(unsigned long *) single);
FPU_verify_area(VERIFY_WRITE,single,4);
FPU_put_user(templ,(unsigned long __user *) single);
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -854,7 +854,7 @@ int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single)
/* Put a long long into user memory */
int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d)
int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long __user *d)
{
FPU_REG t;
long long tll;
......@@ -906,7 +906,7 @@ int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d)
}
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,(void *)d,8);
FPU_verify_area(VERIFY_WRITE,d,8);
copy_to_user(d, &tll, 8);
RE_ENTRANT_CHECK_ON;
......@@ -915,7 +915,7 @@ int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag, long long *d)
/* Put a long into user memory */
int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d)
int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d)
{
FPU_REG t;
int precision_loss;
......@@ -964,7 +964,7 @@ int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d)
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,d,4);
FPU_put_user(t.sigl, (unsigned long *) d);
FPU_put_user(t.sigl, (unsigned long __user *) d);
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -972,7 +972,7 @@ int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long *d)
/* Put a short into user memory */
int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d)
int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d)
{
FPU_REG t;
int precision_loss;
......@@ -1021,7 +1021,7 @@ int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d)
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,d,2);
FPU_put_user((short)t.sigl,(short *) d);
FPU_put_user((short)t.sigl, d);
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -1029,7 +1029,7 @@ int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short *d)
/* Put a packed bcd array into user memory */
int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d)
int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d)
{
FPU_REG t;
unsigned long long ll;
......@@ -1071,10 +1071,10 @@ int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d)
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,d,10);
for ( i = 0; i < 7; i++)
FPU_put_user(0, (u_char *) d+i); /* These bytes "undefined" */
FPU_put_user(0xc0, (u_char *) d+7); /* This byte "undefined" */
FPU_put_user(0xff, (u_char *) d+8);
FPU_put_user(0xff, (u_char *) d+9);
FPU_put_user(0, d+i); /* These bytes "undefined" */
FPU_put_user(0xc0, d+7); /* This byte "undefined" */
FPU_put_user(0xff, d+8);
FPU_put_user(0xff, d+9);
RE_ENTRANT_CHECK_ON;
return 1;
}
......@@ -1095,11 +1095,11 @@ int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char *d)
b = FPU_div_small(&ll, 10);
b |= (FPU_div_small(&ll, 10)) << 4;
RE_ENTRANT_CHECK_OFF;
FPU_put_user(b,(u_char *) d+i);
FPU_put_user(b, d+i);
RE_ENTRANT_CHECK_ON;
}
RE_ENTRANT_CHECK_OFF;
FPU_put_user(sign,(u_char *) d+9);
FPU_put_user(sign, d+9);
RE_ENTRANT_CHECK_ON;
return 1;
......@@ -1175,7 +1175,7 @@ int FPU_round_to_int(FPU_REG *r, u_char tag)
/*===========================================================================*/
u_char *fldenv(fpu_addr_modes addr_modes, u_char *s)
u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s)
{
unsigned short tag_word = 0;
u_char tag;
......@@ -1187,13 +1187,13 @@ u_char *fldenv(fpu_addr_modes addr_modes, u_char *s)
{
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_READ, s, 0x0e);
FPU_get_user(control_word, (unsigned short *) s);
FPU_get_user(partial_status, (unsigned short *) (s+2));
FPU_get_user(tag_word, (unsigned short *) (s+4));
FPU_get_user(instruction_address.offset, (unsigned short *) (s+6));
FPU_get_user(instruction_address.selector, (unsigned short *) (s+8));
FPU_get_user(operand_address.offset, (unsigned short *) (s+0x0a));
FPU_get_user(operand_address.selector, (unsigned short *) (s+0x0c));
FPU_get_user(control_word, (unsigned short __user *) s);
FPU_get_user(partial_status, (unsigned short __user *) (s+2));
FPU_get_user(tag_word, (unsigned short __user *) (s+4));
FPU_get_user(instruction_address.offset, (unsigned short __user *) (s+6));
FPU_get_user(instruction_address.selector, (unsigned short __user *) (s+8));
FPU_get_user(operand_address.offset, (unsigned short __user *) (s+0x0a));
FPU_get_user(operand_address.selector, (unsigned short __user *) (s+0x0c));
RE_ENTRANT_CHECK_ON;
s += 0x0e;
if ( addr_modes.default_mode == VM86 )
......@@ -1207,14 +1207,14 @@ u_char *fldenv(fpu_addr_modes addr_modes, u_char *s)
{
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_READ, s, 0x1c);
FPU_get_user(control_word, (unsigned short *) s);
FPU_get_user(partial_status, (unsigned short *) (s+4));
FPU_get_user(tag_word, (unsigned short *) (s+8));
FPU_get_user(instruction_address.offset, (unsigned long *) (s+0x0c));
FPU_get_user(instruction_address.selector, (unsigned short *) (s+0x10));
FPU_get_user(instruction_address.opcode, (unsigned short *) (s+0x12));
FPU_get_user(operand_address.offset, (unsigned long *) (s+0x14));
FPU_get_user(operand_address.selector, (unsigned long *) (s+0x18));
FPU_get_user(control_word, (unsigned short __user *) s);
FPU_get_user(partial_status, (unsigned short __user *) (s+4));
FPU_get_user(tag_word, (unsigned short __user *) (s+8));
FPU_get_user(instruction_address.offset, (unsigned long __user *) (s+0x0c));
FPU_get_user(instruction_address.selector, (unsigned short __user *) (s+0x10));
FPU_get_user(instruction_address.opcode, (unsigned short __user *) (s+0x12));
FPU_get_user(operand_address.offset, (unsigned long __user *) (s+0x14));
FPU_get_user(operand_address.selector, (unsigned long __user *) (s+0x18));
RE_ENTRANT_CHECK_ON;
s += 0x1c;
}
......@@ -1266,10 +1266,10 @@ u_char *fldenv(fpu_addr_modes addr_modes, u_char *s)
}
void frstor(fpu_addr_modes addr_modes, u_char *data_address)
void frstor(fpu_addr_modes addr_modes, u_char __user *data_address)
{
int i, regnr;
u_char *s = fldenv(addr_modes, data_address);
u_char __user *s = fldenv(addr_modes, data_address);
int offset = (top & 7) * 10, other = 80 - offset;
/* Copy all registers in stack order. */
......@@ -1291,7 +1291,7 @@ void frstor(fpu_addr_modes addr_modes, u_char *data_address)
}
u_char *fstenv(fpu_addr_modes addr_modes, u_char *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)
......@@ -1300,25 +1300,25 @@ u_char *fstenv(fpu_addr_modes addr_modes, u_char *d)
RE_ENTRANT_CHECK_OFF;
FPU_verify_area(VERIFY_WRITE,d,14);
#ifdef PECULIAR_486
FPU_put_user(control_word & ~0xe080, (unsigned long *) d);
FPU_put_user(control_word & ~0xe080, (unsigned long __user *) d);
#else
FPU_put_user(control_word, (unsigned short *) d);
FPU_put_user(control_word, (unsigned short __user *) d);
#endif /* PECULIAR_486 */
FPU_put_user(status_word(), (unsigned short *) (d+2));
FPU_put_user(fpu_tag_word, (unsigned short *) (d+4));
FPU_put_user(instruction_address.offset, (unsigned short *) (d+6));
FPU_put_user(operand_address.offset, (unsigned short *) (d+0x0a));
FPU_put_user(status_word(), (unsigned short __user *) (d+2));
FPU_put_user(fpu_tag_word, (unsigned short __user *) (d+4));
FPU_put_user(instruction_address.offset, (unsigned short __user *) (d+6));
FPU_put_user(operand_address.offset, (unsigned short __user *) (d+0x0a));
if ( addr_modes.default_mode == VM86 )
{
FPU_put_user((instruction_address.offset & 0xf0000) >> 4,
(unsigned short *) (d+8));
(unsigned short __user *) (d+8));
FPU_put_user((operand_address.offset & 0xf0000) >> 4,
(unsigned short *) (d+0x0c));
(unsigned short __user *) (d+0x0c));
}
else
{
FPU_put_user(instruction_address.selector, (unsigned short *) (d+8));
FPU_put_user(operand_address.selector, (unsigned short *) (d+0x0c));
FPU_put_user(instruction_address.selector, (unsigned short __user *) (d+8));
FPU_put_user(operand_address.selector, (unsigned short __user *) (d+0x0c));
}
RE_ENTRANT_CHECK_ON;
d += 0x0e;
......@@ -1348,9 +1348,9 @@ u_char *fstenv(fpu_addr_modes addr_modes, u_char *d)
}
void fsave(fpu_addr_modes addr_modes, u_char *data_address)
void fsave(fpu_addr_modes addr_modes, u_char __user *data_address)
{
u_char *d;
u_char __user *d;
int offset = (top & 7) * 10, other = 80 - offset;
d = fstenv(addr_modes, data_address);
......
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