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)); }
int FSQRTS(void *rd, void *rs2) { FP_DECL_S(A); FP_DECL_S(R); __FP_UNPACK_S(A, rs2); FP_SQRT_S(R, A); __FP_PACK_S(rd, R); return 1; }
int FDIVS(void *rd, void *rs2, void *rs1) { FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R); __FP_UNPACK_S(A, rs1); __FP_UNPACK_S(B, rs2); FP_DIV_S(R, A, B); __FP_PACK_S(rd, R); return 1; }