• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- AArch64CA53Erratum835769Stub.h -------------------------------------===//
2 //
3 //                     The MCLinker Project
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #ifndef TARGET_AARCH64_AARCH64CA53ERRATUM835769STUB_H_
10 #define TARGET_AARCH64_AARCH64CA53ERRATUM835769STUB_H_
11 
12 #include "AArch64CA53ErratumStub.h"
13 
14 #include "mcld/Support/Compiler.h"
15 #include <llvm/Support/DataTypes.h>
16 #include <string>
17 #include <vector>
18 
19 namespace mcld {
20 
21 class FragmentRef;
22 
23 class AArch64CA53Erratum835769Stub : public AArch64CA53ErratumStub {
24  public:
25   static constexpr unsigned ErratumInsnOffset = 4;
26 
27   struct ErratumSequence {
28     unsigned insns[2];
29   };
30 
31  public:
32   AArch64CA53Erratum835769Stub();
33 
34   ~AArch64CA53Erratum835769Stub();
35 
36   bool isMyDuty(const FragmentRef& pFragRef) const;
37 
getErratumInsnOffset()38   unsigned getErratumInsnOffset() const {
39     return ErratumInsnOffset;
40   }
41 
getErratumSequenceSize()42   unsigned getErratumSequenceSize() const {
43     return sizeof(ErratumSequence);
44   }
45 
46  private:
47   /// for doClone
48   AArch64CA53Erratum835769Stub(const uint32_t* pData,
49                                size_t pSize,
50                                const char* pName,
51                                const_fixup_iterator pBegin,
52                                const_fixup_iterator pEnd);
53 
54   /// doClone
55   Stub* doClone();
56 
57  private:
58   DISALLOW_COPY_AND_ASSIGN(AArch64CA53Erratum835769Stub);
59 };
60 
61 }  // namespace mcld
62 
63 #endif  // TARGET_AARCH64_AARCH64CA53ERRATUM835769STUB_H_
64