19#define MIN_INT64_MAGNITUDE (((UINT64)(- (MIN_INT64 + 1))) + 1)
70 *Result = (UINT8)Operand;
73 *Result = UINT8_ERROR;
107 RETURN_STATUS Status;
109 if (Result ==
NULL) {
114 *Result = (CHAR8)Operand;
117 *Result = CHAR8_ERROR;
151 RETURN_STATUS Status;
153 if (Result ==
NULL) {
158 *Result = (UINT16)Operand;
161 *Result = UINT16_ERROR;
195 RETURN_STATUS Status;
197 if (Result ==
NULL) {
202 *Result = (UINT32)Operand;
205 *Result = UINT32_ERROR;
239 RETURN_STATUS Status;
241 if (Result ==
NULL) {
246 *Result = (
UINTN)Operand;
249 *Result = UINTN_ERROR;
283 RETURN_STATUS Status;
285 if (Result ==
NULL) {
290 *Result = (UINT64)Operand;
293 *Result = UINT64_ERROR;
327 RETURN_STATUS Status;
329 if (Result ==
NULL) {
334 *Result = (INT8)Operand;
337 *Result = INT8_ERROR;
371 RETURN_STATUS Status;
373 if (Result ==
NULL) {
378 *Result = (CHAR8)Operand;
381 *Result = CHAR8_ERROR;
415 RETURN_STATUS Status;
417 if (Result ==
NULL) {
422 *Result = (INT8)Operand;
425 *Result = INT8_ERROR;
459 RETURN_STATUS Status;
461 if (Result ==
NULL) {
465 if ((Operand >= 0) && (Operand <=
MAX_INT8)) {
466 *Result = (CHAR8)Operand;
469 *Result = CHAR8_ERROR;
503 RETURN_STATUS Status;
505 if (Result ==
NULL) {
509 if ((Operand >= 0) && (Operand <= MAX_UINT8)) {
510 *Result = (UINT8)Operand;
513 *Result = UINT8_ERROR;
547 RETURN_STATUS Status;
549 if (Result ==
NULL) {
554 *Result = (UINT16)Operand;
557 *Result = UINT16_ERROR;
591 RETURN_STATUS Status;
593 if (Result ==
NULL) {
598 *Result = (UINT32)Operand;
601 *Result = UINT32_ERROR;
635 RETURN_STATUS Status;
637 if (Result ==
NULL) {
642 *Result = (
UINTN)Operand;
645 *Result = UINTN_ERROR;
679 RETURN_STATUS Status;
681 if (Result ==
NULL) {
686 *Result = (UINT64)Operand;
689 *Result = UINT64_ERROR;
723 RETURN_STATUS Status;
725 if (Result ==
NULL) {
730 *Result = (INT8)Operand;
733 *Result = INT8_ERROR;
767 RETURN_STATUS Status;
769 if (Result ==
NULL) {
774 *Result = (INT8)Operand;
777 *Result = CHAR8_ERROR;
811 RETURN_STATUS Status;
813 if (Result ==
NULL) {
817 if (Operand <= MAX_UINT8) {
818 *Result = (UINT8)Operand;
821 *Result = UINT8_ERROR;
855 RETURN_STATUS Status;
857 if (Result ==
NULL) {
861 if (Operand <= MAX_INT16) {
862 *Result = (INT16)Operand;
865 *Result = INT16_ERROR;
899 RETURN_STATUS Status;
901 if (Result ==
NULL) {
906 *Result = (INT8)Operand;
909 *Result = INT8_ERROR;
943 RETURN_STATUS Status;
945 if (Result ==
NULL) {
949 if ((Operand >= 0) && (Operand <=
MAX_INT8)) {
950 *Result = (CHAR8)Operand;
953 *Result = CHAR8_ERROR;
987 RETURN_STATUS Status;
989 if (Result ==
NULL) {
993 if ((Operand >= 0) && (Operand <= MAX_UINT8)) {
994 *Result = (UINT8)Operand;
997 *Result = UINT8_ERROR;
1031 RETURN_STATUS Status;
1033 if (Result ==
NULL) {
1037 if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) {
1038 *Result = (INT16)Operand;
1041 *Result = INT16_ERROR;
1075 RETURN_STATUS Status;
1077 if (Result ==
NULL) {
1081 if ((Operand >= 0) && (Operand <= MAX_UINT16)) {
1082 *Result = (UINT16)Operand;
1085 *Result = UINT16_ERROR;
1119 RETURN_STATUS Status;
1121 if (Result ==
NULL) {
1126 *Result = (UINT32)Operand;
1129 *Result = UINT32_ERROR;
1163 RETURN_STATUS Status;
1165 if (Result ==
NULL) {
1170 *Result = (UINT64)Operand;
1173 *Result = UINT64_ERROR;
1207 RETURN_STATUS Status;
1209 if (Result ==
NULL) {
1214 *Result = (INT8)Operand;
1217 *Result = INT8_ERROR;
1251 RETURN_STATUS Status;
1253 if (Result ==
NULL) {
1258 *Result = (INT8)Operand;
1261 *Result = CHAR8_ERROR;
1295 RETURN_STATUS Status;
1297 if (Result ==
NULL) {
1301 if (Operand <= MAX_UINT8) {
1302 *Result = (UINT8)Operand;
1305 *Result = UINT8_ERROR;
1339 RETURN_STATUS Status;
1341 if (Result ==
NULL) {
1345 if (Operand <= MAX_INT16) {
1346 *Result = (INT16)Operand;
1349 *Result = INT16_ERROR;
1383 RETURN_STATUS Status;
1385 if (Result ==
NULL) {
1389 if (Operand <= MAX_UINT16) {
1390 *Result = (UINT16)Operand;
1393 *Result = UINT16_ERROR;
1427 RETURN_STATUS Status;
1429 if (Result ==
NULL) {
1433 if (Operand <= MAX_INT32) {
1434 *Result = (INT32)Operand;
1437 *Result = INT32_ERROR;
1471 RETURN_STATUS Status;
1473 if (Result ==
NULL) {
1478 *Result = (INT8)Operand;
1481 *Result = INT8_ERROR;
1515 RETURN_STATUS Status;
1517 if (Result ==
NULL) {
1521 if ((Operand >= 0) && (Operand <=
MAX_INT8)) {
1522 *Result = (CHAR8)Operand;
1525 *Result = CHAR8_ERROR;
1559 RETURN_STATUS Status;
1561 if (Result ==
NULL) {
1565 if ((Operand >= 0) && (Operand <= MAX_UINT8)) {
1566 *Result = (UINT8)Operand;
1569 *Result = UINT8_ERROR;
1603 RETURN_STATUS Status;
1605 if (Result ==
NULL) {
1609 if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) {
1610 *Result = (INT16)Operand;
1613 *Result = INT16_ERROR;
1647 RETURN_STATUS Status;
1649 if (Result ==
NULL) {
1653 if ((Operand >= 0) && (Operand <= MAX_UINT16)) {
1654 *Result = (UINT16)Operand;
1657 *Result = UINT16_ERROR;
1691 RETURN_STATUS Status;
1693 if (Result ==
NULL) {
1698 *Result = (
UINTN)Operand;
1701 *Result = UINTN_ERROR;
1735 RETURN_STATUS Status;
1737 if (Result ==
NULL) {
1742 *Result = (UINT64)Operand;
1745 *Result = UINT64_ERROR;
1779 RETURN_STATUS Status;
1781 if (Result ==
NULL) {
1786 *Result = (INT8)Operand;
1789 *Result = INT8_ERROR;
1823 RETURN_STATUS Status;
1825 if (Result ==
NULL) {
1830 *Result = (INT8)Operand;
1833 *Result = CHAR8_ERROR;
1867 RETURN_STATUS Status;
1869 if (Result ==
NULL) {
1873 if (Operand <= MAX_UINT8) {
1874 *Result = (UINT8)Operand;
1877 *Result = UINT8_ERROR;
1911 RETURN_STATUS Status;
1913 if (Result ==
NULL) {
1917 if (Operand <= MAX_INT16) {
1918 *Result = (INT16)Operand;
1921 *Result = INT16_ERROR;
1955 RETURN_STATUS Status;
1957 if (Result ==
NULL) {
1961 if (Operand <= MAX_UINT16) {
1962 *Result = (UINT16)Operand;
1965 *Result = UINT16_ERROR;
1999 RETURN_STATUS Status;
2001 if (Result ==
NULL) {
2005 if (Operand <= MAX_INT32) {
2006 *Result = (INT32)Operand;
2009 *Result = INT32_ERROR;
2043 RETURN_STATUS Status;
2045 if (Result ==
NULL) {
2050 *Result = (
INTN)Operand;
2053 *Result = INTN_ERROR;
2087 RETURN_STATUS Status;
2089 if (Result ==
NULL) {
2094 *Result = (INT8)Operand;
2097 *Result = INT8_ERROR;
2131 RETURN_STATUS Status;
2133 if (Result ==
NULL) {
2137 if ((Operand >= 0) && (Operand <=
MAX_INT8)) {
2138 *Result = (CHAR8)Operand;
2141 *Result = CHAR8_ERROR;
2175 RETURN_STATUS Status;
2177 if (Result ==
NULL) {
2181 if ((Operand >= 0) && (Operand <= MAX_UINT8)) {
2182 *Result = (UINT8)Operand;
2185 *Result = UINT8_ERROR;
2219 RETURN_STATUS Status;
2221 if (Result ==
NULL) {
2225 if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) {
2226 *Result = (INT16)Operand;
2229 *Result = INT16_ERROR;
2263 RETURN_STATUS Status;
2265 if (Result ==
NULL) {
2269 if ((Operand >= 0) && (Operand <= MAX_UINT16)) {
2270 *Result = (UINT16)Operand;
2273 *Result = UINT16_ERROR;
2307 RETURN_STATUS Status;
2309 if (Result ==
NULL) {
2313 if ((Operand >= MIN_INT32) && (Operand <= MAX_INT32)) {
2314 *Result = (INT32)Operand;
2317 *Result = INT32_ERROR;
2351 RETURN_STATUS Status;
2353 if (Result ==
NULL) {
2357 if ((Operand >= 0) && (Operand <= MAX_UINT32)) {
2358 *Result = (UINT32)Operand;
2361 *Result = UINT32_ERROR;
2395 RETURN_STATUS Status;
2397 if (Result ==
NULL) {
2402 *Result = (UINT64)Operand;
2405 *Result = UINT64_ERROR;
2439 RETURN_STATUS Status;
2441 if (Result ==
NULL) {
2446 *Result = (INT8)Operand;
2449 *Result = INT8_ERROR;
2483 RETURN_STATUS Status;
2485 if (Result ==
NULL) {
2490 *Result = (INT8)Operand;
2493 *Result = CHAR8_ERROR;
2527 RETURN_STATUS Status;
2529 if (Result ==
NULL) {
2533 if (Operand <= MAX_UINT8) {
2534 *Result = (UINT8)Operand;
2537 *Result = UINT8_ERROR;
2571 RETURN_STATUS Status;
2573 if (Result ==
NULL) {
2577 if (Operand <= MAX_INT16) {
2578 *Result = (INT16)Operand;
2581 *Result = INT16_ERROR;
2615 RETURN_STATUS Status;
2617 if (Result ==
NULL) {
2621 if (Operand <= MAX_UINT16) {
2622 *Result = (UINT16)Operand;
2625 *Result = UINT16_ERROR;
2659 RETURN_STATUS Status;
2661 if (Result ==
NULL) {
2665 if (Operand <= MAX_INT32) {
2666 *Result = (INT32)Operand;
2669 *Result = INT32_ERROR;
2703 RETURN_STATUS Status;
2705 if (Result ==
NULL) {
2709 if (Operand <= MAX_UINT32) {
2710 *Result = (UINT32)Operand;
2713 *Result = UINT32_ERROR;
2747 RETURN_STATUS Status;
2749 if (Result ==
NULL) {
2754 *Result = (
INTN)Operand;
2757 *Result = INTN_ERROR;
2791 RETURN_STATUS Status;
2793 if (Result ==
NULL) {
2797 if (Operand <= MAX_INT64) {
2798 *Result = (INT64)Operand;
2801 *Result = INT64_ERROR;
2841 RETURN_STATUS Status;
2843 if (Result ==
NULL) {
2847 if (((UINT8)(Augend + Addend)) >= Augend) {
2848 *Result = (UINT8)(Augend + Addend);
2851 *Result = UINT8_ERROR;
2887 RETURN_STATUS Status;
2889 if (Result ==
NULL) {
2893 if (((UINT16)(Augend + Addend)) >= Augend) {
2894 *Result = (UINT16)(Augend + Addend);
2897 *Result = UINT16_ERROR;
2933 RETURN_STATUS Status;
2935 if (Result ==
NULL) {
2939 if ((Augend + Addend) >= Augend) {
2940 *Result = (Augend + Addend);
2943 *Result = UINT32_ERROR;
2979 RETURN_STATUS Status;
2981 if (Result ==
NULL) {
2985 if ((Augend + Addend) >= Augend) {
2986 *Result = (Augend + Addend);
2989 *Result = UINT64_ERROR;
3025 IN UINT8 Subtrahend,
3029 RETURN_STATUS Status;
3031 if (Result ==
NULL) {
3035 if (Minuend >= Subtrahend) {
3036 *Result = (UINT8)(Minuend - Subtrahend);
3039 *Result = UINT8_ERROR;
3071 IN UINT16 Subtrahend,
3075 RETURN_STATUS Status;
3077 if (Result ==
NULL) {
3081 if (Minuend >= Subtrahend) {
3082 *Result = (UINT16)(Minuend - Subtrahend);
3085 *Result = UINT16_ERROR;
3117 IN UINT32 Subtrahend,
3121 RETURN_STATUS Status;
3123 if (Result ==
NULL) {
3127 if (Minuend >= Subtrahend) {
3128 *Result = (Minuend - Subtrahend);
3131 *Result = UINT32_ERROR;
3163 IN UINT64 Subtrahend,
3167 RETURN_STATUS Status;
3169 if (Result ==
NULL) {
3173 if (Minuend >= Subtrahend) {
3174 *Result = (Minuend - Subtrahend);
3177 *Result = UINT64_ERROR;
3212 IN UINT8 Multiplicand,
3213 IN UINT8 Multiplier,
3217 UINT32 IntermediateResult;
3219 IntermediateResult = ((UINT32)Multiplicand) *((UINT32)Multiplier);
3248 IN UINT16 Multiplicand,
3249 IN UINT16 Multiplier,
3253 UINT32 IntermediateResult;
3255 IntermediateResult = ((UINT32)Multiplicand) *((UINT32)Multiplier);
3284 IN UINT32 Multiplicand,
3285 IN UINT32 Multiplier,
3289 UINT64 IntermediateResult;
3291 IntermediateResult = ((UINT64)Multiplicand) *((UINT64)Multiplier);
3320 IN UINT64 Multiplicand,
3321 IN UINT64 Multiplier,
3325 RETURN_STATUS Status;
3333 UINT64 UnsignedResult;
3335 if (Result ==
NULL) {
3359 DwordA = (UINT32)
RShiftU64 (Multiplicand, 32);
3360 DwordC = (UINT32)
RShiftU64 (Multiplier, 32);
3365 if ((DwordA == 0) && (DwordC == 0)) {
3366 DwordB = (UINT32)Multiplicand;
3367 DwordD = (UINT32)Multiplier;
3369 *Result = (((UINT64)DwordB) *(UINT64)DwordD);
3375 if ((DwordA == 0) ||
3378 DwordD = (UINT32)Multiplier;
3383 ProductAD =
MultU64x64 ((UINT64)DwordA, (UINT64)DwordD);
3384 if ((ProductAD & 0xffffffff00000000) == 0) {
3385 DwordB = (UINT32)Multiplicand;
3390 ProductBC =
MultU64x64 ((UINT64)DwordB, (UINT64)DwordC);
3391 if ((ProductBC & 0xffffffff00000000) == 0) {
3400 ProductBD =
MultU64x64 ((UINT64)DwordB, (UINT64)DwordD);
3403 *Result = UnsignedResult;
3413 *Result = UINT64_ERROR;
3507 if (Result ==
NULL) {
3511 Augend32 = (INT32)Augend;
3512 Addend32 = (INT32)Addend;
3513 if ((Augend32 < 0) || (Augend32 >
MAX_INT8)) {
3514 *Result = CHAR8_ERROR;
3518 if ((Addend32 < 0) || (Addend32 >
MAX_INT8)) {
3519 *Result = CHAR8_ERROR;
3619 RETURN_STATUS Status;
3621 if (Result ==
NULL) {
3670 if (((Addend > 0) && (Augend > (MAX_INT64 - Addend))) ||
3671 ((Addend < 0) && (Augend < (MIN_INT64 - Addend))))
3673 *Result = INT64_ERROR;
3676 *Result = Augend + Addend;
3716 return SafeInt32ToInt8 (((INT32)Minuend) - ((INT32)Subtrahend), Result);
3744 IN CHAR8 Subtrahend,
3751 if (Result ==
NULL) {
3755 Minuend32 = (INT32)Minuend;
3756 Subtrahend32 = (INT32)Subtrahend;
3757 if ((Minuend32 < 0) || (Minuend32 >
MAX_INT8)) {
3758 *Result = CHAR8_ERROR;
3762 if ((Subtrahend32 < 0) || (Subtrahend32 >
MAX_INT8)) {
3763 *Result = CHAR8_ERROR;
3795 IN INT16 Subtrahend,
3827 IN INT32 Subtrahend,
3859 IN INT64 Subtrahend,
3863 RETURN_STATUS Status;
3865 if (Result ==
NULL) {
3907 if (((Subtrahend > 0) && (Minuend < (MIN_INT64 + Subtrahend))) ||
3908 ((Subtrahend < 0) && (Minuend > (MAX_INT64 + Subtrahend))))
3910 *Result = INT64_ERROR;
3913 *Result = Minuend - Subtrahend;
3948 IN INT8 Multiplicand,
3953 return SafeInt32ToInt8 (((INT32)Multiplier) *((INT32)Multiplicand), Result);
3980 IN CHAR8 Multiplicand,
3981 IN CHAR8 Multiplier,
3985 INT32 Multiplicand32;
3988 if (Result ==
NULL) {
3992 Multiplicand32 = (INT32)Multiplicand;
3993 Multiplier32 = (INT32)Multiplier;
3994 if ((Multiplicand32 < 0) || (Multiplicand32 >
MAX_INT8)) {
3995 *Result = CHAR8_ERROR;
3999 if ((Multiplier32 < 0) || (Multiplier32 >
MAX_INT8)) {
4000 *Result = CHAR8_ERROR;
4031 IN INT16 Multiplicand,
4032 IN INT16 Multiplier,
4036 return SafeInt32ToInt16 (((INT32)Multiplicand) *((INT32)Multiplier), Result);
4063 IN INT32 Multiplicand,
4064 IN INT32 Multiplier,
4095 IN INT64 Multiplicand,
4096 IN INT64 Multiplier,
4100 RETURN_STATUS Status;
4101 UINT64 UnsignedMultiplicand;
4102 UINT64 UnsignedMultiplier;
4103 UINT64 UnsignedResult;
4105 if (Result ==
NULL) {
4112 if (Multiplicand < 0) {
4116 UnsignedMultiplicand = ((UINT64)(-(Multiplicand + 1))) + 1;
4118 UnsignedMultiplicand = (UINT64)Multiplicand;
4121 if (Multiplier < 0) {
4125 UnsignedMultiplier = ((UINT64)(-(Multiplier + 1))) + 1;
4127 UnsignedMultiplier = (UINT64)Multiplier;
4130 Status =
SafeUint64Mult (UnsignedMultiplicand, UnsignedMultiplier, &UnsignedResult);
4132 if ((Multiplicand < 0) != (Multiplier < 0)) {
4133 if (UnsignedResult > MIN_INT64_MAGNITUDE) {
4134 *Result = INT64_ERROR;
4136 }
else if (UnsignedResult == MIN_INT64_MAGNITUDE) {
4137 *Result = MIN_INT64;
4139 *Result = -((INT64)UnsignedResult);
4142 if (UnsignedResult > MAX_INT64) {
4143 *Result = INT64_ERROR;
4146 *Result = (INT64)UnsignedResult;
4150 *Result = INT64_ERROR;
UINT64 EFIAPI MultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
INT64 EFIAPI MultS64x64(IN INT64 Multiplicand, IN INT64 Multiplier)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
#define RETURN_BUFFER_TOO_SMALL
#define RETURN_ERROR(StatusCode)
#define RETURN_INVALID_PARAMETER
RETURN_STATUS EFIAPI SafeInt16ToUint32(IN INT16 Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUint64ToInt8(IN UINT64 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeInt64ToInt32(IN INT64 Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeIntnToInt16(IN INTN Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeInt32Sub(IN INT32 Minuend, IN INT32 Subtrahend, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeUint64ToInt32(IN UINT64 Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeChar8Sub(IN CHAR8 Minuend, IN CHAR8 Subtrahend, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeIntnToInt8(IN INTN Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint16Sub(IN UINT16 Minuend, IN UINT16 Subtrahend, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt8ToUintn(IN INT8 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUint8Sub(IN UINT8 Minuend, IN UINT8 Subtrahend, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeInt8Mult(IN INT8 Multiplicand, IN INT8 Multiplier, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint32ToInt32(IN UINT32 Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeUint32Add(IN UINT32 Augend, IN UINT32 Addend, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUintnToInt32(IN UINTN Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeChar8Mult(IN CHAR8 Multiplicand, IN CHAR8 Multiplier, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUint32(IN INT32 Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUint64ToUint16(IN UINT64 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeIntnToChar8(IN INTN Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt32ToInt16(IN INT32 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeUint32Mult(IN UINT32 Multiplicand, IN UINT32 Multiplier, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeInt16ToChar8(IN INT16 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt8ToUint64(IN INT8 Operand, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeInt16ToUint64(IN INT16 Operand, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeInt16ToUintn(IN INT16 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUintnToInt8(IN UINTN Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint16Mult(IN UINT16 Multiplicand, IN UINT16 Multiplier, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUint64(IN INT32 Operand, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeUint64ToUint8(IN UINT64 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUint16ToInt16(IN UINT16 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeInt64ToUint32(IN INT64 Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUintnToIntn(IN UINTN Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUint64ToChar8(IN UINT64 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt64ToInt16(IN INT64 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeUint8ToInt8(IN UINT8 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint16Add(IN UINT16 Augend, IN UINT16 Addend, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeUintnToUint16(IN UINTN Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt32Mult(IN INT32 Multiplicand, IN INT32 Multiplier, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeInt64Mult(IN INT64 Multiplicand, IN INT64 Multiplier, OUT INT64 *Result)
RETURN_STATUS EFIAPI SafeUint32ToChar8(IN UINT32 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt16Mult(IN INT16 Multiplicand, IN INT16 Multiplier, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUint8(IN INT32 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeIntnToUint8(IN INTN Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUint64Sub(IN UINT64 Minuend, IN UINT64 Subtrahend, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeInt8Add(IN INT8 Augend, IN INT8 Addend, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeInt64ToInt8(IN INT64 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint64Add(IN UINT64 Augend, IN UINT64 Addend, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeInt16ToUint8(IN INT16 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUint32ToUint16(IN UINT32 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt16ToInt8(IN INT16 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeInt32ToInt8(IN INT32 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUintnToChar8(IN UINTN Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeUint64ToIntn(IN UINT64 Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeInt64ToChar8(IN INT64 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeUint64Mult(IN UINT64 Multiplicand, IN UINT64 Multiplier, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeIntnToUint64(IN INTN Operand, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeUint32ToInt8(IN UINT32 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeInt8ToUint8(IN INT8 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUint8Mult(IN UINT8 Multiplicand, IN UINT8 Multiplier, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeChar8Add(IN CHAR8 Augend, IN CHAR8 Addend, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt64Add(IN INT64 Augend, IN INT64 Addend, OUT INT64 *Result)
RETURN_STATUS EFIAPI SafeUint16ToChar8(IN UINT16 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt8ToUint32(IN INT8 Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeInt64ToUint64(IN INT64 Operand, OUT UINT64 *Result)
RETURN_STATUS EFIAPI SafeInt8Sub(IN INT8 Minuend, IN INT8 Subtrahend, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeInt8ToChar8(IN INT8 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeUint16ToInt8(IN UINT16 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUint64ToInt64(IN UINT64 Operand, OUT INT64 *Result)
RETURN_STATUS EFIAPI SafeInt32ToChar8(IN INT32 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUint16(IN INT32 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeUint32Sub(IN UINT32 Minuend, IN UINT32 Subtrahend, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeInt64ToUint8(IN INT64 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUintnToInt16(IN UINTN Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeInt16Sub(IN INT16 Minuend, IN INT16 Subtrahend, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeInt64ToUint16(IN INT64 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeUint16ToUint8(IN UINT16 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeIntnToUint16(IN INTN Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeUint32ToInt16(IN UINT32 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeUint64ToInt16(IN UINT64 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeIntnToUintn(IN INTN Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeInt8ToUint16(IN INT8 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt16ToUint16(IN INT16 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeUint32ToUint8(IN UINT32 Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUintnToUint8(IN UINTN Operand, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeUint64ToUint32(IN UINT64 Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUint8Add(IN UINT8 Augend, IN UINT8 Addend, OUT UINT8 *Result)
RETURN_STATUS EFIAPI SafeInt16Add(IN INT16 Augend, IN INT16 Addend, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeUint8ToChar8(IN UINT8 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt32Add(IN INT32 Augend, IN INT32 Addend, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeInt64Sub(IN INT64 Minuend, IN INT64 Subtrahend, OUT INT64 *Result)