linux-mips
[Top] [All Lists]

FP emulator patch

To: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: FP emulator patch
From: Carsten Langgaard <carstenl@mips.com>
Date: Tue, 10 Sep 2002 13:55:18 +0200
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
This patch fix a bug in the FP emulator, when used in the 64-bit kernel.

Ralf, could you please apply.

/Carsten



--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com


Index: arch/mips/math-emu/cp1emu.c
===================================================================
RCS file: /cvs/linux/arch/mips/math-emu/cp1emu.c,v
retrieving revision 1.13.2.9
diff -u -r1.13.2.9 cp1emu.c
--- arch/mips/math-emu/cp1emu.c 2002/08/05 23:53:34     1.13.2.9
+++ arch/mips/math-emu/cp1emu.c 2002/09/10 11:47:22
@@ -168,8 +168,8 @@
 
 #define SIFROMREG(si,x)        ((si) = \
                        (xcp->cp0_status & FR_BIT) || !(x & 1) ? \
-                       ctx->regs[x] : \
-                       ctx->regs[x & ~1] >> 32 )
+                       (int)ctx->regs[x] : \
+                       (int)(ctx->regs[x & ~1] >> 32 ))
 #define SITOREG(si,x)  (ctx->regs[x & ~((xcp->cp0_status & FR_BIT) == 0)] = \
                        (xcp->cp0_status & FR_BIT) || !(x & 1) ? \
                        ctx->regs[x & ~1] >> 32 << 32 | (u32)(si) : \
<Prev in Thread] Current Thread [Next in Thread>
  • FP emulator patch, Carsten Langgaard <=