ia64/linux-2.6.18-xen.hg

annotate arch/powerpc/math-emu/fnmsubs.c @ 854:950b9eb27661

usbback: fix urb interval value for interrupt urbs.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 13:51:20 2009 +0100 (2009-04-06)
parents 831230e53067
children
rev   line source
ian@0 1 #include <linux/types.h>
ian@0 2 #include <linux/errno.h>
ian@0 3 #include <asm/uaccess.h>
ian@0 4
ian@0 5 #include "soft-fp.h"
ian@0 6 #include "double.h"
ian@0 7 #include "single.h"
ian@0 8
ian@0 9 int
ian@0 10 fnmsubs(void *frD, void *frA, void *frB, void *frC)
ian@0 11 {
ian@0 12 FP_DECL_D(R);
ian@0 13 FP_DECL_D(A);
ian@0 14 FP_DECL_D(B);
ian@0 15 FP_DECL_D(C);
ian@0 16 FP_DECL_D(T);
ian@0 17 int ret = 0;
ian@0 18
ian@0 19 #ifdef DEBUG
ian@0 20 printk("%s: %p %p %p %p\n", __FUNCTION__, frD, frA, frB, frC);
ian@0 21 #endif
ian@0 22
ian@0 23 __FP_UNPACK_D(A, frA);
ian@0 24 __FP_UNPACK_D(B, frB);
ian@0 25 __FP_UNPACK_D(C, frC);
ian@0 26
ian@0 27 #ifdef DEBUG
ian@0 28 printk("A: %ld %lu %lu %ld (%ld)\n", A_s, A_f1, A_f0, A_e, A_c);
ian@0 29 printk("B: %ld %lu %lu %ld (%ld)\n", B_s, B_f1, B_f0, B_e, B_c);
ian@0 30 printk("C: %ld %lu %lu %ld (%ld)\n", C_s, C_f1, C_f0, C_e, C_c);
ian@0 31 #endif
ian@0 32
ian@0 33 if ((A_c == FP_CLS_INF && C_c == FP_CLS_ZERO) ||
ian@0 34 (A_c == FP_CLS_ZERO && C_c == FP_CLS_INF))
ian@0 35 ret |= EFLAG_VXIMZ;
ian@0 36
ian@0 37 FP_MUL_D(T, A, C);
ian@0 38
ian@0 39 if (B_c != FP_CLS_NAN)
ian@0 40 B_s ^= 1;
ian@0 41
ian@0 42 if (T_s != B_s && T_c == FP_CLS_INF && B_c == FP_CLS_INF)
ian@0 43 ret |= EFLAG_VXISI;
ian@0 44
ian@0 45 FP_ADD_D(R, T, B);
ian@0 46
ian@0 47 if (R_c != FP_CLS_NAN)
ian@0 48 R_s ^= 1;
ian@0 49
ian@0 50 #ifdef DEBUG
ian@0 51 printk("D: %ld %lu %lu %ld (%ld)\n", R_s, R_f1, R_f0, R_e, R_c);
ian@0 52 #endif
ian@0 53
ian@0 54 return (ret | __FP_PACK_DS(frD, R));
ian@0 55 }