summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2016-06-14 06:21:51 +0000
committeradrian <adrian@FreeBSD.org>2016-06-14 06:21:51 +0000
commit8973af476616ee5432c22df068e23462a6958e19 (patch)
tree5f5a503f36214dccec8af46075b1dec0267bdcb0
parent5b0431482722e73a153eaad31b34cf1b8f328bd7 (diff)
downloadFreeBSD-src-8973af476616ee5432c22df068e23462a6958e19.zip
FreeBSD-src-8973af476616ee5432c22df068e23462a6958e19.tar.gz
[mips] Tidy up setting/clearing the hardfloat flag.
Submitted by: kan Approved by: re (delphij)
-rw-r--r--sys/mips/mips/swtch.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/mips/mips/swtch.S b/sys/mips/mips/swtch.S
index 2a0db8b..1cd7df4 100644
--- a/sys/mips/mips/swtch.S
+++ b/sys/mips/mips/swtch.S
@@ -400,8 +400,9 @@ END(cpu_switch)
*
*----------------------------------------------------------------------------
*/
-.set hardfloat
LEAF(MipsSwitchFPState)
+ .set push
+ .set hardfloat
mfc0 t1, MIPS_COP_0_STATUS # Save old SR
li t0, MIPS_SR_COP_1_BIT # enable the coprocessor
mtc0 t0, MIPS_COP_0_STATUS
@@ -503,6 +504,7 @@ LEAF(MipsSwitchFPState)
ITLBNOPFIX
j ra
nop
+ .set pop
END(MipsSwitchFPState)
/*----------------------------------------------------------------------------
@@ -523,6 +525,8 @@ END(MipsSwitchFPState)
*----------------------------------------------------------------------------
*/
LEAF(MipsSaveCurFPState)
+ .set push
+ .set hardfloat
PTR_L a0, TD_PCB(a0) # get pointer to pcb for thread
mfc0 t1, MIPS_COP_0_STATUS # Disable interrupts and
li t0, MIPS_SR_COP_1_BIT # enable the coprocessor
@@ -581,6 +585,7 @@ LEAF(MipsSaveCurFPState)
ITLBNOPFIX
j ra
nop
+ .set pop
END(MipsSaveCurFPState)
/*
OpenPOWER on IntegriCloud