int efsadd(void *rD, void *rA, void *rB) { FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R); int ret = 0; #ifdef DEBUG printk("%s: %p %p %p\n", __FUNCTION__, rD, rA, rB); #endif __FP_UNPACK_S(A, rA); __FP_UNPACK_S(B, rB); #ifdef DEBUG printk("A: %ld %lu %ld (%ld)\n", A_s, A_f, A_e, A_c); printk("B: %ld %lu %ld (%ld)\n", B_s, B_f, B_e, B_c); #endif FP_ADD_S(R, A, B); #ifdef DEBUG printk("D: %ld %lu %ld (%ld)\n", R_s, R_f, R_e, R_c); #endif return (ret | __FP_PACK_S(rD, R)); }
SFtype __addsf3(SFtype a, SFtype b) { FP_DECL_EX; FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R); SFtype r; FP_INIT_ROUNDMODE; FP_UNPACK_SEMIRAW_S(A, a); FP_UNPACK_SEMIRAW_S(B, b); FP_ADD_S(R, A, B); FP_PACK_SEMIRAW_S(r, R); FP_HANDLE_EXCEPTIONS; return r; }
static int fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n) { FP_DECL_EX; FP_DECL_S(Fr); FP_DECL_S(Ft); FP_DECL_S(F0); FP_DECL_S(Fm); FP_DECL_S(Fn); UNPACK_S(F0, FR0); UNPACK_S(Fm, FRm); UNPACK_S(Fn, FRn); FP_MUL_S(Ft, Fm, F0); FP_ADD_S(Fr, Fn, Ft); PACK_S(FRn, Fr); return 0; }