diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 16:54:49 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 16:54:49 +0100 |
commit | d1a76187a5be4f89c6cb19d800cb5fb7aac735c5 (patch) | |
tree | 2fac3ffbfffc7560eeef8364b541d0d7a0057920 /arch/powerpc/math-emu/lfs.c | |
parent | c7e78cff6b7518212247fb20b1dc6411540dc9af (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into core/locking
Conflicts:
arch/um/include/asm/system.h
Diffstat (limited to 'arch/powerpc/math-emu/lfs.c')
-rw-r--r-- | arch/powerpc/math-emu/lfs.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/powerpc/math-emu/lfs.c b/arch/powerpc/math-emu/lfs.c index 6f18ebe3a7ff..434ed27be8db 100644 --- a/arch/powerpc/math-emu/lfs.c +++ b/arch/powerpc/math-emu/lfs.c @@ -2,15 +2,17 @@ #include <linux/errno.h> #include <asm/uaccess.h> -#include "soft-fp.h" -#include "double.h" -#include "single.h" +#include <asm/sfp-machine.h> +#include <math-emu/soft-fp.h> +#include <math-emu/double.h> +#include <math-emu/single.h> int lfs(void *frD, void *ea) { FP_DECL_D(R); FP_DECL_S(A); + FP_DECL_EX; float f; #ifdef DEBUG @@ -20,7 +22,7 @@ lfs(void *frD, void *ea) if (copy_from_user(&f, ea, sizeof(float))) return -EFAULT; - __FP_UNPACK_S(A, &f); + FP_UNPACK_S(A, f); #ifdef DEBUG printk("A: %ld %lu %ld (%ld) [%08lx]\n", A_s, A_f, A_e, A_c, @@ -33,5 +35,12 @@ lfs(void *frD, void *ea) printk("R: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c); #endif - return __FP_PACK_D(frD, R); + if (R_c == FP_CLS_NAN) { + R_e = _FP_EXPMAX_D; + _FP_PACK_RAW_2_P(D, frD, R); + } else { + __FP_PACK_D(frD, R); + } + + return 0; } |