LLVM: lib/Target/AArch64/AArch64PointerAuth.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64POINTERAUTH_H

10#define LLVM_LIB_TARGET_AARCH64_AARCH64POINTERAUTH_H

11

14

15namespace llvm {

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

45

47

48

50

51

52

53

54

55

56

57

58

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

76

77

78

79

80

81

82

83

84

86};

87

88#define AUTH_CHECK_METHOD_CL_VALUES_COMMON \

89 clEnumValN(AArch64PAuth::AuthCheckMethod::None, "none", \

90 "Do not check authenticated address"), \

91 clEnumValN(AArch64PAuth::AuthCheckMethod::DummyLoad, "load", \

92 "Perform dummy load from authenticated address"), \

93 clEnumValN( \

94 AArch64PAuth::AuthCheckMethod::HighBitsNoTBI, "high-bits-notbi", \

95 "Compare bits 62 and 61 of address (TBI should be disabled)"), \

96 clEnumValN(AArch64PAuth::AuthCheckMethod::XPAC, "xpac", \

97 "Compare with the result of XPAC (requires Armv8.3-a)")

98

99#define AUTH_CHECK_METHOD_CL_VALUES_LR \

100 AUTH_CHECK_METHOD_CL_VALUES_COMMON, \

101 clEnumValN(AArch64PAuth::AuthCheckMethod::XPACHint, "xpac-hint", \

102 "Compare with the result of XPACLRI")

103

104

106

107}

108}

109

110#endif

unsigned getCheckerSizeInBytes(AuthCheckMethod Method)

Returns the number of bytes added by checkAuthenticatedRegister.

AuthCheckMethod

Variants of check performed on an authenticated pointer.

Definition AArch64PointerAuth.h:44

@ XPACHint

Check by comparing the authenticated value with an XPAC-ed one without using PAuth instructions not e...

Definition AArch64PointerAuth.h:75

@ DummyLoad

Perform a load to a temporary register.

Definition AArch64PointerAuth.h:49

@ HighBitsNoTBI

Check by comparing bits 62 and 61 of the authenticated address.

Definition AArch64PointerAuth.h:59

@ None

Do not check the value at all.

Definition AArch64PointerAuth.h:46

@ XPAC

Similar to XPACHint but using Armv8.3-only XPAC instruction, thus not restricted to LR:

Definition AArch64PointerAuth.h:85

This is an optimization pass for GlobalISel generic memory operations.