12#ifndef __INT_SAFE_LIB_H__
13#define __INT_SAFE_LIB_H__
18#define INT8_ERROR ((INT8) -1)
19#define UINT8_ERROR MAX_UINT8
20#define CHAR8_ERROR ((CHAR8)(MAX_INT8))
21#define INT16_ERROR ((INT16) -1)
22#define UINT16_ERROR MAX_UINT16
23#define CHAR16_ERROR MAX_UINT16
24#define INT32_ERROR ((INT32) -1)
25#define UINT32_ERROR MAX_UINT32
26#define INT64_ERROR ((INT64) -1)
27#define UINT64_ERROR MAX_UINT64
28#define INTN_ERROR ((INTN) -1)
29#define UINTN_ERROR MAX_UINTN
35#define SafeInt8ToChar16 SafeInt8ToUint16
36#define SafeInt16ToChar16 SafeInt16ToUint16
37#define SafeInt32ToChar16 SafeInt32ToUint16
38#define SafeUint32ToChar16 SafeUint32ToUint16
39#define SafeInt64ToChar16 SafeInt64ToUint16
40#define SafeUint64ToChar16 SafeUint64ToUint16
41#define SafeIntnToChar16 SafeIntnToUint16
42#define SafeUintnToChar16 SafeUintnToUint16
44#define SafeChar16ToInt8 SafeUint16ToInt8
45#define SafeChar16ToUint8 SafeUint16ToUint8
46#define SafeChar16ToChar8 SafeUint16ToChar8
47#define SafeChar16ToInt16 SafeUint16ToInt16
49#define SafeChar16Mult SafeUint16Mult
50#define SafeChar16Sub SafeUint16Sub
51#define SafeChar16Add SafeUint16Add
2190 IN UINT8 Subtrahend,
2219 IN UINT16 Subtrahend,
2248 IN UINT32 Subtrahend,
2306 IN UINT64 Subtrahend,
2338 IN UINT8 Multiplicand,
2339 IN UINT8 Multiplier,
2367 IN UINT16 Multiplicand,
2368 IN UINT16 Multiplier,
2396 IN UINT32 Multiplicand,
2397 IN UINT32 Multiplier,
2454 IN UINT64 Multiplicand,
2455 IN UINT64 Multiplier,
2715 IN CHAR8 Subtrahend,
2744 IN INT16 Subtrahend,
2773 IN INT32 Subtrahend,
2831 IN INT64 Subtrahend,
2863 IN INT8 Multiplicand,
2892 IN CHAR8 Multiplicand,
2893 IN CHAR8 Multiplier,
2921 IN INT16 Multiplicand,
2922 IN INT16 Multiplier,
2950 IN INT32 Multiplicand,
2951 IN INT32 Multiplier,
3008 IN INT64 Multiplicand,
3009 IN INT64 Multiplier,
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 SafeInt64ToIntn(IN INT64 Operand, OUT INTN *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 SafeUint32ToIntn(IN UINT32 Operand, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeUint32ToInt32(IN UINT32 Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeUintnAdd(IN UINTN Augend, IN UINTN Addend, OUT UINTN *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 SafeIntnToInt32(IN INTN Operand, OUT INT32 *Result)
RETURN_STATUS EFIAPI SafeInt16ToUintn(IN INT16 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUintnToInt8(IN UINTN Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUintnMult(IN UINTN Multiplicand, IN UINTN Multiplier, OUT UINTN *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 SafeIntnToUint32(IN INTN Operand, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeInt64ToInt16(IN INT64 Operand, OUT INT16 *Result)
RETURN_STATUS EFIAPI SafeUint8ToInt8(IN UINT8 Operand, OUT INT8 *Result)
RETURN_STATUS EFIAPI SafeUintnToUint32(IN UINTN Operand, OUT UINT32 *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 SafeIntnMult(IN INTN Multiplicand, IN INTN Multiplier, OUT INTN *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 SafeIntnSub(IN INTN Minuend, IN INTN Subtrahend, OUT INTN *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 SafeUintnToInt64(IN UINTN Operand, OUT INT64 *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 SafeInt32ToUintn(IN INT32 Operand, OUT UINTN *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 SafeIntnAdd(IN INTN Augend, IN INTN Addend, OUT INTN *Result)
RETURN_STATUS EFIAPI SafeInt32ToChar8(IN INT32 Operand, OUT CHAR8 *Result)
RETURN_STATUS EFIAPI SafeInt32ToUint16(IN INT32 Operand, OUT UINT16 *Result)
RETURN_STATUS EFIAPI SafeInt64ToUintn(IN INT64 Operand, OUT UINTN *Result)
RETURN_STATUS EFIAPI SafeUint32Sub(IN UINT32 Minuend, IN UINT32 Subtrahend, OUT UINT32 *Result)
RETURN_STATUS EFIAPI SafeUint64ToUintn(IN UINT64 Operand, OUT UINTN *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 SafeUintnSub(IN UINTN Minuend, IN UINTN Subtrahend, OUT UINTN *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)