diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-31 08:31:57 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-31 08:31:57 +0100 |
commit | a9de18eb761f7c1c860964b2e5addc1a35c7e861 (patch) | |
tree | 886e75fdfd09690cd262ca69cb7f5d1d42b48602 /arch/powerpc/math-emu/lfs.c | |
parent | b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (diff) | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
Merge branch 'linus' into stackprotector
Conflicts:
arch/x86/include/asm/pda.h
kernel/fork.c
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 6f18ebe3a7f..434ed27be8d 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; } |