| 2432 | } |
| 2433 | |
| 2434 | IEEEFloat::opStatus IEEEFloat::convertFromAPInt(const APInt &Val, bool isSigned, |
| 2435 | roundingMode rounding_mode) { |
| 2436 | unsigned int partCount = Val.getNumWords(); |
| 2437 | APInt api = Val; |
| 2438 | |
| 2439 | sign = false; |
| 2440 | if (isSigned && api.isNegative()) { |
| 2441 | sign = true; |
| 2442 | api = -api; |
| 2443 | } |
| 2444 | |
| 2445 | return convertFromUnsignedParts(api.getRawData(), partCount, rounding_mode); |
| 2446 | } |
| 2447 | |
| 2448 | /* Convert a two's complement integer SRC to a floating point number, |
| 2449 | rounding according to ROUNDING_MODE. ISSIGNED is true if the |
no test coverage detected