X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fmips%2Fkernel%2Fr4k_switch.S;h=1fc3b2eb12bd2d80de44b5f86c479a1487161360;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9eb885d239b5a66ca6f4c5bcd5a94cac1a054274;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 9eb885d23..1fc3b2eb1 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S @@ -75,17 +75,8 @@ and t0, t0, t1 LONG_S t0, ST_OFF(t3) -#ifdef CONFIG_MIPS32 - fpu_save_double a0 t0 # clobbers t0 -#endif -#ifdef CONFIG_MIPS64 - sll t2, t0, 5 - bgez t2, 2f - sdc1 $f0, (THREAD_FPU + 0x00)(a0) - fpu_save_16odd a0 -2: - fpu_save_16even a0 t1 # clobbers t1 -#endif + fpu_save_double a0 t1 t0 t2 # c0_status passed in t1 + # clobbers t0 and t2 1: /* @@ -114,18 +105,10 @@ * Save a thread's fp context. */ LEAF(_save_fp) -#ifdef CONFIG_MIPS32 - fpu_save_double a0 t1 # clobbers t1 -#endif #ifdef CONFIG_MIPS64 - mfc0 t0, CP0_STATUS - sll t1, t0, 5 - bgez t1, 1f # 16 register mode? - fpu_save_16odd a0 -1: - fpu_save_16even a0 t1 # clobbers t1 - sdc1 $f0, (THREAD_FPU + 0x00)(a0) + mfc0 t1, CP0_STATUS #endif + fpu_save_double a0 t1 t0 t2 # clobbers t1 jr ra END(_save_fp) @@ -133,19 +116,7 @@ LEAF(_save_fp) * Restore a thread's fp context. */ LEAF(_restore_fp) -#ifdef CONFIG_MIPS32 fpu_restore_double a0, t1 # clobbers t1 -#endif -#ifdef CONFIG_MIPS64 - mfc0 t0, CP0_STATUS - sll t1, t0, 5 - bgez t1, 1f # 16 register mode? - - fpu_restore_16odd a0 -1: fpu_restore_16even a0, t0 # clobbers t0 - ldc1 $f0, (THREAD_FPU + 0x00)(a0) -#endif - jr ra END(_restore_fp)