Convert a two's complement integer SRC to a floating point number, rounding according to ROUNDING_MODE. ISSIGNED is true if the integer is signed, in which case it must be sign-extended. */
| 2449 | rounding according to ROUNDING_MODE. ISSIGNED is true if the |
| 2450 | integer is signed, in which case it must be sign-extended. */ |
| 2451 | IEEEFloat::opStatus |
| 2452 | IEEEFloat::convertFromSignExtendedInteger(const integerPart *src, |
| 2453 | unsigned int srcCount, bool isSigned, |
| 2454 | roundingMode rounding_mode) { |
| 2455 | opStatus status; |
| 2456 | |
| 2457 | if (isSigned && |
| 2458 | APInt::tcExtractBit(src, srcCount * integerPartWidth - 1)) { |
| 2459 | integerPart *copy; |
| 2460 | |
| 2461 | /* If we're signed and negative negate a copy. */ |
| 2462 | sign = true; |
| 2463 | copy = new integerPart[srcCount]; |
| 2464 | APInt::tcAssign(copy, src, srcCount); |
| 2465 | APInt::tcNegate(copy, srcCount); |
| 2466 | status = convertFromUnsignedParts(copy, srcCount, rounding_mode); |
| 2467 | delete [] copy; |
| 2468 | } else { |
| 2469 | sign = false; |
| 2470 | status = convertFromUnsignedParts(src, srcCount, rounding_mode); |
| 2471 | } |
| 2472 | |
| 2473 | return status; |
| 2474 | } |
| 2475 | |
| 2476 | /* FIXME: should this just take a const APInt reference? */ |
| 2477 | IEEEFloat::opStatus |
nothing calls this directly
no test coverage detected