From: NIIBE Y. <gn...@ch...> - 2000-04-30 23:40:17
|
And another one. I'll commit this too. 2000-04-30 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/entry.S (restore_all): Bug fix. We should consider FPU exception within the critical region. We should not change the IMASK value in this case. Or else, we would introduce a "hole" in the critical region. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/entry.S,v retrieving revision 1.9 diff -u -r1.9 entry.S --- arch/sh/kernel/entry.S 2000/04/30 00:50:23 1.9 +++ arch/sh/kernel/entry.S 2000/04/30 23:27:35 @@ -492,7 +492,16 @@ mov.l 2f, $k1 and $k1, $k2 ! Mask orignal SR value or $k0, $k2 ! Inherit current FD-bit - or $g_imask, $k2 ! Inherit the IMASK-bits + ! + mov $k3, $k0 ! Calculate IMASK-bits + shlr2 $k0 + and #0x3c, $k0 + cmp/eq #0x3c, $k0 + bf/s 7f + mov $g_imask, $k0 + shll2 $k0 + ! +7: or $k0, $k2 ! Set the IMASK-bits ldc $k2, $ssr ! #if defined(__SH4__) @@ -507,7 +516,7 @@ ! There's the case we don't get FPU now stc $sr, $k2 tst $k1, $k2 - bt 7f + bt 8f ! We need to grab FPU here xor $k1, $k2 ldc $k2, $sr ! Grab FPU @@ -519,7 +528,7 @@ ! ! Restoring FPU... ! -7: mov.l 3f, $k1 +8: mov.l 3f, $k1 lds $k1, $fpscr fmov.s @$r15+, $fr0 fmov.s @$r15+, $fr1 |