Home | History | Annotate | Download | only in AArch64
      1 //===- AArch64CA53Erratum843419Stub.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_AARCH64CA53ERRATUM843419STUB_H_
     10 #define TARGET_AARCH64_AARCH64CA53ERRATUM843419STUB_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 AArch64CA53Erratum843419Stub : public AArch64CA53ErratumStub {
     24  public:
     25   static constexpr unsigned ErratumInsnOffset = 8;
     26 
     27   struct ErratumSequence {
     28     unsigned insns[3];
     29   };
     30 
     31  public:
     32   static bool isErratum843419Sequence(unsigned insn1,
     33                                       unsigned insn2,
     34                                       unsigned insn3);
     35 
     36  public:
     37   AArch64CA53Erratum843419Stub();
     38 
     39   ~AArch64CA53Erratum843419Stub();
     40 
     41   bool isMyDuty(const FragmentRef& pFragRef) const;
     42 
     43   unsigned getErratumInsnOffset() const {
     44     return ErratumInsnOffset;
     45   }
     46 
     47   unsigned getErratumSequenceSize() const {
     48     return sizeof(ErratumSequence);
     49   }
     50 
     51  private:
     52   /// for doClone
     53   AArch64CA53Erratum843419Stub(const uint32_t* pData,
     54                                size_t pSize,
     55                                const char* pName,
     56                                const_fixup_iterator pBegin,
     57                                const_fixup_iterator pEnd);
     58 
     59   /// doClone
     60   Stub* doClone();
     61 
     62  private:
     63   DISALLOW_COPY_AND_ASSIGN(AArch64CA53Erratum843419Stub);
     64 };
     65 
     66 }  // namespace mcld
     67 
     68 #endif  // TARGET_AARCH64_AARCH64CA53ERRATUM843419STUB_H_
     69