| @@ -301,27 +301,27 @@ INLINE void | | | @@ -301,27 +301,27 @@ INLINE void |
301 | bits32 *z1Ptr, | | 301 | bits32 *z1Ptr, |
302 | bits32 *z2Ptr | | 302 | bits32 *z2Ptr |
303 | ) | | 303 | ) |
304 | { | | 304 | { |
305 | bits32 z0, z1, z2; | | 305 | bits32 z0, z1, z2; |
306 | int8 carry0, carry1; | | 306 | int8 carry0, carry1; |
307 | | | 307 | |
308 | z2 = a2 + b2; | | 308 | z2 = a2 + b2; |
309 | carry1 = ( z2 < a2 ); | | 309 | carry1 = ( z2 < a2 ); |
310 | z1 = a1 + b1; | | 310 | z1 = a1 + b1; |
311 | carry0 = ( z1 < a1 ); | | 311 | carry0 = ( z1 < a1 ); |
312 | z0 = a0 + b0; | | 312 | z0 = a0 + b0; |
313 | z1 += carry1; | | 313 | z1 += carry1; |
314 | z0 += ( z1 < carry1 ); | | 314 | z0 += ( z1 < (bits32)carry1 ); |
315 | z0 += carry0; | | 315 | z0 += carry0; |
316 | *z2Ptr = z2; | | 316 | *z2Ptr = z2; |
317 | *z1Ptr = z1; | | 317 | *z1Ptr = z1; |
318 | *z0Ptr = z0; | | 318 | *z0Ptr = z0; |
319 | | | 319 | |
320 | } | | 320 | } |
321 | | | 321 | |
322 | /* | | 322 | /* |
323 | ------------------------------------------------------------------------------- | | 323 | ------------------------------------------------------------------------------- |
324 | Subtracts the 64-bit value formed by concatenating `b0' and `b1' from the | | 324 | Subtracts the 64-bit value formed by concatenating `b0' and `b1' from the |
325 | 64-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo | | 325 | 64-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo |
326 | 2^64, so any borrow out (carry out) is lost. The result is broken into two | | 326 | 2^64, so any borrow out (carry out) is lost. The result is broken into two |
327 | 32-bit pieces which are stored at the locations pointed to by `z0Ptr' and | | 327 | 32-bit pieces which are stored at the locations pointed to by `z0Ptr' and |
| @@ -358,27 +358,27 @@ INLINE void | | | @@ -358,27 +358,27 @@ INLINE void |
358 | bits32 *z0Ptr, | | 358 | bits32 *z0Ptr, |
359 | bits32 *z1Ptr, | | 359 | bits32 *z1Ptr, |
360 | bits32 *z2Ptr | | 360 | bits32 *z2Ptr |
361 | ) | | 361 | ) |
362 | { | | 362 | { |
363 | bits32 z0, z1, z2; | | 363 | bits32 z0, z1, z2; |
364 | int8 borrow0, borrow1; | | 364 | int8 borrow0, borrow1; |
365 | | | 365 | |
366 | z2 = a2 - b2; | | 366 | z2 = a2 - b2; |
367 | borrow1 = ( a2 < b2 ); | | 367 | borrow1 = ( a2 < b2 ); |
368 | z1 = a1 - b1; | | 368 | z1 = a1 - b1; |
369 | borrow0 = ( a1 < b1 ); | | 369 | borrow0 = ( a1 < b1 ); |
370 | z0 = a0 - b0; | | 370 | z0 = a0 - b0; |
371 | z0 -= ( z1 < borrow1 ); | | 371 | z0 -= ( z1 < (bits32)borrow1 ); |
372 | z1 -= borrow1; | | 372 | z1 -= borrow1; |
373 | z0 -= borrow0; | | 373 | z0 -= borrow0; |
374 | *z2Ptr = z2; | | 374 | *z2Ptr = z2; |
375 | *z1Ptr = z1; | | 375 | *z1Ptr = z1; |
376 | *z0Ptr = z0; | | 376 | *z0Ptr = z0; |
377 | | | 377 | |
378 | } | | 378 | } |
379 | | | 379 | |
380 | /* | | 380 | /* |
381 | ------------------------------------------------------------------------------- | | 381 | ------------------------------------------------------------------------------- |
382 | Multiplies `a' by `b' to obtain a 64-bit product. The product is broken | | 382 | Multiplies `a' by `b' to obtain a 64-bit product. The product is broken |
383 | into two 32-bit pieces which are stored at the locations pointed to by | | 383 | into two 32-bit pieces which are stored at the locations pointed to by |
384 | `z0Ptr' and `z1Ptr'. | | 384 | `z0Ptr' and `z1Ptr'. |