aboutsummaryrefslogtreecommitdiff
path: root/source/s_mul128MTo256M.c
diff options
context:
space:
mode:
authorJohn Hauser <jhauser@eecs.berkeley.edu>2016-07-22 18:03:04 -0700
committerJohn Hauser <jhauser@eecs.berkeley.edu>2016-07-22 18:03:04 -0700
commitcb5087cd7403acf31ac24ac4be8e019a51904895 (patch)
tree3eeb55d6ad63e33dc8e3be33614e94bbe8a8cac5 /source/s_mul128MTo256M.c
parent45fdcf1c6583e4af380b147ac568f5aa721b7ba8 (diff)
downloadberkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.zip
berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.gz
berkeley-softfloat-3-cb5087cd7403acf31ac24ac4be8e019a51904895.tar.bz2
Release 3b. See "doc/SoftFloat-history.html".
Diffstat (limited to 'source/s_mul128MTo256M.c')
-rw-r--r--source/s_mul128MTo256M.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/s_mul128MTo256M.c b/source/s_mul128MTo256M.c
index e4f343d..ab7ac05 100644
--- a/source/s_mul128MTo256M.c
+++ b/source/s_mul128MTo256M.c
@@ -2,9 +2,9 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
-Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
California. All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -74,23 +74,23 @@ void
(uint64_t) aPtr[indexWord( 4, 1 )] * wordB + (dwordProd>>32);
wordZ = zPtr[indexWord( 5, 1 )] + (uint32_t) dwordProd + carry;
zPtr[indexWord( 5, 1 )] = wordZ;
- carry =
- carry ? (wordZ <= (uint32_t) dwordProd)
- : (wordZ < (uint32_t) dwordProd);
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
dwordProd =
(uint64_t) aPtr[indexWord( 4, 2 )] * wordB + (dwordProd>>32);
wordZ = zPtr[indexWord( 5, 2 )] + (uint32_t) dwordProd + carry;
zPtr[indexWord( 5, 2 )] = wordZ;
- carry =
- carry ? (wordZ <= (uint32_t) dwordProd)
- : (wordZ < (uint32_t) dwordProd);
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
dwordProd =
(uint64_t) aPtr[indexWord( 4, 3 )] * wordB + (dwordProd>>32);
wordZ = zPtr[indexWord( 5, 3 )] + (uint32_t) dwordProd + carry;
zPtr[indexWord( 5, 3 )] = wordZ;
- carry =
- carry ? (wordZ <= (uint32_t) dwordProd)
- : (wordZ < (uint32_t) dwordProd);
+ if ( wordZ != (uint32_t) dwordProd ) {
+ carry = (wordZ < (uint32_t) dwordProd);
+ }
zPtr[indexWord( 5, 4 )] = (dwordProd>>32) + carry;
} while ( zPtr != lastZPtr );