diff options
author | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> | 2014-11-25 05:08:45 -0500 |
---|---|---|
committer | Markos Chandras <markos.chandras@imgtec.com> | 2015-02-17 10:37:27 -0500 |
commit | 8d5b9b771ee4907351707b05a81a345620f73ff9 (patch) | |
tree | f061da49f47e57a8420df11fcfe7ef01e1d4868e /arch/mips/kernel/r4k_fpu.S | |
parent | 207083b1da59242cbbcd1752eea359ed4760914b (diff) |
MIPS: kernel: r4k_fpu: Add support for MIPS R6
Add the MIPS R6 related preprocessor definitions for FPU signal
related functions. MIPS R6 only has FR=1 so avoid checking that
bit on the C0/Status register.
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/r4k_fpu.S')
-rw-r--r-- | arch/mips/kernel/r4k_fpu.S | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index 6c160c67984c..676c5030a953 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
@@ -34,7 +34,7 @@ | |||
34 | .endm | 34 | .endm |
35 | 35 | ||
36 | .set noreorder | 36 | .set noreorder |
37 | .set arch=r4000 | 37 | .set MIPS_ISA_ARCH_LEVEL_RAW |
38 | 38 | ||
39 | LEAF(_save_fp_context) | 39 | LEAF(_save_fp_context) |
40 | .set push | 40 | .set push |
@@ -42,7 +42,8 @@ LEAF(_save_fp_context) | |||
42 | cfc1 t1, fcr31 | 42 | cfc1 t1, fcr31 |
43 | .set pop | 43 | .set pop |
44 | 44 | ||
45 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) | 45 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) || \ |
46 | defined(CONFIG_CPU_MIPS32_R6) | ||
46 | .set push | 47 | .set push |
47 | SET_HARDFLOAT | 48 | SET_HARDFLOAT |
48 | #ifdef CONFIG_CPU_MIPS32_R2 | 49 | #ifdef CONFIG_CPU_MIPS32_R2 |
@@ -105,10 +106,12 @@ LEAF(_save_fp_context32) | |||
105 | SET_HARDFLOAT | 106 | SET_HARDFLOAT |
106 | cfc1 t1, fcr31 | 107 | cfc1 t1, fcr31 |
107 | 108 | ||
109 | #ifndef CONFIG_CPU_MIPS64_R6 | ||
108 | mfc0 t0, CP0_STATUS | 110 | mfc0 t0, CP0_STATUS |
109 | sll t0, t0, 5 | 111 | sll t0, t0, 5 |
110 | bgez t0, 1f # skip storing odd if FR=0 | 112 | bgez t0, 1f # skip storing odd if FR=0 |
111 | nop | 113 | nop |
114 | #endif | ||
112 | 115 | ||
113 | /* Store the 16 odd double precision registers */ | 116 | /* Store the 16 odd double precision registers */ |
114 | EX sdc1 $f1, SC32_FPREGS+8(a0) | 117 | EX sdc1 $f1, SC32_FPREGS+8(a0) |
@@ -163,7 +166,8 @@ LEAF(_save_fp_context32) | |||
163 | LEAF(_restore_fp_context) | 166 | LEAF(_restore_fp_context) |
164 | EX lw t1, SC_FPC_CSR(a0) | 167 | EX lw t1, SC_FPC_CSR(a0) |
165 | 168 | ||
166 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) | 169 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) || \ |
170 | defined(CONFIG_CPU_MIPS32_R6) | ||
167 | .set push | 171 | .set push |
168 | SET_HARDFLOAT | 172 | SET_HARDFLOAT |
169 | #ifdef CONFIG_CPU_MIPS32_R2 | 173 | #ifdef CONFIG_CPU_MIPS32_R2 |
@@ -223,10 +227,12 @@ LEAF(_restore_fp_context32) | |||
223 | SET_HARDFLOAT | 227 | SET_HARDFLOAT |
224 | EX lw t1, SC32_FPC_CSR(a0) | 228 | EX lw t1, SC32_FPC_CSR(a0) |
225 | 229 | ||
230 | #ifndef CONFIG_CPU_MIPS64_R6 | ||
226 | mfc0 t0, CP0_STATUS | 231 | mfc0 t0, CP0_STATUS |
227 | sll t0, t0, 5 | 232 | sll t0, t0, 5 |
228 | bgez t0, 1f # skip loading odd if FR=0 | 233 | bgez t0, 1f # skip loading odd if FR=0 |
229 | nop | 234 | nop |
235 | #endif | ||
230 | 236 | ||
231 | EX ldc1 $f1, SC32_FPREGS+8(a0) | 237 | EX ldc1 $f1, SC32_FPREGS+8(a0) |
232 | EX ldc1 $f3, SC32_FPREGS+24(a0) | 238 | EX ldc1 $f3, SC32_FPREGS+24(a0) |