patch-2.4.22 linux-2.4.22/arch/mips/math-emu/cp1emu.c
Next file: linux-2.4.22/arch/mips/math-emu/dp_cmp.c
Previous file: linux-2.4.22/arch/mips/lib/rtc-no.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips/math-emu/cp1emu.c
- Orig date:
2002-11-28 15:53:10.000000000 -0800
diff -urN linux-2.4.21/arch/mips/math-emu/cp1emu.c linux-2.4.22/arch/mips/math-emu/cp1emu.c
@@ -200,7 +200,7 @@
vaddr_t emulpc, contpc;
unsigned int cond;
- if (get_user(ir, (mips_instruction *) REG_TO_VA xcp->cp0_epc)) {
+ if (get_user(ir, (mips_instruction *) xcp->cp0_epc)) {
fpuemuprivate.stats.errors++;
return SIGBUS;
}
@@ -1284,21 +1284,14 @@
struct mips_fpu_soft_struct *ctx)
{
gpreg_t oldepc, prevepc;
- mips_instruction insn, *insnp;
+ mips_instruction insn;
int sig = 0;
oldepc = xcp->cp0_epc;
do {
prevepc = xcp->cp0_epc;
- /*
- * This is a braindead way to do it but the only sane way I
- * found to keep the 64-bit egcs 1.1.2 from crashing.
- */
- insnp = (mips_instruction *) REG_TO_VA xcp->cp0_epc;
-
- if (verify_area(VERIFY_READ, insnp, 4) ||
- __get_user(insn, insnp)) {
+ if (get_user(insn, (mips_instruction *) xcp->cp0_epc)) {
fpuemuprivate.stats.errors++;
return SIGBUS;
}
@@ -1313,7 +1306,7 @@
sig = cop1Emulate(xcp, ctx);
}
- if (mips_cpu.options & MIPS_CPU_FPU)
+ if (cpu_has_fpu)
break;
if (sig)
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)