FIXME: should this just take a const APInt reference? */
| 2475 | |
| 2476 | /* FIXME: should this just take a const APInt reference? */ |
| 2477 | IEEEFloat::opStatus |
| 2478 | IEEEFloat::convertFromZeroExtendedInteger(const integerPart *parts, |
| 2479 | unsigned int width, bool isSigned, |
| 2480 | roundingMode rounding_mode) { |
| 2481 | unsigned int partCount = partCountForBits(width); |
| 2482 | APInt api = APInt(width, makeArrayRef(parts, partCount)); |
| 2483 | |
| 2484 | sign = false; |
| 2485 | if (isSigned && APInt::tcExtractBit(parts, width - 1)) { |
| 2486 | sign = true; |
| 2487 | api = -api; |
| 2488 | } |
| 2489 | |
| 2490 | return convertFromUnsignedParts(api.getRawData(), partCount, rounding_mode); |
| 2491 | } |
| 2492 | |
| 2493 | Expected<IEEEFloat::opStatus> |
| 2494 | IEEEFloat::convertFromHexadecimalString(StringRef s, |
nothing calls this directly
no test coverage detected