fpu_implode.c (165903) | fpu_implode.c (205393) |
---|---|
1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * --- 26 unchanged lines hidden (view full) --- 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)fpu_implode.c 8.1 (Berkeley) 6/11/93 39 * $NetBSD: fpu_implode.c,v 1.8 2001/08/26 05:44:46 eeh Exp $ 40 */ 41 42#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * --- 26 unchanged lines hidden (view full) --- 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)fpu_implode.c 8.1 (Berkeley) 6/11/93 39 * $NetBSD: fpu_implode.c,v 1.8 2001/08/26 05:44:46 eeh Exp $ 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/lib/libc/sparc64/fpu/fpu_implode.c 165903 2007-01-09 00:28:16Z imp $"); | 43__FBSDID("$FreeBSD: head/lib/libc/sparc64/fpu/fpu_implode.c 205393 2010-03-20 21:04:47Z marius $"); |
44 45/* 46 * FPU subroutines: `implode' internal format numbers into the machine's 47 * `packed binary' format. 48 */ 49 50#include <sys/param.h> 51 --- 141 unchanged lines hidden (view full) --- 193 struct fpemu *fe; 194 struct fpn *fp; 195{ 196 u_int i; 197 int sign, exp; 198 199 sign = fp->fp_sign; 200 switch (fp->fp_class) { | 44 45/* 46 * FPU subroutines: `implode' internal format numbers into the machine's 47 * `packed binary' format. 48 */ 49 50#include <sys/param.h> 51 --- 141 unchanged lines hidden (view full) --- 193 struct fpemu *fe; 194 struct fpn *fp; 195{ 196 u_int i; 197 int sign, exp; 198 199 sign = fp->fp_sign; 200 switch (fp->fp_class) { |
201 | |
202 case FPC_ZERO: 203 return (0); 204 205 case FPC_NUM: 206 /* 207 * If exp >= 2^32, overflow. Otherwise shift value right 208 * into last mantissa word (this will not exceed 0xffffffff), 209 * shifting any guard and round bits out into the sticky --- 33 unchanged lines hidden (view full) --- 243 struct fpn *fp; 244 u_int *res; 245{ 246 u_int64_t i; 247 int sign, exp; 248 249 sign = fp->fp_sign; 250 switch (fp->fp_class) { | 201 case FPC_ZERO: 202 return (0); 203 204 case FPC_NUM: 205 /* 206 * If exp >= 2^32, overflow. Otherwise shift value right 207 * into last mantissa word (this will not exceed 0xffffffff), 208 * shifting any guard and round bits out into the sticky --- 33 unchanged lines hidden (view full) --- 242 struct fpn *fp; 243 u_int *res; 244{ 245 u_int64_t i; 246 int sign, exp; 247 248 sign = fp->fp_sign; 249 switch (fp->fp_class) { |
251 | |
252 case FPC_ZERO: 253 res[1] = 0; 254 return (0); 255 256 case FPC_NUM: 257 /* 258 * If exp >= 2^64, overflow. Otherwise shift value 259 * right into last mantissa word (this will not exceed --- 239 unchanged lines hidden (view full) --- 499__fpu_implode(fe, fp, type, space) 500 struct fpemu *fe; 501 struct fpn *fp; 502 int type; 503 u_int *space; 504{ 505 506 switch (type) { | 250 case FPC_ZERO: 251 res[1] = 0; 252 return (0); 253 254 case FPC_NUM: 255 /* 256 * If exp >= 2^64, overflow. Otherwise shift value 257 * right into last mantissa word (this will not exceed --- 239 unchanged lines hidden (view full) --- 497__fpu_implode(fe, fp, type, space) 498 struct fpemu *fe; 499 struct fpn *fp; 500 int type; 501 u_int *space; 502{ 503 504 switch (type) { |
507 | |
508 case FTYPE_LNG: 509 space[0] = __fpu_ftox(fe, fp, space); 510 break; 511 512 case FTYPE_INT: 513 space[0] = __fpu_ftoi(fe, fp); 514 break; 515 --- 19 unchanged lines hidden --- | 505 case FTYPE_LNG: 506 space[0] = __fpu_ftox(fe, fp, space); 507 break; 508 509 case FTYPE_INT: 510 space[0] = __fpu_ftoi(fe, fp); 511 break; 512 --- 19 unchanged lines hidden --- |