diff options
Diffstat (limited to 'arch/sparc64/math-emu/math.c')
-rw-r--r-- | arch/sparc64/math-emu/math.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/sparc64/math-emu/math.c b/arch/sparc64/math-emu/math.c index 2ae05cd7b773..6ee496c2864a 100644 --- a/arch/sparc64/math-emu/math.c +++ b/arch/sparc64/math-emu/math.c | |||
@@ -206,9 +206,29 @@ int do_mathemu(struct pt_regs *regs, struct fpustate *f) | |||
206 | case FSTOQ: TYPE(3,3,1,1,1,0,0); break; | 206 | case FSTOQ: TYPE(3,3,1,1,1,0,0); break; |
207 | case FDTOQ: TYPE(3,3,1,2,1,0,0); break; | 207 | case FDTOQ: TYPE(3,3,1,2,1,0,0); break; |
208 | case FQTOI: TYPE(3,1,0,3,1,0,0); break; | 208 | case FQTOI: TYPE(3,1,0,3,1,0,0); break; |
209 | |||
210 | /* We can get either unimplemented or unfinished | ||
211 | * for these cases. Pre-Niagara systems generate | ||
212 | * unfinished fpop for SUBNORMAL cases, and Niagara | ||
213 | * always gives unimplemented fpop for fsqrt{s,d}. | ||
214 | */ | ||
215 | case FSQRTS: { | ||
216 | unsigned long x = current_thread_info()->xfsr[0]; | ||
217 | |||
218 | x = (x >> 14) & 0xf; | ||
219 | TYPE(x,1,1,1,1,0,0); | ||
220 | break; | ||
221 | } | ||
222 | |||
223 | case FSQRTD: { | ||
224 | unsigned long x = current_thread_info()->xfsr[0]; | ||
225 | |||
226 | x = (x >> 14) & 0xf; | ||
227 | TYPE(x,2,1,2,1,0,0); | ||
228 | break; | ||
229 | } | ||
230 | |||
209 | /* SUBNORMAL - ftt == 2 */ | 231 | /* SUBNORMAL - ftt == 2 */ |
210 | case FSQRTS: TYPE(2,1,1,1,1,0,0); break; | ||
211 | case FSQRTD: TYPE(2,2,1,2,1,0,0); break; | ||
212 | case FADDD: | 232 | case FADDD: |
213 | case FSUBD: | 233 | case FSUBD: |
214 | case FMULD: | 234 | case FMULD: |