patch-2.4.4 linux/arch/mips/kernel/r2300_switch.S
Next file: linux/arch/mips/kernel/r4k_fpu.S
Previous file: linux/arch/mips/kernel/r2300_fpu.S
Back to the patch index
Back to the overall index
- Lines: 89
- Date:
Fri Apr 13 20:26:07 2001
- Orig file:
v2.4.3/linux/arch/mips/kernel/r2300_switch.S
- Orig date:
Sat May 13 08:29:14 2000
diff -u --recursive --new-file v2.4.3/linux/arch/mips/kernel/r2300_switch.S linux/arch/mips/kernel/r2300_switch.S
@@ -9,7 +9,7 @@
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
* Further modifications to make this work:
- * Copyright (c) 1998 Harald Koerfgen
+ * Copyright (c) 1998-2000 Harald Koerfgen
*/
#include <asm/asm.h>
#include <asm/bootinfo.h>
@@ -30,13 +30,11 @@
.align 5
/*
- * task_struct *r4xx0_resume(task_struct *prev,
- * task_struct *next)
+ * task_struct *resume(task_struct *prev,
+ * task_struct *next)
*/
LEAF(resume)
- .set reorder
mfc0 t1, CP0_STATUS
- .set noreorder
sw t1, THREAD_STATUS(a0)
CPU_SAVE_NONSCRATCH(a0)
sw ra, THREAD_REG31(a0)
@@ -57,8 +55,10 @@
and a2, a3
or a2, t1
mtc0 a2, CP0_STATUS
+ .set noreorder
jr ra
move v0, a0
+ .set reorder
END(resume)
/*
@@ -74,19 +74,16 @@
or t0, t3
mtc0 t0, CP0_STATUS
+ .set noreorder
beqz a0, 2f # Save floating point state
nor t3, zero, t3
.set reorder
lw t1, ST_OFF(a0) # last thread looses fpu
- .set noreorder
and t1, t3
sw t1, ST_OFF(a0)
- swc1 $f0, (THREAD_FPU + 0x00)(a0)
FPU_SAVE_SINGLE(a0, t1) # clobbers t1
2:
- lwc1 $f0, (THREAD_FPU + 0x00)($28)
- .set reorder
FPU_RESTORE_SINGLE($28, t0) # clobbers t0
jr ra
END(lazy_fpu_switch)
@@ -94,14 +91,20 @@
/*
* Save a thread's fp context.
*/
- .set noreorder
LEAF(save_fp)
FPU_SAVE_SINGLE(a0, t1) # clobbers t1
jr ra
- swc1 $f0, (THREAD_FPU + 0x00)(a0)
END(save_fp)
/*
+ * Restore a thread's fp context.
+ */
+LEAF(restore_fp)
+ FPU_RESTORE_SINGLE(a0, t1) # clobbers t1
+ jr ra
+ END(restore_fp)
+
+/*
* Load the FPU with signalling NANS. This bit pattern we're using has
* the property that no matter wether considered as single or as double
* precission represents signaling NANS.
@@ -153,6 +156,8 @@
mtc1 t0, $f28
mtc1 t0, $f29
mtc1 t0, $f30
+ .set noreorder
jr ra
mtc1 t0, $f31
+ .set reorder
END(init_fpu)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)