AArch64BaseInfo.h revision 87773c318fcee853fb34a80a10c4347d523bdafb
172062f5744557e270a38192554c3126ea5f97434Tim Northover//===-- AArch64BaseInfo.h - Top level definitions for AArch64- --*- C++ -*-===//
272062f5744557e270a38192554c3126ea5f97434Tim Northover//
372062f5744557e270a38192554c3126ea5f97434Tim Northover//                     The LLVM Compiler Infrastructure
472062f5744557e270a38192554c3126ea5f97434Tim Northover//
572062f5744557e270a38192554c3126ea5f97434Tim Northover// This file is distributed under the University of Illinois Open Source
672062f5744557e270a38192554c3126ea5f97434Tim Northover// License. See LICENSE.TXT for details.
772062f5744557e270a38192554c3126ea5f97434Tim Northover//
872062f5744557e270a38192554c3126ea5f97434Tim Northover//===----------------------------------------------------------------------===//
972062f5744557e270a38192554c3126ea5f97434Tim Northover//
1072062f5744557e270a38192554c3126ea5f97434Tim Northover// This file contains small standalone helper functions and enum definitions for
1172062f5744557e270a38192554c3126ea5f97434Tim Northover// the AArch64 target useful for the compiler back-end and the MC libraries.
1272062f5744557e270a38192554c3126ea5f97434Tim Northover// As such, it deliberately does not include references to LLVM core
1372062f5744557e270a38192554c3126ea5f97434Tim Northover// code gen types, passes, etc..
1472062f5744557e270a38192554c3126ea5f97434Tim Northover//
1572062f5744557e270a38192554c3126ea5f97434Tim Northover//===----------------------------------------------------------------------===//
1672062f5744557e270a38192554c3126ea5f97434Tim Northover
1772062f5744557e270a38192554c3126ea5f97434Tim Northover#ifndef LLVM_AARCH64_BASEINFO_H
1872062f5744557e270a38192554c3126ea5f97434Tim Northover#define LLVM_AARCH64_BASEINFO_H
1972062f5744557e270a38192554c3126ea5f97434Tim Northover
2072062f5744557e270a38192554c3126ea5f97434Tim Northover#include "llvm/ADT/StringSwitch.h"
2172062f5744557e270a38192554c3126ea5f97434Tim Northover#include "llvm/ADT/STLExtras.h"
2272062f5744557e270a38192554c3126ea5f97434Tim Northover#include "llvm/Support/ErrorHandling.h"
2372062f5744557e270a38192554c3126ea5f97434Tim Northover
2472062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace llvm {
2572062f5744557e270a38192554c3126ea5f97434Tim Northover
2672062f5744557e270a38192554c3126ea5f97434Tim Northover// // Enums corresponding to AArch64 condition codes
2772062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64CC {
2872062f5744557e270a38192554c3126ea5f97434Tim Northover  // The CondCodes constants map directly to the 4-bit encoding of the
2972062f5744557e270a38192554c3126ea5f97434Tim Northover  // condition field for predicated instructions.
3072062f5744557e270a38192554c3126ea5f97434Tim Northover  enum CondCodes {   // Meaning (integer)          Meaning (floating-point)
3172062f5744557e270a38192554c3126ea5f97434Tim Northover    EQ = 0,        // Equal                      Equal
3272062f5744557e270a38192554c3126ea5f97434Tim Northover    NE,            // Not equal                  Not equal, or unordered
3372062f5744557e270a38192554c3126ea5f97434Tim Northover    HS,            // Unsigned higher or same    >, ==, or unordered
3472062f5744557e270a38192554c3126ea5f97434Tim Northover    LO,            // Unsigned lower or same     Less than
3572062f5744557e270a38192554c3126ea5f97434Tim Northover    MI,            // Minus, negative            Less than
3672062f5744557e270a38192554c3126ea5f97434Tim Northover    PL,            // Plus, positive or zero     >, ==, or unordered
3772062f5744557e270a38192554c3126ea5f97434Tim Northover    VS,            // Overflow                   Unordered
3872062f5744557e270a38192554c3126ea5f97434Tim Northover    VC,            // No overflow                Ordered
3972062f5744557e270a38192554c3126ea5f97434Tim Northover    HI,            // Unsigned higher            Greater than, or unordered
4072062f5744557e270a38192554c3126ea5f97434Tim Northover    LS,            // Unsigned lower or same     Less than or equal
4172062f5744557e270a38192554c3126ea5f97434Tim Northover    GE,            // Greater than or equal      Greater than or equal
4272062f5744557e270a38192554c3126ea5f97434Tim Northover    LT,            // Less than                  Less than, or unordered
4372062f5744557e270a38192554c3126ea5f97434Tim Northover    GT,            // Signed greater than        Greater than
4472062f5744557e270a38192554c3126ea5f97434Tim Northover    LE,            // Signed less than or equal  <, ==, or unordered
4572062f5744557e270a38192554c3126ea5f97434Tim Northover    AL,            // Always (unconditional)     Always (unconditional)
4672062f5744557e270a38192554c3126ea5f97434Tim Northover    NV,             // Always (unconditional)     Always (unconditional)
4772062f5744557e270a38192554c3126ea5f97434Tim Northover    // Note the NV exists purely to disassemble 0b1111. Execution
4872062f5744557e270a38192554c3126ea5f97434Tim Northover    // is "always".
4972062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid
5072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
5172062f5744557e270a38192554c3126ea5f97434Tim Northover
5272062f5744557e270a38192554c3126ea5f97434Tim Northover} // namespace A64CC
5372062f5744557e270a38192554c3126ea5f97434Tim Northover
5472062f5744557e270a38192554c3126ea5f97434Tim Northoverinline static const char *A64CondCodeToString(A64CC::CondCodes CC) {
5572062f5744557e270a38192554c3126ea5f97434Tim Northover  switch (CC) {
5672062f5744557e270a38192554c3126ea5f97434Tim Northover  default: llvm_unreachable("Unknown condition code");
5772062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::EQ:  return "eq";
5872062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::NE:  return "ne";
5972062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::HS:  return "hs";
6072062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::LO:  return "lo";
6172062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::MI:  return "mi";
6272062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::PL:  return "pl";
6372062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::VS:  return "vs";
6472062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::VC:  return "vc";
6572062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::HI:  return "hi";
6672062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::LS:  return "ls";
6772062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::GE:  return "ge";
6872062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::LT:  return "lt";
6972062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::GT:  return "gt";
7072062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::LE:  return "le";
7172062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::AL:  return "al";
7272062f5744557e270a38192554c3126ea5f97434Tim Northover  case A64CC::NV:  return "nv";
7372062f5744557e270a38192554c3126ea5f97434Tim Northover  }
7472062f5744557e270a38192554c3126ea5f97434Tim Northover}
7572062f5744557e270a38192554c3126ea5f97434Tim Northover
7672062f5744557e270a38192554c3126ea5f97434Tim Northoverinline static A64CC::CondCodes A64StringToCondCode(StringRef CondStr) {
7772062f5744557e270a38192554c3126ea5f97434Tim Northover  return StringSwitch<A64CC::CondCodes>(CondStr.lower())
7872062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("eq", A64CC::EQ)
7972062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("ne", A64CC::NE)
8072062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("ne", A64CC::NE)
8172062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("hs", A64CC::HS)
8272062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("cs", A64CC::HS)
8372062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("lo", A64CC::LO)
8472062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("cc", A64CC::LO)
8572062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("mi", A64CC::MI)
8672062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("pl", A64CC::PL)
8772062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("vs", A64CC::VS)
8872062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("vc", A64CC::VC)
8972062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("hi", A64CC::HI)
9072062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("ls", A64CC::LS)
9172062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("ge", A64CC::GE)
9272062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("lt", A64CC::LT)
9372062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("gt", A64CC::GT)
9472062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("le", A64CC::LE)
9572062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("al", A64CC::AL)
9672062f5744557e270a38192554c3126ea5f97434Tim Northover             .Case("nv", A64CC::NV)
9772062f5744557e270a38192554c3126ea5f97434Tim Northover             .Default(A64CC::Invalid);
9872062f5744557e270a38192554c3126ea5f97434Tim Northover}
9972062f5744557e270a38192554c3126ea5f97434Tim Northover
10072062f5744557e270a38192554c3126ea5f97434Tim Northoverinline static A64CC::CondCodes A64InvertCondCode(A64CC::CondCodes CC) {
10172062f5744557e270a38192554c3126ea5f97434Tim Northover  // It turns out that the condition codes have been designed so that in order
10272062f5744557e270a38192554c3126ea5f97434Tim Northover  // to reverse the intent of the condition you only have to invert the low bit:
10372062f5744557e270a38192554c3126ea5f97434Tim Northover
10472062f5744557e270a38192554c3126ea5f97434Tim Northover  return static_cast<A64CC::CondCodes>(static_cast<unsigned>(CC) ^ 0x1);
10572062f5744557e270a38192554c3126ea5f97434Tim Northover}
10672062f5744557e270a38192554c3126ea5f97434Tim Northover
10772062f5744557e270a38192554c3126ea5f97434Tim Northover/// Instances of this class can perform bidirectional mapping from random
10872062f5744557e270a38192554c3126ea5f97434Tim Northover/// identifier strings to operand encodings. For example "MSR" takes a named
10972062f5744557e270a38192554c3126ea5f97434Tim Northover/// system-register which must be encoded somehow and decoded for printing. This
11072062f5744557e270a38192554c3126ea5f97434Tim Northover/// central location means that the information for those transformations is not
11172062f5744557e270a38192554c3126ea5f97434Tim Northover/// duplicated and remains in sync.
11272062f5744557e270a38192554c3126ea5f97434Tim Northover///
11372062f5744557e270a38192554c3126ea5f97434Tim Northover/// FIXME: currently the algorithm is a completely unoptimised linear
11472062f5744557e270a38192554c3126ea5f97434Tim Northover/// search. Obviously this could be improved, but we would probably want to work
11572062f5744557e270a38192554c3126ea5f97434Tim Northover/// out just how often these instructions are emitted before working on it. It
11672062f5744557e270a38192554c3126ea5f97434Tim Northover/// might even be optimal to just reorder the tables for the common instructions
11772062f5744557e270a38192554c3126ea5f97434Tim Northover/// rather than changing the algorithm.
11872062f5744557e270a38192554c3126ea5f97434Tim Northoverstruct NamedImmMapper {
11972062f5744557e270a38192554c3126ea5f97434Tim Northover  struct Mapping {
12072062f5744557e270a38192554c3126ea5f97434Tim Northover    const char *Name;
12172062f5744557e270a38192554c3126ea5f97434Tim Northover    uint32_t Value;
12272062f5744557e270a38192554c3126ea5f97434Tim Northover  };
12372062f5744557e270a38192554c3126ea5f97434Tim Northover
12472062f5744557e270a38192554c3126ea5f97434Tim Northover  template<int N>
12572062f5744557e270a38192554c3126ea5f97434Tim Northover  NamedImmMapper(const Mapping (&Pairs)[N], uint32_t TooBigImm)
12672062f5744557e270a38192554c3126ea5f97434Tim Northover    : Pairs(&Pairs[0]), NumPairs(N), TooBigImm(TooBigImm) {}
12772062f5744557e270a38192554c3126ea5f97434Tim Northover
12872062f5744557e270a38192554c3126ea5f97434Tim Northover  StringRef toString(uint32_t Value, bool &Valid) const;
12972062f5744557e270a38192554c3126ea5f97434Tim Northover  uint32_t fromString(StringRef Name, bool &Valid) const;
13072062f5744557e270a38192554c3126ea5f97434Tim Northover
13172062f5744557e270a38192554c3126ea5f97434Tim Northover  /// Many of the instructions allow an alternative assembly form consisting of
13272062f5744557e270a38192554c3126ea5f97434Tim Northover  /// a simple immediate. Currently the only valid forms are ranges [0, N) where
13372062f5744557e270a38192554c3126ea5f97434Tim Northover  /// N being 0 indicates no immediate syntax-form is allowed.
13472062f5744557e270a38192554c3126ea5f97434Tim Northover  bool validImm(uint32_t Value) const;
13572062f5744557e270a38192554c3126ea5f97434Tim Northoverprotected:
13672062f5744557e270a38192554c3126ea5f97434Tim Northover  const Mapping *Pairs;
13772062f5744557e270a38192554c3126ea5f97434Tim Northover  size_t NumPairs;
13872062f5744557e270a38192554c3126ea5f97434Tim Northover  uint32_t TooBigImm;
13972062f5744557e270a38192554c3126ea5f97434Tim Northover};
14072062f5744557e270a38192554c3126ea5f97434Tim Northover
14172062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64AT {
14272062f5744557e270a38192554c3126ea5f97434Tim Northover  enum ATValues {
14372062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,    // Op0 Op1  CRn   CRm   Op2
14472062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E1R = 0x43c0,  // 01  000  0111  1000  000
14572062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E2R = 0x63c0,  // 01  100  0111  1000  000
14672062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E3R = 0x73c0,  // 01  110  0111  1000  000
14772062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E1W = 0x43c1,  // 01  000  0111  1000  001
14872062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E2W = 0x63c1,  // 01  100  0111  1000  001
14972062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E3W = 0x73c1,  // 01  110  0111  1000  001
15072062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E0R = 0x43c2,  // 01  000  0111  1000  010
15172062f5744557e270a38192554c3126ea5f97434Tim Northover    S1E0W = 0x43c3,  // 01  000  0111  1000  011
15272062f5744557e270a38192554c3126ea5f97434Tim Northover    S12E1R = 0x63c4, // 01  100  0111  1000  100
15372062f5744557e270a38192554c3126ea5f97434Tim Northover    S12E1W = 0x63c5, // 01  100  0111  1000  101
15472062f5744557e270a38192554c3126ea5f97434Tim Northover    S12E0R = 0x63c6, // 01  100  0111  1000  110
15572062f5744557e270a38192554c3126ea5f97434Tim Northover    S12E0W = 0x63c7  // 01  100  0111  1000  111
15672062f5744557e270a38192554c3126ea5f97434Tim Northover  };
15772062f5744557e270a38192554c3126ea5f97434Tim Northover
15872062f5744557e270a38192554c3126ea5f97434Tim Northover  struct ATMapper : NamedImmMapper {
15972062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping ATPairs[];
16072062f5744557e270a38192554c3126ea5f97434Tim Northover
16172062f5744557e270a38192554c3126ea5f97434Tim Northover    ATMapper();
16272062f5744557e270a38192554c3126ea5f97434Tim Northover  };
16372062f5744557e270a38192554c3126ea5f97434Tim Northover
16472062f5744557e270a38192554c3126ea5f97434Tim Northover}
16572062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64DB {
16672062f5744557e270a38192554c3126ea5f97434Tim Northover  enum DBValues {
16772062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,
16872062f5744557e270a38192554c3126ea5f97434Tim Northover    OSHLD = 0x1,
16972062f5744557e270a38192554c3126ea5f97434Tim Northover    OSHST = 0x2,
17072062f5744557e270a38192554c3126ea5f97434Tim Northover    OSH =   0x3,
17172062f5744557e270a38192554c3126ea5f97434Tim Northover    NSHLD = 0x5,
17272062f5744557e270a38192554c3126ea5f97434Tim Northover    NSHST = 0x6,
17372062f5744557e270a38192554c3126ea5f97434Tim Northover    NSH =   0x7,
17472062f5744557e270a38192554c3126ea5f97434Tim Northover    ISHLD = 0x9,
17572062f5744557e270a38192554c3126ea5f97434Tim Northover    ISHST = 0xa,
17672062f5744557e270a38192554c3126ea5f97434Tim Northover    ISH =   0xb,
17772062f5744557e270a38192554c3126ea5f97434Tim Northover    LD =    0xd,
17872062f5744557e270a38192554c3126ea5f97434Tim Northover    ST =    0xe,
17972062f5744557e270a38192554c3126ea5f97434Tim Northover    SY =    0xf
18072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
18172062f5744557e270a38192554c3126ea5f97434Tim Northover
18272062f5744557e270a38192554c3126ea5f97434Tim Northover  struct DBarrierMapper : NamedImmMapper {
18372062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping DBarrierPairs[];
18472062f5744557e270a38192554c3126ea5f97434Tim Northover
18572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBarrierMapper();
18672062f5744557e270a38192554c3126ea5f97434Tim Northover  };
18772062f5744557e270a38192554c3126ea5f97434Tim Northover}
18872062f5744557e270a38192554c3126ea5f97434Tim Northover
18972062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace  A64DC {
19072062f5744557e270a38192554c3126ea5f97434Tim Northover  enum DCValues {
19172062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,   // Op1  CRn   CRm   Op2
19272062f5744557e270a38192554c3126ea5f97434Tim Northover    ZVA   = 0x5ba1, // 01  011  0111  0100  001
19372062f5744557e270a38192554c3126ea5f97434Tim Northover    IVAC  = 0x43b1, // 01  000  0111  0110  001
19472062f5744557e270a38192554c3126ea5f97434Tim Northover    ISW   = 0x43b2, // 01  000  0111  0110  010
19572062f5744557e270a38192554c3126ea5f97434Tim Northover    CVAC  = 0x5bd1, // 01  011  0111  1010  001
19672062f5744557e270a38192554c3126ea5f97434Tim Northover    CSW   = 0x43d2, // 01  000  0111  1010  010
19772062f5744557e270a38192554c3126ea5f97434Tim Northover    CVAU  = 0x5bd9, // 01  011  0111  1011  001
19872062f5744557e270a38192554c3126ea5f97434Tim Northover    CIVAC = 0x5bf1, // 01  011  0111  1110  001
19972062f5744557e270a38192554c3126ea5f97434Tim Northover    CISW  = 0x43f2  // 01  000  0111  1110  010
20072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
20172062f5744557e270a38192554c3126ea5f97434Tim Northover
20272062f5744557e270a38192554c3126ea5f97434Tim Northover  struct DCMapper : NamedImmMapper {
20372062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping DCPairs[];
20472062f5744557e270a38192554c3126ea5f97434Tim Northover
20572062f5744557e270a38192554c3126ea5f97434Tim Northover    DCMapper();
20672062f5744557e270a38192554c3126ea5f97434Tim Northover  };
20772062f5744557e270a38192554c3126ea5f97434Tim Northover
20872062f5744557e270a38192554c3126ea5f97434Tim Northover}
20972062f5744557e270a38192554c3126ea5f97434Tim Northover
21072062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace  A64IC {
21172062f5744557e270a38192554c3126ea5f97434Tim Northover  enum ICValues {
21272062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,     // Op1  CRn   CRm   Op2
21372062f5744557e270a38192554c3126ea5f97434Tim Northover    IALLUIS = 0x0388, // 000  0111  0001  000
21472062f5744557e270a38192554c3126ea5f97434Tim Northover    IALLU = 0x03a8,   // 000  0111  0101  000
21572062f5744557e270a38192554c3126ea5f97434Tim Northover    IVAU = 0x1ba9     // 011  0111  0101  001
21672062f5744557e270a38192554c3126ea5f97434Tim Northover  };
21772062f5744557e270a38192554c3126ea5f97434Tim Northover
21872062f5744557e270a38192554c3126ea5f97434Tim Northover
21972062f5744557e270a38192554c3126ea5f97434Tim Northover  struct ICMapper : NamedImmMapper {
22072062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping ICPairs[];
22172062f5744557e270a38192554c3126ea5f97434Tim Northover
22272062f5744557e270a38192554c3126ea5f97434Tim Northover    ICMapper();
22372062f5744557e270a38192554c3126ea5f97434Tim Northover  };
22472062f5744557e270a38192554c3126ea5f97434Tim Northover
22572062f5744557e270a38192554c3126ea5f97434Tim Northover  static inline bool NeedsRegister(ICValues Val) {
22672062f5744557e270a38192554c3126ea5f97434Tim Northover    return Val == IVAU;
22772062f5744557e270a38192554c3126ea5f97434Tim Northover  }
22872062f5744557e270a38192554c3126ea5f97434Tim Northover}
22972062f5744557e270a38192554c3126ea5f97434Tim Northover
23072062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace  A64ISB {
23172062f5744557e270a38192554c3126ea5f97434Tim Northover  enum ISBValues {
23272062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,
23372062f5744557e270a38192554c3126ea5f97434Tim Northover    SY = 0xf
23472062f5744557e270a38192554c3126ea5f97434Tim Northover  };
23572062f5744557e270a38192554c3126ea5f97434Tim Northover  struct ISBMapper : NamedImmMapper {
23672062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping ISBPairs[];
23772062f5744557e270a38192554c3126ea5f97434Tim Northover
23872062f5744557e270a38192554c3126ea5f97434Tim Northover    ISBMapper();
23972062f5744557e270a38192554c3126ea5f97434Tim Northover  };
24072062f5744557e270a38192554c3126ea5f97434Tim Northover}
24172062f5744557e270a38192554c3126ea5f97434Tim Northover
24272062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64PRFM {
24372062f5744557e270a38192554c3126ea5f97434Tim Northover  enum PRFMValues {
24472062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,
24572062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL1KEEP = 0x00,
24672062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL1STRM = 0x01,
24772062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL2KEEP = 0x02,
24872062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL2STRM = 0x03,
24972062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL3KEEP = 0x04,
25072062f5744557e270a38192554c3126ea5f97434Tim Northover    PLDL3STRM = 0x05,
2519e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL1KEEP = 0x08,
2529e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL1STRM = 0x09,
2539e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL2KEEP = 0x0a,
2549e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL2STRM = 0x0b,
2559e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL3KEEP = 0x0c,
2569e3b31345f0d17b757e183a8384db92616256926Tim Northover    PLIL3STRM = 0x0d,
25772062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL1KEEP = 0x10,
25872062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL1STRM = 0x11,
25972062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL2KEEP = 0x12,
26072062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL2STRM = 0x13,
26172062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL3KEEP = 0x14,
26272062f5744557e270a38192554c3126ea5f97434Tim Northover    PSTL3STRM = 0x15
26372062f5744557e270a38192554c3126ea5f97434Tim Northover  };
26472062f5744557e270a38192554c3126ea5f97434Tim Northover
26572062f5744557e270a38192554c3126ea5f97434Tim Northover  struct PRFMMapper : NamedImmMapper {
26672062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping PRFMPairs[];
26772062f5744557e270a38192554c3126ea5f97434Tim Northover
26872062f5744557e270a38192554c3126ea5f97434Tim Northover    PRFMMapper();
26972062f5744557e270a38192554c3126ea5f97434Tim Northover  };
27072062f5744557e270a38192554c3126ea5f97434Tim Northover}
27172062f5744557e270a38192554c3126ea5f97434Tim Northover
27272062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64PState {
27372062f5744557e270a38192554c3126ea5f97434Tim Northover  enum PStateValues {
27472062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,
27572062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSel = 0x05,
27672062f5744557e270a38192554c3126ea5f97434Tim Northover    DAIFSet = 0x1e,
27772062f5744557e270a38192554c3126ea5f97434Tim Northover    DAIFClr = 0x1f
27872062f5744557e270a38192554c3126ea5f97434Tim Northover  };
27972062f5744557e270a38192554c3126ea5f97434Tim Northover
28072062f5744557e270a38192554c3126ea5f97434Tim Northover  struct PStateMapper : NamedImmMapper {
28172062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping PStatePairs[];
28272062f5744557e270a38192554c3126ea5f97434Tim Northover
28372062f5744557e270a38192554c3126ea5f97434Tim Northover    PStateMapper();
28472062f5744557e270a38192554c3126ea5f97434Tim Northover  };
28572062f5744557e270a38192554c3126ea5f97434Tim Northover
28672062f5744557e270a38192554c3126ea5f97434Tim Northover}
28772062f5744557e270a38192554c3126ea5f97434Tim Northover
28872062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64SE {
28972062f5744557e270a38192554c3126ea5f97434Tim Northover    enum ShiftExtSpecifiers {
29072062f5744557e270a38192554c3126ea5f97434Tim Northover        Invalid = -1,
29172062f5744557e270a38192554c3126ea5f97434Tim Northover        LSL,
29287773c318fcee853fb34a80a10c4347d523bdafbTim Northover        MSL,
29372062f5744557e270a38192554c3126ea5f97434Tim Northover        LSR,
29472062f5744557e270a38192554c3126ea5f97434Tim Northover        ASR,
29572062f5744557e270a38192554c3126ea5f97434Tim Northover        ROR,
29672062f5744557e270a38192554c3126ea5f97434Tim Northover
29772062f5744557e270a38192554c3126ea5f97434Tim Northover        UXTB,
29872062f5744557e270a38192554c3126ea5f97434Tim Northover        UXTH,
29972062f5744557e270a38192554c3126ea5f97434Tim Northover        UXTW,
30072062f5744557e270a38192554c3126ea5f97434Tim Northover        UXTX,
30172062f5744557e270a38192554c3126ea5f97434Tim Northover
30272062f5744557e270a38192554c3126ea5f97434Tim Northover        SXTB,
30372062f5744557e270a38192554c3126ea5f97434Tim Northover        SXTH,
30472062f5744557e270a38192554c3126ea5f97434Tim Northover        SXTW,
30572062f5744557e270a38192554c3126ea5f97434Tim Northover        SXTX
30672062f5744557e270a38192554c3126ea5f97434Tim Northover    };
30772062f5744557e270a38192554c3126ea5f97434Tim Northover}
30872062f5744557e270a38192554c3126ea5f97434Tim Northover
30972062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64SysReg {
31072062f5744557e270a38192554c3126ea5f97434Tim Northover  enum SysRegROValues {
31172062f5744557e270a38192554c3126ea5f97434Tim Northover    MDCCSR_EL0        = 0x9808, // 10  011  0000  0001  000
31272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGDTRRX_EL0      = 0x9828, // 10  011  0000  0101  000
31372062f5744557e270a38192554c3126ea5f97434Tim Northover    MDRAR_EL1         = 0x8080, // 10  000  0001  0000  000
31472062f5744557e270a38192554c3126ea5f97434Tim Northover    OSLSR_EL1         = 0x808c, // 10  000  0001  0001  100
31572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGAUTHSTATUS_EL1 = 0x83f6, // 10  000  0111  1110  110
31672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCEID0_EL0       = 0xdce6, // 11  011  1001  1100  110
31772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCEID1_EL0       = 0xdce7, // 11  011  1001  1100  111
31872062f5744557e270a38192554c3126ea5f97434Tim Northover    MIDR_EL1          = 0xc000, // 11  000  0000  0000  000
31972062f5744557e270a38192554c3126ea5f97434Tim Northover    CCSIDR_EL1        = 0xc800, // 11  001  0000  0000  000
32072062f5744557e270a38192554c3126ea5f97434Tim Northover    CLIDR_EL1         = 0xc801, // 11  001  0000  0000  001
32172062f5744557e270a38192554c3126ea5f97434Tim Northover    CTR_EL0           = 0xd801, // 11  011  0000  0000  001
32272062f5744557e270a38192554c3126ea5f97434Tim Northover    MPIDR_EL1         = 0xc005, // 11  000  0000  0000  101
32372062f5744557e270a38192554c3126ea5f97434Tim Northover    REVIDR_EL1        = 0xc006, // 11  000  0000  0000  110
32472062f5744557e270a38192554c3126ea5f97434Tim Northover    AIDR_EL1          = 0xc807, // 11  001  0000  0000  111
32572062f5744557e270a38192554c3126ea5f97434Tim Northover    DCZID_EL0         = 0xd807, // 11  011  0000  0000  111
32672062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_PFR0_EL1       = 0xc008, // 11  000  0000  0001  000
32772062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_PFR1_EL1       = 0xc009, // 11  000  0000  0001  001
32872062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_DFR0_EL1       = 0xc00a, // 11  000  0000  0001  010
32972062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AFR0_EL1       = 0xc00b, // 11  000  0000  0001  011
33072062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_MMFR0_EL1      = 0xc00c, // 11  000  0000  0001  100
33172062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_MMFR1_EL1      = 0xc00d, // 11  000  0000  0001  101
33272062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_MMFR2_EL1      = 0xc00e, // 11  000  0000  0001  110
33372062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_MMFR3_EL1      = 0xc00f, // 11  000  0000  0001  111
33472062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR0_EL1      = 0xc010, // 11  000  0000  0010  000
33572062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR1_EL1      = 0xc011, // 11  000  0000  0010  001
33672062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR2_EL1      = 0xc012, // 11  000  0000  0010  010
33772062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR3_EL1      = 0xc013, // 11  000  0000  0010  011
33872062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR4_EL1      = 0xc014, // 11  000  0000  0010  100
33972062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_ISAR5_EL1      = 0xc015, // 11  000  0000  0010  101
34072062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64PFR0_EL1   = 0xc020, // 11  000  0000  0100  000
34172062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64PFR1_EL1   = 0xc021, // 11  000  0000  0100  001
34272062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64DFR0_EL1   = 0xc028, // 11  000  0000  0101  000
34372062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64DFR1_EL1   = 0xc029, // 11  000  0000  0101  001
34472062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64AFR0_EL1   = 0xc02c, // 11  000  0000  0101  100
34572062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64AFR1_EL1   = 0xc02d, // 11  000  0000  0101  101
34672062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64ISAR0_EL1  = 0xc030, // 11  000  0000  0110  000
34772062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64ISAR1_EL1  = 0xc031, // 11  000  0000  0110  001
34872062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64MMFR0_EL1  = 0xc038, // 11  000  0000  0111  000
34972062f5744557e270a38192554c3126ea5f97434Tim Northover    ID_AA64MMFR1_EL1  = 0xc039, // 11  000  0000  0111  001
35072062f5744557e270a38192554c3126ea5f97434Tim Northover    MVFR0_EL1         = 0xc018, // 11  000  0000  0011  000
35172062f5744557e270a38192554c3126ea5f97434Tim Northover    MVFR1_EL1         = 0xc019, // 11  000  0000  0011  001
35272062f5744557e270a38192554c3126ea5f97434Tim Northover    MVFR2_EL1         = 0xc01a, // 11  000  0000  0011  010
35372062f5744557e270a38192554c3126ea5f97434Tim Northover    RVBAR_EL1         = 0xc601, // 11  000  1100  0000  001
35472062f5744557e270a38192554c3126ea5f97434Tim Northover    RVBAR_EL2         = 0xe601, // 11  100  1100  0000  001
35572062f5744557e270a38192554c3126ea5f97434Tim Northover    RVBAR_EL3         = 0xf601, // 11  110  1100  0000  001
35672062f5744557e270a38192554c3126ea5f97434Tim Northover    ISR_EL1           = 0xc608, // 11  000  1100  0001  000
35772062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTPCT_EL0        = 0xdf01, // 11  011  1110  0000  001
35842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    CNTVCT_EL0        = 0xdf02,  // 11  011  1110  0000  010
35942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover
3604385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    // Trace registers
3614385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSTATR          = 0x8818, // 10  001  0000  0011  000
3624385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR8           = 0x8806, // 10  001  0000  0000  110
3634385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR9           = 0x880e, // 10  001  0000  0001  110
3644385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR10          = 0x8816, // 10  001  0000  0010  110
3654385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR11          = 0x881e, // 10  001  0000  0011  110
3664385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR12          = 0x8826, // 10  001  0000  0100  110
3674385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR13          = 0x882e, // 10  001  0000  0101  110
3684385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR0           = 0x8847, // 10  001  0000  1000  111
3694385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR1           = 0x884f, // 10  001  0000  1001  111
3704385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR2           = 0x8857, // 10  001  0000  1010  111
3714385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR3           = 0x885f, // 10  001  0000  1011  111
3724385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR4           = 0x8867, // 10  001  0000  1100  111
3734385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR5           = 0x886f, // 10  001  0000  1101  111
3744385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR6           = 0x8877, // 10  001  0000  1110  111
3754385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIDR7           = 0x887f, // 10  001  0000  1111  111
3764385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCOSLSR          = 0x888c, // 10  001  0001  0001  100
3774385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPDSR           = 0x88ac, // 10  001  0001  0101  100
3784385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDEVAFF0        = 0x8bd6, // 10  001  0111  1010  110
3794385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDEVAFF1        = 0x8bde, // 10  001  0111  1011  110
3804385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCLSR            = 0x8bee, // 10  001  0111  1101  110
3814385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCAUTHSTATUS     = 0x8bf6, // 10  001  0111  1110  110
3824385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDEVARCH        = 0x8bfe, // 10  001  0111  1111  110
3834385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDEVID          = 0x8b97, // 10  001  0111  0010  111
3844385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDEVTYPE        = 0x8b9f, // 10  001  0111  0011  111
3854385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR4          = 0x8ba7, // 10  001  0111  0100  111
3864385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR5          = 0x8baf, // 10  001  0111  0101  111
3874385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR6          = 0x8bb7, // 10  001  0111  0110  111
3884385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR7          = 0x8bbf, // 10  001  0111  0111  111
3894385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR0          = 0x8bc7, // 10  001  0111  1000  111
3904385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR1          = 0x8bcf, // 10  001  0111  1001  111
3914385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR2          = 0x8bd7, // 10  001  0111  1010  111
3924385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPIDR3          = 0x8bdf, // 10  001  0111  1011  111
3934385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDR0          = 0x8be7, // 10  001  0111  1100  111
3944385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDR1          = 0x8bef, // 10  001  0111  1101  111
3954385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDR2          = 0x8bf7, // 10  001  0111  1110  111
3964385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDR3          = 0x8bff, // 10  001  0111  1111  111
3974385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover
39842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    // GICv3 registers
39942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_IAR1_EL1      = 0xc660, // 11  000  1100  1100  000
40042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_IAR0_EL1      = 0xc640, // 11  000  1100  1000  000
40142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_HPPIR1_EL1    = 0xc662, // 11  000  1100  1100  010
40242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_HPPIR0_EL1    = 0xc642, // 11  000  1100  1000  010
40342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_RPR_EL1       = 0xc65b, // 11  000  1100  1011  011
40442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_VTR_EL2       = 0xe659, // 11  100  1100  1011  001
40542a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_EISR_EL2      = 0xe65b, // 11  100  1100  1011  011
40642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_ELSR_EL2      = 0xe65d  // 11  100  1100  1011  101
40772062f5744557e270a38192554c3126ea5f97434Tim Northover  };
40872062f5744557e270a38192554c3126ea5f97434Tim Northover
40972062f5744557e270a38192554c3126ea5f97434Tim Northover  enum SysRegWOValues {
41072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGDTRTX_EL0      = 0x9828, // 10  011  0000  0101  000
41172062f5744557e270a38192554c3126ea5f97434Tim Northover    OSLAR_EL1         = 0x8084, // 10  000  0001  0000  100
41242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    PMSWINC_EL0       = 0xdce4,  // 11  011  1001  1100  100
41342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover
4144385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    // Trace Registers
4154385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCOSLAR          = 0x8884, // 10  001  0001  0000  100
4164385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCLAR            = 0x8be6, // 10  001  0111  1100  110
4174385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover
41842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    // GICv3 registers
41942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_EOIR1_EL1     = 0xc661, // 11  000  1100  1100  001
42042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_EOIR0_EL1     = 0xc641, // 11  000  1100  1000  001
42142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_DIR_EL1       = 0xc659, // 11  000  1100  1011  001
42242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SGI1R_EL1     = 0xc65d, // 11  000  1100  1011  101
42342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_ASGI1R_EL1    = 0xc65e, // 11  000  1100  1011  110
42442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SGI0R_EL1     = 0xc65f  // 11  000  1100  1011  111
42572062f5744557e270a38192554c3126ea5f97434Tim Northover  };
42672062f5744557e270a38192554c3126ea5f97434Tim Northover
42772062f5744557e270a38192554c3126ea5f97434Tim Northover  enum SysRegValues {
42872062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,               // Op0 Op1  CRn   CRm   Op2
42972062f5744557e270a38192554c3126ea5f97434Tim Northover    OSDTRRX_EL1       = 0x8002, // 10  000  0000  0000  010
43072062f5744557e270a38192554c3126ea5f97434Tim Northover    OSDTRTX_EL1       = 0x801a, // 10  000  0000  0011  010
43172062f5744557e270a38192554c3126ea5f97434Tim Northover    TEECR32_EL1       = 0x9000, // 10  010  0000  0000  000
43272062f5744557e270a38192554c3126ea5f97434Tim Northover    MDCCINT_EL1       = 0x8010, // 10  000  0000  0010  000
43372062f5744557e270a38192554c3126ea5f97434Tim Northover    MDSCR_EL1         = 0x8012, // 10  000  0000  0010  010
43472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGDTR_EL0        = 0x9820, // 10  011  0000  0100  000
43572062f5744557e270a38192554c3126ea5f97434Tim Northover    OSECCR_EL1        = 0x8032, // 10  000  0000  0110  010
43672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGVCR32_EL2      = 0xa038, // 10  100  0000  0111  000
43772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR0_EL1       = 0x8004, // 10  000  0000  0000  100
43872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR1_EL1       = 0x800c, // 10  000  0000  0001  100
43972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR2_EL1       = 0x8014, // 10  000  0000  0010  100
44072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR3_EL1       = 0x801c, // 10  000  0000  0011  100
44172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR4_EL1       = 0x8024, // 10  000  0000  0100  100
44272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR5_EL1       = 0x802c, // 10  000  0000  0101  100
44372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR6_EL1       = 0x8034, // 10  000  0000  0110  100
44472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR7_EL1       = 0x803c, // 10  000  0000  0111  100
44572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR8_EL1       = 0x8044, // 10  000  0000  1000  100
44672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR9_EL1       = 0x804c, // 10  000  0000  1001  100
44772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR10_EL1      = 0x8054, // 10  000  0000  1010  100
44872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR11_EL1      = 0x805c, // 10  000  0000  1011  100
44972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR12_EL1      = 0x8064, // 10  000  0000  1100  100
45072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR13_EL1      = 0x806c, // 10  000  0000  1101  100
45172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR14_EL1      = 0x8074, // 10  000  0000  1110  100
45272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBVR15_EL1      = 0x807c, // 10  000  0000  1111  100
45372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR0_EL1       = 0x8005, // 10  000  0000  0000  101
45472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR1_EL1       = 0x800d, // 10  000  0000  0001  101
45572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR2_EL1       = 0x8015, // 10  000  0000  0010  101
45672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR3_EL1       = 0x801d, // 10  000  0000  0011  101
45772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR4_EL1       = 0x8025, // 10  000  0000  0100  101
45872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR5_EL1       = 0x802d, // 10  000  0000  0101  101
45972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR6_EL1       = 0x8035, // 10  000  0000  0110  101
46072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR7_EL1       = 0x803d, // 10  000  0000  0111  101
46172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR8_EL1       = 0x8045, // 10  000  0000  1000  101
46272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR9_EL1       = 0x804d, // 10  000  0000  1001  101
46372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR10_EL1      = 0x8055, // 10  000  0000  1010  101
46472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR11_EL1      = 0x805d, // 10  000  0000  1011  101
46572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR12_EL1      = 0x8065, // 10  000  0000  1100  101
46672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR13_EL1      = 0x806d, // 10  000  0000  1101  101
46772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR14_EL1      = 0x8075, // 10  000  0000  1110  101
46872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGBCR15_EL1      = 0x807d, // 10  000  0000  1111  101
46972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR0_EL1       = 0x8006, // 10  000  0000  0000  110
47072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR1_EL1       = 0x800e, // 10  000  0000  0001  110
47172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR2_EL1       = 0x8016, // 10  000  0000  0010  110
47272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR3_EL1       = 0x801e, // 10  000  0000  0011  110
47372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR4_EL1       = 0x8026, // 10  000  0000  0100  110
47472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR5_EL1       = 0x802e, // 10  000  0000  0101  110
47572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR6_EL1       = 0x8036, // 10  000  0000  0110  110
47672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR7_EL1       = 0x803e, // 10  000  0000  0111  110
47772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR8_EL1       = 0x8046, // 10  000  0000  1000  110
47872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR9_EL1       = 0x804e, // 10  000  0000  1001  110
47972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR10_EL1      = 0x8056, // 10  000  0000  1010  110
48072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR11_EL1      = 0x805e, // 10  000  0000  1011  110
48172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR12_EL1      = 0x8066, // 10  000  0000  1100  110
48272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR13_EL1      = 0x806e, // 10  000  0000  1101  110
48372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR14_EL1      = 0x8076, // 10  000  0000  1110  110
48472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWVR15_EL1      = 0x807e, // 10  000  0000  1111  110
48572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR0_EL1       = 0x8007, // 10  000  0000  0000  111
48672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR1_EL1       = 0x800f, // 10  000  0000  0001  111
48772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR2_EL1       = 0x8017, // 10  000  0000  0010  111
48872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR3_EL1       = 0x801f, // 10  000  0000  0011  111
48972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR4_EL1       = 0x8027, // 10  000  0000  0100  111
49072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR5_EL1       = 0x802f, // 10  000  0000  0101  111
49172062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR6_EL1       = 0x8037, // 10  000  0000  0110  111
49272062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR7_EL1       = 0x803f, // 10  000  0000  0111  111
49372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR8_EL1       = 0x8047, // 10  000  0000  1000  111
49472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR9_EL1       = 0x804f, // 10  000  0000  1001  111
49572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR10_EL1      = 0x8057, // 10  000  0000  1010  111
49672062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR11_EL1      = 0x805f, // 10  000  0000  1011  111
49772062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR12_EL1      = 0x8067, // 10  000  0000  1100  111
49872062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR13_EL1      = 0x806f, // 10  000  0000  1101  111
49972062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR14_EL1      = 0x8077, // 10  000  0000  1110  111
50072062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGWCR15_EL1      = 0x807f, // 10  000  0000  1111  111
50172062f5744557e270a38192554c3126ea5f97434Tim Northover    TEEHBR32_EL1      = 0x9080, // 10  010  0001  0000  000
50272062f5744557e270a38192554c3126ea5f97434Tim Northover    OSDLR_EL1         = 0x809c, // 10  000  0001  0011  100
50372062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGPRCR_EL1       = 0x80a4, // 10  000  0001  0100  100
50472062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGCLAIMSET_EL1   = 0x83c6, // 10  000  0111  1000  110
50572062f5744557e270a38192554c3126ea5f97434Tim Northover    DBGCLAIMCLR_EL1   = 0x83ce, // 10  000  0111  1001  110
50672062f5744557e270a38192554c3126ea5f97434Tim Northover    CSSELR_EL1        = 0xd000, // 11  010  0000  0000  000
50772062f5744557e270a38192554c3126ea5f97434Tim Northover    VPIDR_EL2         = 0xe000, // 11  100  0000  0000  000
50872062f5744557e270a38192554c3126ea5f97434Tim Northover    VMPIDR_EL2        = 0xe005, // 11  100  0000  0000  101
50972062f5744557e270a38192554c3126ea5f97434Tim Northover    CPACR_EL1         = 0xc082, // 11  000  0001  0000  010
51072062f5744557e270a38192554c3126ea5f97434Tim Northover    SCTLR_EL1         = 0xc080, // 11  000  0001  0000  000
51172062f5744557e270a38192554c3126ea5f97434Tim Northover    SCTLR_EL2         = 0xe080, // 11  100  0001  0000  000
51272062f5744557e270a38192554c3126ea5f97434Tim Northover    SCTLR_EL3         = 0xf080, // 11  110  0001  0000  000
51372062f5744557e270a38192554c3126ea5f97434Tim Northover    ACTLR_EL1         = 0xc081, // 11  000  0001  0000  001
51472062f5744557e270a38192554c3126ea5f97434Tim Northover    ACTLR_EL2         = 0xe081, // 11  100  0001  0000  001
51572062f5744557e270a38192554c3126ea5f97434Tim Northover    ACTLR_EL3         = 0xf081, // 11  110  0001  0000  001
51672062f5744557e270a38192554c3126ea5f97434Tim Northover    HCR_EL2           = 0xe088, // 11  100  0001  0001  000
51772062f5744557e270a38192554c3126ea5f97434Tim Northover    SCR_EL3           = 0xf088, // 11  110  0001  0001  000
51872062f5744557e270a38192554c3126ea5f97434Tim Northover    MDCR_EL2          = 0xe089, // 11  100  0001  0001  001
51972062f5744557e270a38192554c3126ea5f97434Tim Northover    SDER32_EL3        = 0xf089, // 11  110  0001  0001  001
52072062f5744557e270a38192554c3126ea5f97434Tim Northover    CPTR_EL2          = 0xe08a, // 11  100  0001  0001  010
52172062f5744557e270a38192554c3126ea5f97434Tim Northover    CPTR_EL3          = 0xf08a, // 11  110  0001  0001  010
52272062f5744557e270a38192554c3126ea5f97434Tim Northover    HSTR_EL2          = 0xe08b, // 11  100  0001  0001  011
52372062f5744557e270a38192554c3126ea5f97434Tim Northover    HACR_EL2          = 0xe08f, // 11  100  0001  0001  111
52472062f5744557e270a38192554c3126ea5f97434Tim Northover    MDCR_EL3          = 0xf099, // 11  110  0001  0011  001
52572062f5744557e270a38192554c3126ea5f97434Tim Northover    TTBR0_EL1         = 0xc100, // 11  000  0010  0000  000
52672062f5744557e270a38192554c3126ea5f97434Tim Northover    TTBR0_EL2         = 0xe100, // 11  100  0010  0000  000
52772062f5744557e270a38192554c3126ea5f97434Tim Northover    TTBR0_EL3         = 0xf100, // 11  110  0010  0000  000
52872062f5744557e270a38192554c3126ea5f97434Tim Northover    TTBR1_EL1         = 0xc101, // 11  000  0010  0000  001
52972062f5744557e270a38192554c3126ea5f97434Tim Northover    TCR_EL1           = 0xc102, // 11  000  0010  0000  010
53072062f5744557e270a38192554c3126ea5f97434Tim Northover    TCR_EL2           = 0xe102, // 11  100  0010  0000  010
53172062f5744557e270a38192554c3126ea5f97434Tim Northover    TCR_EL3           = 0xf102, // 11  110  0010  0000  010
53272062f5744557e270a38192554c3126ea5f97434Tim Northover    VTTBR_EL2         = 0xe108, // 11  100  0010  0001  000
53372062f5744557e270a38192554c3126ea5f97434Tim Northover    VTCR_EL2          = 0xe10a, // 11  100  0010  0001  010
53472062f5744557e270a38192554c3126ea5f97434Tim Northover    DACR32_EL2        = 0xe180, // 11  100  0011  0000  000
53572062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_EL1          = 0xc200, // 11  000  0100  0000  000
53672062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_EL2          = 0xe200, // 11  100  0100  0000  000
53772062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_EL3          = 0xf200, // 11  110  0100  0000  000
53872062f5744557e270a38192554c3126ea5f97434Tim Northover    ELR_EL1           = 0xc201, // 11  000  0100  0000  001
53972062f5744557e270a38192554c3126ea5f97434Tim Northover    ELR_EL2           = 0xe201, // 11  100  0100  0000  001
54072062f5744557e270a38192554c3126ea5f97434Tim Northover    ELR_EL3           = 0xf201, // 11  110  0100  0000  001
54172062f5744557e270a38192554c3126ea5f97434Tim Northover    SP_EL0            = 0xc208, // 11  000  0100  0001  000
54272062f5744557e270a38192554c3126ea5f97434Tim Northover    SP_EL1            = 0xe208, // 11  100  0100  0001  000
54372062f5744557e270a38192554c3126ea5f97434Tim Northover    SP_EL2            = 0xf208, // 11  110  0100  0001  000
54472062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSel             = 0xc210, // 11  000  0100  0010  000
54572062f5744557e270a38192554c3126ea5f97434Tim Northover    NZCV              = 0xda10, // 11  011  0100  0010  000
54672062f5744557e270a38192554c3126ea5f97434Tim Northover    DAIF              = 0xda11, // 11  011  0100  0010  001
54772062f5744557e270a38192554c3126ea5f97434Tim Northover    CurrentEL         = 0xc212, // 11  000  0100  0010  010
54872062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_irq          = 0xe218, // 11  100  0100  0011  000
54972062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_abt          = 0xe219, // 11  100  0100  0011  001
55072062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_und          = 0xe21a, // 11  100  0100  0011  010
55172062f5744557e270a38192554c3126ea5f97434Tim Northover    SPSR_fiq          = 0xe21b, // 11  100  0100  0011  011
55272062f5744557e270a38192554c3126ea5f97434Tim Northover    FPCR              = 0xda20, // 11  011  0100  0100  000
55372062f5744557e270a38192554c3126ea5f97434Tim Northover    FPSR              = 0xda21, // 11  011  0100  0100  001
55472062f5744557e270a38192554c3126ea5f97434Tim Northover    DSPSR_EL0         = 0xda28, // 11  011  0100  0101  000
55572062f5744557e270a38192554c3126ea5f97434Tim Northover    DLR_EL0           = 0xda29, // 11  011  0100  0101  001
55672062f5744557e270a38192554c3126ea5f97434Tim Northover    IFSR32_EL2        = 0xe281, // 11  100  0101  0000  001
55772062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR0_EL1         = 0xc288, // 11  000  0101  0001  000
55872062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR0_EL2         = 0xe288, // 11  100  0101  0001  000
55972062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR0_EL3         = 0xf288, // 11  110  0101  0001  000
56072062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR1_EL1         = 0xc289, // 11  000  0101  0001  001
56172062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR1_EL2         = 0xe289, // 11  100  0101  0001  001
56272062f5744557e270a38192554c3126ea5f97434Tim Northover    AFSR1_EL3         = 0xf289, // 11  110  0101  0001  001
56372062f5744557e270a38192554c3126ea5f97434Tim Northover    ESR_EL1           = 0xc290, // 11  000  0101  0010  000
56472062f5744557e270a38192554c3126ea5f97434Tim Northover    ESR_EL2           = 0xe290, // 11  100  0101  0010  000
56572062f5744557e270a38192554c3126ea5f97434Tim Northover    ESR_EL3           = 0xf290, // 11  110  0101  0010  000
56672062f5744557e270a38192554c3126ea5f97434Tim Northover    FPEXC32_EL2       = 0xe298, // 11  100  0101  0011  000
56772062f5744557e270a38192554c3126ea5f97434Tim Northover    FAR_EL1           = 0xc300, // 11  000  0110  0000  000
56872062f5744557e270a38192554c3126ea5f97434Tim Northover    FAR_EL2           = 0xe300, // 11  100  0110  0000  000
56972062f5744557e270a38192554c3126ea5f97434Tim Northover    FAR_EL3           = 0xf300, // 11  110  0110  0000  000
57072062f5744557e270a38192554c3126ea5f97434Tim Northover    HPFAR_EL2         = 0xe304, // 11  100  0110  0000  100
57172062f5744557e270a38192554c3126ea5f97434Tim Northover    PAR_EL1           = 0xc3a0, // 11  000  0111  0100  000
57272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCR_EL0          = 0xdce0, // 11  011  1001  1100  000
57372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCNTENSET_EL0    = 0xdce1, // 11  011  1001  1100  001
57472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCNTENCLR_EL0    = 0xdce2, // 11  011  1001  1100  010
57572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMOVSCLR_EL0      = 0xdce3, // 11  011  1001  1100  011
57672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMSELR_EL0        = 0xdce5, // 11  011  1001  1100  101
57772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCCNTR_EL0       = 0xdce8, // 11  011  1001  1101  000
57872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMXEVTYPER_EL0    = 0xdce9, // 11  011  1001  1101  001
57972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMXEVCNTR_EL0     = 0xdcea, // 11  011  1001  1101  010
58072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMUSERENR_EL0     = 0xdcf0, // 11  011  1001  1110  000
58172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMINTENSET_EL1    = 0xc4f1, // 11  000  1001  1110  001
58272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMINTENCLR_EL1    = 0xc4f2, // 11  000  1001  1110  010
58372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMOVSSET_EL0      = 0xdcf3, // 11  011  1001  1110  011
58472062f5744557e270a38192554c3126ea5f97434Tim Northover    MAIR_EL1          = 0xc510, // 11  000  1010  0010  000
58572062f5744557e270a38192554c3126ea5f97434Tim Northover    MAIR_EL2          = 0xe510, // 11  100  1010  0010  000
58672062f5744557e270a38192554c3126ea5f97434Tim Northover    MAIR_EL3          = 0xf510, // 11  110  1010  0010  000
58772062f5744557e270a38192554c3126ea5f97434Tim Northover    AMAIR_EL1         = 0xc518, // 11  000  1010  0011  000
58872062f5744557e270a38192554c3126ea5f97434Tim Northover    AMAIR_EL2         = 0xe518, // 11  100  1010  0011  000
58972062f5744557e270a38192554c3126ea5f97434Tim Northover    AMAIR_EL3         = 0xf518, // 11  110  1010  0011  000
59072062f5744557e270a38192554c3126ea5f97434Tim Northover    VBAR_EL1          = 0xc600, // 11  000  1100  0000  000
59172062f5744557e270a38192554c3126ea5f97434Tim Northover    VBAR_EL2          = 0xe600, // 11  100  1100  0000  000
59272062f5744557e270a38192554c3126ea5f97434Tim Northover    VBAR_EL3          = 0xf600, // 11  110  1100  0000  000
59372062f5744557e270a38192554c3126ea5f97434Tim Northover    RMR_EL1           = 0xc602, // 11  000  1100  0000  010
59472062f5744557e270a38192554c3126ea5f97434Tim Northover    RMR_EL2           = 0xe602, // 11  100  1100  0000  010
59572062f5744557e270a38192554c3126ea5f97434Tim Northover    RMR_EL3           = 0xf602, // 11  110  1100  0000  010
59672062f5744557e270a38192554c3126ea5f97434Tim Northover    CONTEXTIDR_EL1    = 0xc681, // 11  000  1101  0000  001
59772062f5744557e270a38192554c3126ea5f97434Tim Northover    TPIDR_EL0         = 0xde82, // 11  011  1101  0000  010
59872062f5744557e270a38192554c3126ea5f97434Tim Northover    TPIDR_EL2         = 0xe682, // 11  100  1101  0000  010
59972062f5744557e270a38192554c3126ea5f97434Tim Northover    TPIDR_EL3         = 0xf682, // 11  110  1101  0000  010
60072062f5744557e270a38192554c3126ea5f97434Tim Northover    TPIDRRO_EL0       = 0xde83, // 11  011  1101  0000  011
60172062f5744557e270a38192554c3126ea5f97434Tim Northover    TPIDR_EL1         = 0xc684, // 11  000  1101  0000  100
60272062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTFRQ_EL0        = 0xdf00, // 11  011  1110  0000  000
60372062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTVOFF_EL2       = 0xe703, // 11  100  1110  0000  011
60472062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTKCTL_EL1       = 0xc708, // 11  000  1110  0001  000
60572062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTHCTL_EL2       = 0xe708, // 11  100  1110  0001  000
60672062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTP_TVAL_EL0     = 0xdf10, // 11  011  1110  0010  000
60772062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTHP_TVAL_EL2    = 0xe710, // 11  100  1110  0010  000
60872062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTPS_TVAL_EL1    = 0xff10, // 11  111  1110  0010  000
60972062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTP_CTL_EL0      = 0xdf11, // 11  011  1110  0010  001
61072062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTHP_CTL_EL2     = 0xe711, // 11  100  1110  0010  001
61172062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTPS_CTL_EL1     = 0xff11, // 11  111  1110  0010  001
61272062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTP_CVAL_EL0     = 0xdf12, // 11  011  1110  0010  010
61372062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTHP_CVAL_EL2    = 0xe712, // 11  100  1110  0010  010
61472062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTPS_CVAL_EL1    = 0xff12, // 11  111  1110  0010  010
61572062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTV_TVAL_EL0     = 0xdf18, // 11  011  1110  0011  000
61672062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTV_CTL_EL0      = 0xdf19, // 11  011  1110  0011  001
61772062f5744557e270a38192554c3126ea5f97434Tim Northover    CNTV_CVAL_EL0     = 0xdf1a, // 11  011  1110  0011  010
61872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR0_EL0     = 0xdf40, // 11  011  1110  1000  000
61972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR1_EL0     = 0xdf41, // 11  011  1110  1000  001
62072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR2_EL0     = 0xdf42, // 11  011  1110  1000  010
62172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR3_EL0     = 0xdf43, // 11  011  1110  1000  011
62272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR4_EL0     = 0xdf44, // 11  011  1110  1000  100
62372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR5_EL0     = 0xdf45, // 11  011  1110  1000  101
62472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR6_EL0     = 0xdf46, // 11  011  1110  1000  110
62572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR7_EL0     = 0xdf47, // 11  011  1110  1000  111
62672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR8_EL0     = 0xdf48, // 11  011  1110  1001  000
62772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR9_EL0     = 0xdf49, // 11  011  1110  1001  001
62872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR10_EL0    = 0xdf4a, // 11  011  1110  1001  010
62972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR11_EL0    = 0xdf4b, // 11  011  1110  1001  011
63072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR12_EL0    = 0xdf4c, // 11  011  1110  1001  100
63172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR13_EL0    = 0xdf4d, // 11  011  1110  1001  101
63272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR14_EL0    = 0xdf4e, // 11  011  1110  1001  110
63372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR15_EL0    = 0xdf4f, // 11  011  1110  1001  111
63472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR16_EL0    = 0xdf50, // 11  011  1110  1010  000
63572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR17_EL0    = 0xdf51, // 11  011  1110  1010  001
63672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR18_EL0    = 0xdf52, // 11  011  1110  1010  010
63772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR19_EL0    = 0xdf53, // 11  011  1110  1010  011
63872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR20_EL0    = 0xdf54, // 11  011  1110  1010  100
63972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR21_EL0    = 0xdf55, // 11  011  1110  1010  101
64072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR22_EL0    = 0xdf56, // 11  011  1110  1010  110
64172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR23_EL0    = 0xdf57, // 11  011  1110  1010  111
64272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR24_EL0    = 0xdf58, // 11  011  1110  1011  000
64372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR25_EL0    = 0xdf59, // 11  011  1110  1011  001
64472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR26_EL0    = 0xdf5a, // 11  011  1110  1011  010
64572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR27_EL0    = 0xdf5b, // 11  011  1110  1011  011
64672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR28_EL0    = 0xdf5c, // 11  011  1110  1011  100
64772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR29_EL0    = 0xdf5d, // 11  011  1110  1011  101
64872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVCNTR30_EL0    = 0xdf5e, // 11  011  1110  1011  110
64972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMCCFILTR_EL0     = 0xdf7f, // 11  011  1110  1111  111
65072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER0_EL0    = 0xdf60, // 11  011  1110  1100  000
65172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER1_EL0    = 0xdf61, // 11  011  1110  1100  001
65272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER2_EL0    = 0xdf62, // 11  011  1110  1100  010
65372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER3_EL0    = 0xdf63, // 11  011  1110  1100  011
65472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER4_EL0    = 0xdf64, // 11  011  1110  1100  100
65572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER5_EL0    = 0xdf65, // 11  011  1110  1100  101
65672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER6_EL0    = 0xdf66, // 11  011  1110  1100  110
65772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER7_EL0    = 0xdf67, // 11  011  1110  1100  111
65872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER8_EL0    = 0xdf68, // 11  011  1110  1101  000
65972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER9_EL0    = 0xdf69, // 11  011  1110  1101  001
66072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER10_EL0   = 0xdf6a, // 11  011  1110  1101  010
66172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER11_EL0   = 0xdf6b, // 11  011  1110  1101  011
66272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER12_EL0   = 0xdf6c, // 11  011  1110  1101  100
66372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER13_EL0   = 0xdf6d, // 11  011  1110  1101  101
66472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER14_EL0   = 0xdf6e, // 11  011  1110  1101  110
66572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER15_EL0   = 0xdf6f, // 11  011  1110  1101  111
66672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER16_EL0   = 0xdf70, // 11  011  1110  1110  000
66772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER17_EL0   = 0xdf71, // 11  011  1110  1110  001
66872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER18_EL0   = 0xdf72, // 11  011  1110  1110  010
66972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER19_EL0   = 0xdf73, // 11  011  1110  1110  011
67072062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER20_EL0   = 0xdf74, // 11  011  1110  1110  100
67172062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER21_EL0   = 0xdf75, // 11  011  1110  1110  101
67272062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER22_EL0   = 0xdf76, // 11  011  1110  1110  110
67372062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER23_EL0   = 0xdf77, // 11  011  1110  1110  111
67472062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER24_EL0   = 0xdf78, // 11  011  1110  1111  000
67572062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER25_EL0   = 0xdf79, // 11  011  1110  1111  001
67672062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER26_EL0   = 0xdf7a, // 11  011  1110  1111  010
67772062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER27_EL0   = 0xdf7b, // 11  011  1110  1111  011
67872062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER28_EL0   = 0xdf7c, // 11  011  1110  1111  100
67972062f5744557e270a38192554c3126ea5f97434Tim Northover    PMEVTYPER29_EL0   = 0xdf7d, // 11  011  1110  1111  101
68042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    PMEVTYPER30_EL0   = 0xdf7e, // 11  011  1110  1111  110
68142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover
6824385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    // Trace registers
6834385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPRGCTLR        = 0x8808, // 10  001  0000  0001  000
6844385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPROCSELR       = 0x8810, // 10  001  0000  0010  000
6854385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCONFIGR        = 0x8820, // 10  001  0000  0100  000
6864385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCAUXCTLR        = 0x8830, // 10  001  0000  0110  000
6874385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCEVENTCTL0R     = 0x8840, // 10  001  0000  1000  000
6884385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCEVENTCTL1R     = 0x8848, // 10  001  0000  1001  000
6894385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSTALLCTLR      = 0x8858, // 10  001  0000  1011  000
6904385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCTSCTLR         = 0x8860, // 10  001  0000  1100  000
6914385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSYNCPR         = 0x8868, // 10  001  0000  1101  000
6924385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCCCTLR         = 0x8870, // 10  001  0000  1110  000
6934385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCBBCTLR         = 0x8878, // 10  001  0000  1111  000
6944385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCTRACEIDR       = 0x8801, // 10  001  0000  0000  001
6954385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCQCTLR          = 0x8809, // 10  001  0000  0001  001
6964385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVICTLR         = 0x8802, // 10  001  0000  0000  010
6974385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVIIECTLR       = 0x880a, // 10  001  0000  0001  010
6984385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVISSCTLR       = 0x8812, // 10  001  0000  0010  010
6994385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVIPCSSCTLR     = 0x881a, // 10  001  0000  0011  010
7004385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVDCTLR         = 0x8842, // 10  001  0000  1000  010
7014385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVDSACCTLR      = 0x884a, // 10  001  0000  1001  010
7024385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVDARCCTLR      = 0x8852, // 10  001  0000  1010  010
7034385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSEQEVR0        = 0x8804, // 10  001  0000  0000  100
7044385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSEQEVR1        = 0x880c, // 10  001  0000  0001  100
7054385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSEQEVR2        = 0x8814, // 10  001  0000  0010  100
7064385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSEQRSTEVR      = 0x8834, // 10  001  0000  0110  100
7074385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSEQSTR         = 0x883c, // 10  001  0000  0111  100
7084385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCEXTINSELR      = 0x8844, // 10  001  0000  1000  100
7094385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTRLDVR0      = 0x8805, // 10  001  0000  0000  101
7104385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTRLDVR1      = 0x880d, // 10  001  0000  0001  101
7114385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTRLDVR2      = 0x8815, // 10  001  0000  0010  101
7124385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTRLDVR3      = 0x881d, // 10  001  0000  0011  101
7134385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTCTLR0       = 0x8825, // 10  001  0000  0100  101
7144385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTCTLR1       = 0x882d, // 10  001  0000  0101  101
7154385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTCTLR2       = 0x8835, // 10  001  0000  0110  101
7164385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTCTLR3       = 0x883d, // 10  001  0000  0111  101
7174385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTVR0         = 0x8845, // 10  001  0000  1000  101
7184385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTVR1         = 0x884d, // 10  001  0000  1001  101
7194385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTVR2         = 0x8855, // 10  001  0000  1010  101
7204385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCNTVR3         = 0x885d, // 10  001  0000  1011  101
7214385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC0        = 0x8807, // 10  001  0000  0000  111
7224385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC1        = 0x880f, // 10  001  0000  0001  111
7234385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC2        = 0x8817, // 10  001  0000  0010  111
7244385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC3        = 0x881f, // 10  001  0000  0011  111
7254385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC4        = 0x8827, // 10  001  0000  0100  111
7264385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC5        = 0x882f, // 10  001  0000  0101  111
7274385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC6        = 0x8837, // 10  001  0000  0110  111
7284385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCIMSPEC7        = 0x883f, // 10  001  0000  0111  111
7294385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR2        = 0x8890, // 10  001  0001  0010  000
7304385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR3        = 0x8898, // 10  001  0001  0011  000
7314385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR4        = 0x88a0, // 10  001  0001  0100  000
7324385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR5        = 0x88a8, // 10  001  0001  0101  000
7334385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR6        = 0x88b0, // 10  001  0001  0110  000
7344385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR7        = 0x88b8, // 10  001  0001  0111  000
7354385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR8        = 0x88c0, // 10  001  0001  1000  000
7364385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR9        = 0x88c8, // 10  001  0001  1001  000
7374385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR10       = 0x88d0, // 10  001  0001  1010  000
7384385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR11       = 0x88d8, // 10  001  0001  1011  000
7394385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR12       = 0x88e0, // 10  001  0001  1100  000
7404385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR13       = 0x88e8, // 10  001  0001  1101  000
7414385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR14       = 0x88f0, // 10  001  0001  1110  000
7424385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR15       = 0x88f8, // 10  001  0001  1111  000
7434385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR16       = 0x8881, // 10  001  0001  0000  001
7444385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR17       = 0x8889, // 10  001  0001  0001  001
7454385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR18       = 0x8891, // 10  001  0001  0010  001
7464385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR19       = 0x8899, // 10  001  0001  0011  001
7474385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR20       = 0x88a1, // 10  001  0001  0100  001
7484385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR21       = 0x88a9, // 10  001  0001  0101  001
7494385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR22       = 0x88b1, // 10  001  0001  0110  001
7504385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR23       = 0x88b9, // 10  001  0001  0111  001
7514385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR24       = 0x88c1, // 10  001  0001  1000  001
7524385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR25       = 0x88c9, // 10  001  0001  1001  001
7534385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR26       = 0x88d1, // 10  001  0001  1010  001
7544385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR27       = 0x88d9, // 10  001  0001  1011  001
7554385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR28       = 0x88e1, // 10  001  0001  1100  001
7564385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR29       = 0x88e9, // 10  001  0001  1101  001
7574385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR30       = 0x88f1, // 10  001  0001  1110  001
7584385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCRSCTLR31       = 0x88f9, // 10  001  0001  1111  001
7594385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR0         = 0x8882, // 10  001  0001  0000  010
7604385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR1         = 0x888a, // 10  001  0001  0001  010
7614385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR2         = 0x8892, // 10  001  0001  0010  010
7624385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR3         = 0x889a, // 10  001  0001  0011  010
7634385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR4         = 0x88a2, // 10  001  0001  0100  010
7644385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR5         = 0x88aa, // 10  001  0001  0101  010
7654385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR6         = 0x88b2, // 10  001  0001  0110  010
7664385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCCR7         = 0x88ba, // 10  001  0001  0111  010
7674385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR0         = 0x88c2, // 10  001  0001  1000  010
7684385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR1         = 0x88ca, // 10  001  0001  1001  010
7694385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR2         = 0x88d2, // 10  001  0001  1010  010
7704385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR3         = 0x88da, // 10  001  0001  1011  010
7714385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR4         = 0x88e2, // 10  001  0001  1100  010
7724385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR5         = 0x88ea, // 10  001  0001  1101  010
7734385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR6         = 0x88f2, // 10  001  0001  1110  010
7744385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSCSR7         = 0x88fa, // 10  001  0001  1111  010
7754385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR0       = 0x8883, // 10  001  0001  0000  011
7764385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR1       = 0x888b, // 10  001  0001  0001  011
7774385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR2       = 0x8893, // 10  001  0001  0010  011
7784385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR3       = 0x889b, // 10  001  0001  0011  011
7794385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR4       = 0x88a3, // 10  001  0001  0100  011
7804385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR5       = 0x88ab, // 10  001  0001  0101  011
7814385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR6       = 0x88b3, // 10  001  0001  0110  011
7824385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCSSPCICR7       = 0x88bb, // 10  001  0001  0111  011
7834385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCPDCR           = 0x88a4, // 10  001  0001  0100  100
7844385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR0          = 0x8900, // 10  001  0010  0000  000
7854385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR1          = 0x8910, // 10  001  0010  0010  000
7864385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR2          = 0x8920, // 10  001  0010  0100  000
7874385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR3          = 0x8930, // 10  001  0010  0110  000
7884385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR4          = 0x8940, // 10  001  0010  1000  000
7894385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR5          = 0x8950, // 10  001  0010  1010  000
7904385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR6          = 0x8960, // 10  001  0010  1100  000
7914385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR7          = 0x8970, // 10  001  0010  1110  000
7924385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR8          = 0x8901, // 10  001  0010  0000  001
7934385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR9          = 0x8911, // 10  001  0010  0010  001
7944385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR10         = 0x8921, // 10  001  0010  0100  001
7954385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR11         = 0x8931, // 10  001  0010  0110  001
7964385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR12         = 0x8941, // 10  001  0010  1000  001
7974385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR13         = 0x8951, // 10  001  0010  1010  001
7984385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR14         = 0x8961, // 10  001  0010  1100  001
7994385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACVR15         = 0x8971, // 10  001  0010  1110  001
8004385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR0         = 0x8902, // 10  001  0010  0000  010
8014385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR1         = 0x8912, // 10  001  0010  0010  010
8024385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR2         = 0x8922, // 10  001  0010  0100  010
8034385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR3         = 0x8932, // 10  001  0010  0110  010
8044385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR4         = 0x8942, // 10  001  0010  1000  010
8054385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR5         = 0x8952, // 10  001  0010  1010  010
8064385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR6         = 0x8962, // 10  001  0010  1100  010
8074385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR7         = 0x8972, // 10  001  0010  1110  010
8084385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR8         = 0x8903, // 10  001  0010  0000  011
8094385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR9         = 0x8913, // 10  001  0010  0010  011
8104385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR10        = 0x8923, // 10  001  0010  0100  011
8114385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR11        = 0x8933, // 10  001  0010  0110  011
8124385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR12        = 0x8943, // 10  001  0010  1000  011
8134385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR13        = 0x8953, // 10  001  0010  1010  011
8144385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR14        = 0x8963, // 10  001  0010  1100  011
8154385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCACATR15        = 0x8973, // 10  001  0010  1110  011
8164385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR0         = 0x8904, // 10  001  0010  0000  100
8174385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR1         = 0x8924, // 10  001  0010  0100  100
8184385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR2         = 0x8944, // 10  001  0010  1000  100
8194385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR3         = 0x8964, // 10  001  0010  1100  100
8204385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR4         = 0x8905, // 10  001  0010  0000  101
8214385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR5         = 0x8925, // 10  001  0010  0100  101
8224385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR6         = 0x8945, // 10  001  0010  1000  101
8234385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCVR7         = 0x8965, // 10  001  0010  1100  101
8244385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR0         = 0x8906, // 10  001  0010  0000  110
8254385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR1         = 0x8926, // 10  001  0010  0100  110
8264385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR2         = 0x8946, // 10  001  0010  1000  110
8274385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR3         = 0x8966, // 10  001  0010  1100  110
8284385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR4         = 0x8907, // 10  001  0010  0000  111
8294385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR5         = 0x8927, // 10  001  0010  0100  111
8304385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR6         = 0x8947, // 10  001  0010  1000  111
8314385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCDVCMR7         = 0x8967, // 10  001  0010  1100  111
8324385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR0        = 0x8980, // 10  001  0011  0000  000
8334385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR1        = 0x8990, // 10  001  0011  0010  000
8344385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR2        = 0x89a0, // 10  001  0011  0100  000
8354385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR3        = 0x89b0, // 10  001  0011  0110  000
8364385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR4        = 0x89c0, // 10  001  0011  1000  000
8374385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR5        = 0x89d0, // 10  001  0011  1010  000
8384385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR6        = 0x89e0, // 10  001  0011  1100  000
8394385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCVR7        = 0x89f0, // 10  001  0011  1110  000
8404385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR0       = 0x8981, // 10  001  0011  0000  001
8414385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR1       = 0x8991, // 10  001  0011  0010  001
8424385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR2       = 0x89a1, // 10  001  0011  0100  001
8434385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR3       = 0x89b1, // 10  001  0011  0110  001
8444385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR4       = 0x89c1, // 10  001  0011  1000  001
8454385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR5       = 0x89d1, // 10  001  0011  1010  001
8464385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR6       = 0x89e1, // 10  001  0011  1100  001
8474385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCVR7       = 0x89f1, // 10  001  0011  1110  001
8484385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCCTLR0      = 0x8982, // 10  001  0011  0000  010
8494385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCIDCCTLR1      = 0x898a, // 10  001  0011  0001  010
8504385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCCTLR0     = 0x8992, // 10  001  0011  0010  010
8514385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCVMIDCCTLR1     = 0x899a, // 10  001  0011  0011  010
8524385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCITCTRL         = 0x8b84, // 10  001  0111  0000  100
8534385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCLAIMSET       = 0x8bc6, // 10  001  0111  1000  110
8544385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover    TRCCLAIMCLR       = 0x8bce, // 10  001  0111  1001  110
8554385f5dfced4e14bc59dfedb1f75116c0aabbc36Tim Northover
85642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    // GICv3 registers
85742a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_BPR1_EL1      = 0xc663, // 11  000  1100  1100  011
85842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_BPR0_EL1      = 0xc643, // 11  000  1100  1000  011
85942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_PMR_EL1       = 0xc230, // 11  000  0100  0110  000
86042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_CTLR_EL1      = 0xc664, // 11  000  1100  1100  100
86142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_CTLR_EL3      = 0xf664, // 11  110  1100  1100  100
86242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SRE_EL1       = 0xc665, // 11  000  1100  1100  101
86342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SRE_EL2       = 0xe64d, // 11  100  1100  1001  101
86442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SRE_EL3       = 0xf665, // 11  110  1100  1100  101
86542a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_IGRPEN0_EL1   = 0xc666, // 11  000  1100  1100  110
86642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_IGRPEN1_EL1   = 0xc667, // 11  000  1100  1100  111
86742a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_IGRPEN1_EL3   = 0xf667, // 11  110  1100  1100  111
86842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_SEIEN_EL1     = 0xc668, // 11  000  1100  1101  000
86942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP0R0_EL1     = 0xc644, // 11  000  1100  1000  100
87042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP0R1_EL1     = 0xc645, // 11  000  1100  1000  101
87142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP0R2_EL1     = 0xc646, // 11  000  1100  1000  110
87242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP0R3_EL1     = 0xc647, // 11  000  1100  1000  111
87342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP1R0_EL1     = 0xc648, // 11  000  1100  1001  000
87442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP1R1_EL1     = 0xc649, // 11  000  1100  1001  001
87542a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP1R2_EL1     = 0xc64a, // 11  000  1100  1001  010
87642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICC_AP1R3_EL1     = 0xc64b, // 11  000  1100  1001  011
87742a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP0R0_EL2     = 0xe640, // 11  100  1100  1000  000
87842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP0R1_EL2     = 0xe641, // 11  100  1100  1000  001
87942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP0R2_EL2     = 0xe642, // 11  100  1100  1000  010
88042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP0R3_EL2     = 0xe643, // 11  100  1100  1000  011
88142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP1R0_EL2     = 0xe648, // 11  100  1100  1001  000
88242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP1R1_EL2     = 0xe649, // 11  100  1100  1001  001
88342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP1R2_EL2     = 0xe64a, // 11  100  1100  1001  010
88442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_AP1R3_EL2     = 0xe64b, // 11  100  1100  1001  011
88542a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_HCR_EL2       = 0xe658, // 11  100  1100  1011  000
88642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_MISR_EL2      = 0xe65a, // 11  100  1100  1011  010
88742a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_VMCR_EL2      = 0xe65f, // 11  100  1100  1011  111
88842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_VSEIR_EL2     = 0xe64c, // 11  100  1100  1001  100
88942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR0_EL2       = 0xe660, // 11  100  1100  1100  000
89042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR1_EL2       = 0xe661, // 11  100  1100  1100  001
89142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR2_EL2       = 0xe662, // 11  100  1100  1100  010
89242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR3_EL2       = 0xe663, // 11  100  1100  1100  011
89342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR4_EL2       = 0xe664, // 11  100  1100  1100  100
89442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR5_EL2       = 0xe665, // 11  100  1100  1100  101
89542a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR6_EL2       = 0xe666, // 11  100  1100  1100  110
89642a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR7_EL2       = 0xe667, // 11  100  1100  1100  111
89742a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR8_EL2       = 0xe668, // 11  100  1100  1101  000
89842a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR9_EL2       = 0xe669, // 11  100  1100  1101  001
89942a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR10_EL2      = 0xe66a, // 11  100  1100  1101  010
90042a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR11_EL2      = 0xe66b, // 11  100  1100  1101  011
90142a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR12_EL2      = 0xe66c, // 11  100  1100  1101  100
90242a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR13_EL2      = 0xe66d, // 11  100  1100  1101  101
90342a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR14_EL2      = 0xe66e, // 11  100  1100  1101  110
90442a1b2f0b196633c0327801e810fc98849a00c47Tim Northover    ICH_LR15_EL2      = 0xe66f  // 11  100  1100  1101  111
90572062f5744557e270a38192554c3126ea5f97434Tim Northover  };
90672062f5744557e270a38192554c3126ea5f97434Tim Northover
90772062f5744557e270a38192554c3126ea5f97434Tim Northover  // Note that these do not inherit from NamedImmMapper. This class is
90872062f5744557e270a38192554c3126ea5f97434Tim Northover  // sufficiently different in its behaviour that I don't believe it's worth
90972062f5744557e270a38192554c3126ea5f97434Tim Northover  // burdening the common NamedImmMapper with abstractions only needed in
91072062f5744557e270a38192554c3126ea5f97434Tim Northover  // this one case.
91172062f5744557e270a38192554c3126ea5f97434Tim Northover  struct SysRegMapper {
91272062f5744557e270a38192554c3126ea5f97434Tim Northover    static const NamedImmMapper::Mapping SysRegPairs[];
91372062f5744557e270a38192554c3126ea5f97434Tim Northover
91472062f5744557e270a38192554c3126ea5f97434Tim Northover    const NamedImmMapper::Mapping *InstPairs;
91572062f5744557e270a38192554c3126ea5f97434Tim Northover    size_t NumInstPairs;
91672062f5744557e270a38192554c3126ea5f97434Tim Northover
91772062f5744557e270a38192554c3126ea5f97434Tim Northover    SysRegMapper() {}
91872062f5744557e270a38192554c3126ea5f97434Tim Northover    uint32_t fromString(StringRef Name, bool &Valid) const;
91972062f5744557e270a38192554c3126ea5f97434Tim Northover    std::string toString(uint32_t Bits, bool &Valid) const;
92072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
92172062f5744557e270a38192554c3126ea5f97434Tim Northover
92272062f5744557e270a38192554c3126ea5f97434Tim Northover  struct MSRMapper : SysRegMapper {
92372062f5744557e270a38192554c3126ea5f97434Tim Northover    static const NamedImmMapper::Mapping MSRPairs[];
92472062f5744557e270a38192554c3126ea5f97434Tim Northover    MSRMapper();
92572062f5744557e270a38192554c3126ea5f97434Tim Northover  };
92672062f5744557e270a38192554c3126ea5f97434Tim Northover
92772062f5744557e270a38192554c3126ea5f97434Tim Northover  struct MRSMapper : SysRegMapper {
92872062f5744557e270a38192554c3126ea5f97434Tim Northover    static const NamedImmMapper::Mapping MRSPairs[];
92972062f5744557e270a38192554c3126ea5f97434Tim Northover    MRSMapper();
93072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
93172062f5744557e270a38192554c3126ea5f97434Tim Northover
93272062f5744557e270a38192554c3126ea5f97434Tim Northover  uint32_t ParseGenericRegister(StringRef Name, bool &Valid);
93372062f5744557e270a38192554c3126ea5f97434Tim Northover}
93472062f5744557e270a38192554c3126ea5f97434Tim Northover
93572062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64TLBI {
93672062f5744557e270a38192554c3126ea5f97434Tim Northover  enum TLBIValues {
93772062f5744557e270a38192554c3126ea5f97434Tim Northover    Invalid = -1,          // Op0 Op1  CRn   CRm   Op2
93872062f5744557e270a38192554c3126ea5f97434Tim Northover    IPAS2E1IS    = 0x6401, // 01  100  1000  0000  001
93972062f5744557e270a38192554c3126ea5f97434Tim Northover    IPAS2LE1IS   = 0x6405, // 01  100  1000  0000  101
94072062f5744557e270a38192554c3126ea5f97434Tim Northover    VMALLE1IS    = 0x4418, // 01  000  1000  0011  000
94172062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE2IS      = 0x6418, // 01  100  1000  0011  000
94272062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE3IS      = 0x7418, // 01  110  1000  0011  000
94372062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE1IS       = 0x4419, // 01  000  1000  0011  001
94472062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE2IS       = 0x6419, // 01  100  1000  0011  001
94572062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE3IS       = 0x7419, // 01  110  1000  0011  001
94672062f5744557e270a38192554c3126ea5f97434Tim Northover    ASIDE1IS     = 0x441a, // 01  000  1000  0011  010
94772062f5744557e270a38192554c3126ea5f97434Tim Northover    VAAE1IS      = 0x441b, // 01  000  1000  0011  011
94872062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE1IS      = 0x641c, // 01  100  1000  0011  100
94972062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE1IS      = 0x441d, // 01  000  1000  0011  101
95072062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE2IS      = 0x641d, // 01  100  1000  0011  101
95172062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE3IS      = 0x741d, // 01  110  1000  0011  101
95272062f5744557e270a38192554c3126ea5f97434Tim Northover    VMALLS12E1IS = 0x641e, // 01  100  1000  0011  110
95372062f5744557e270a38192554c3126ea5f97434Tim Northover    VAALE1IS     = 0x441f, // 01  000  1000  0011  111
95472062f5744557e270a38192554c3126ea5f97434Tim Northover    IPAS2E1      = 0x6421, // 01  100  1000  0100  001
95572062f5744557e270a38192554c3126ea5f97434Tim Northover    IPAS2LE1     = 0x6425, // 01  100  1000  0100  101
95672062f5744557e270a38192554c3126ea5f97434Tim Northover    VMALLE1      = 0x4438, // 01  000  1000  0111  000
95772062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE2        = 0x6438, // 01  100  1000  0111  000
95872062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE3        = 0x7438, // 01  110  1000  0111  000
95972062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE1         = 0x4439, // 01  000  1000  0111  001
96072062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE2         = 0x6439, // 01  100  1000  0111  001
96172062f5744557e270a38192554c3126ea5f97434Tim Northover    VAE3         = 0x7439, // 01  110  1000  0111  001
96272062f5744557e270a38192554c3126ea5f97434Tim Northover    ASIDE1       = 0x443a, // 01  000  1000  0111  010
96372062f5744557e270a38192554c3126ea5f97434Tim Northover    VAAE1        = 0x443b, // 01  000  1000  0111  011
96472062f5744557e270a38192554c3126ea5f97434Tim Northover    ALLE1        = 0x643c, // 01  100  1000  0111  100
96572062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE1        = 0x443d, // 01  000  1000  0111  101
96672062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE2        = 0x643d, // 01  100  1000  0111  101
96772062f5744557e270a38192554c3126ea5f97434Tim Northover    VALE3        = 0x743d, // 01  110  1000  0111  101
96872062f5744557e270a38192554c3126ea5f97434Tim Northover    VMALLS12E1   = 0x643e, // 01  100  1000  0111  110
96972062f5744557e270a38192554c3126ea5f97434Tim Northover    VAALE1       = 0x443f  // 01  000  1000  0111  111
97072062f5744557e270a38192554c3126ea5f97434Tim Northover  };
97172062f5744557e270a38192554c3126ea5f97434Tim Northover
97272062f5744557e270a38192554c3126ea5f97434Tim Northover  struct TLBIMapper : NamedImmMapper {
97372062f5744557e270a38192554c3126ea5f97434Tim Northover    const static Mapping TLBIPairs[];
97472062f5744557e270a38192554c3126ea5f97434Tim Northover
97572062f5744557e270a38192554c3126ea5f97434Tim Northover    TLBIMapper();
97672062f5744557e270a38192554c3126ea5f97434Tim Northover  };
97772062f5744557e270a38192554c3126ea5f97434Tim Northover
97872062f5744557e270a38192554c3126ea5f97434Tim Northover  static inline bool NeedsRegister(TLBIValues Val) {
97972062f5744557e270a38192554c3126ea5f97434Tim Northover    switch (Val) {
98072062f5744557e270a38192554c3126ea5f97434Tim Northover    case VMALLE1IS:
98172062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE2IS:
98272062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE3IS:
98372062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE1IS:
98472062f5744557e270a38192554c3126ea5f97434Tim Northover    case VMALLS12E1IS:
98572062f5744557e270a38192554c3126ea5f97434Tim Northover    case VMALLE1:
98672062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE2:
98772062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE3:
98872062f5744557e270a38192554c3126ea5f97434Tim Northover    case ALLE1:
98972062f5744557e270a38192554c3126ea5f97434Tim Northover    case VMALLS12E1:
99072062f5744557e270a38192554c3126ea5f97434Tim Northover      return false;
99172062f5744557e270a38192554c3126ea5f97434Tim Northover    default:
99272062f5744557e270a38192554c3126ea5f97434Tim Northover      return true;
99372062f5744557e270a38192554c3126ea5f97434Tim Northover    }
99472062f5744557e270a38192554c3126ea5f97434Tim Northover  }
99572062f5744557e270a38192554c3126ea5f97434Tim Northover}
99672062f5744557e270a38192554c3126ea5f97434Tim Northover
99772062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace AArch64II {
99872062f5744557e270a38192554c3126ea5f97434Tim Northover
99972062f5744557e270a38192554c3126ea5f97434Tim Northover  enum TOF {
100072062f5744557e270a38192554c3126ea5f97434Tim Northover    //===--------------------------------------------------------------===//
100172062f5744557e270a38192554c3126ea5f97434Tim Northover    // AArch64 Specific MachineOperand flags.
100272062f5744557e270a38192554c3126ea5f97434Tim Northover
100372062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_NO_FLAG,
100472062f5744557e270a38192554c3126ea5f97434Tim Northover
100572062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_GOT - Represents a relocation referring to the GOT entry of a given
100672062f5744557e270a38192554c3126ea5f97434Tim Northover    // symbol. Used in adrp.
100772062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_GOT,
100872062f5744557e270a38192554c3126ea5f97434Tim Northover
100972062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_GOT_LO12 - Represents a relocation referring to the low 12 bits of the
101072062f5744557e270a38192554c3126ea5f97434Tim Northover    // GOT entry of a given symbol. Used in ldr only.
101172062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_GOT_LO12,
101272062f5744557e270a38192554c3126ea5f97434Tim Northover
101372062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_DTPREL_* - Represents a relocation referring to the offset from a
101472062f5744557e270a38192554c3126ea5f97434Tim Northover    // module's dynamic thread pointer. Used in the local-dynamic TLS access
101572062f5744557e270a38192554c3126ea5f97434Tim Northover    // model.
101672062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_DTPREL_G1,
101772062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_DTPREL_G0_NC,
101872062f5744557e270a38192554c3126ea5f97434Tim Northover
101972062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_GOTTPREL_* - Represents a relocation referring to a GOT entry
102072062f5744557e270a38192554c3126ea5f97434Tim Northover    // providing the offset of a variable from the thread-pointer. Used in
102172062f5744557e270a38192554c3126ea5f97434Tim Northover    // initial-exec TLS model where this offset is assigned in the static thread
102272062f5744557e270a38192554c3126ea5f97434Tim Northover    // block and thus known by the dynamic linker.
102372062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_GOTTPREL,
102472062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_GOTTPREL_LO12,
102572062f5744557e270a38192554c3126ea5f97434Tim Northover
102672062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_TLSDESC_* - Represents a relocation referring to a GOT entry providing
102772062f5744557e270a38192554c3126ea5f97434Tim Northover    // a TLS descriptor chosen by the dynamic linker. Used for the
102872062f5744557e270a38192554c3126ea5f97434Tim Northover    // general-dynamic and local-dynamic TLS access models where very littls is
102972062f5744557e270a38192554c3126ea5f97434Tim Northover    // known at link-time.
103072062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_TLSDESC,
103172062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_TLSDESC_LO12,
103272062f5744557e270a38192554c3126ea5f97434Tim Northover
103372062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_TPREL_* - Represents a relocation referring to the offset of a
103472062f5744557e270a38192554c3126ea5f97434Tim Northover    // variable from the thread pointer itself. Used in the local-exec TLS
103572062f5744557e270a38192554c3126ea5f97434Tim Northover    // access model.
103672062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_TPREL_G1,
103772062f5744557e270a38192554c3126ea5f97434Tim Northover    MO_TPREL_G0_NC,
103872062f5744557e270a38192554c3126ea5f97434Tim Northover
103972062f5744557e270a38192554c3126ea5f97434Tim Northover    // MO_LO12 - On a symbol operand, this represents a relocation containing
104072062f5744557e270a38192554c3126ea5f97434Tim Northover    // lower 12 bits of the address. Used in add/sub/ldr/str.
104145db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    MO_LO12,
104245db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover
104345db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    // MO_ABS_G* - Represent the 16-bit granules of an absolute reference using
104445db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    // movz/movk instructions.
104545db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    MO_ABS_G3,
104645db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    MO_ABS_G2_NC,
104745db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    MO_ABS_G1_NC,
104845db92038bf540fbbd8dfe5dff520aa8566d7cefTim Northover    MO_ABS_G0_NC
104972062f5744557e270a38192554c3126ea5f97434Tim Northover  };
105072062f5744557e270a38192554c3126ea5f97434Tim Northover}
105172062f5744557e270a38192554c3126ea5f97434Tim Northover
105272062f5744557e270a38192554c3126ea5f97434Tim Northoverclass APFloat;
105372062f5744557e270a38192554c3126ea5f97434Tim Northover
105472062f5744557e270a38192554c3126ea5f97434Tim Northovernamespace A64Imms {
105572062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isFPImm(const APFloat &Val, uint32_t &Imm8Bits);
105672062f5744557e270a38192554c3126ea5f97434Tim Northover
105772062f5744557e270a38192554c3126ea5f97434Tim Northover  inline bool isFPImm(const APFloat &Val) {
105872062f5744557e270a38192554c3126ea5f97434Tim Northover    uint32_t Imm8;
105972062f5744557e270a38192554c3126ea5f97434Tim Northover    return isFPImm(Val, Imm8);
106072062f5744557e270a38192554c3126ea5f97434Tim Northover  }
106172062f5744557e270a38192554c3126ea5f97434Tim Northover
106272062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isLogicalImm(unsigned RegWidth, uint64_t Imm, uint32_t &Bits);
106372062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isLogicalImmBits(unsigned RegWidth, uint32_t Bits, uint64_t &Imm);
106472062f5744557e270a38192554c3126ea5f97434Tim Northover
106572062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isMOVZImm(int RegWidth, uint64_t Value, int &UImm16, int &Shift);
106672062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isMOVNImm(int RegWidth, uint64_t Value, int &UImm16, int &Shift);
106772062f5744557e270a38192554c3126ea5f97434Tim Northover
106872062f5744557e270a38192554c3126ea5f97434Tim Northover  // We sometimes want to know whether the immediate is representable with a
106972062f5744557e270a38192554c3126ea5f97434Tim Northover  // MOVN but *not* with a MOVZ (because that would take priority).
107072062f5744557e270a38192554c3126ea5f97434Tim Northover  bool isOnlyMOVNImm(int RegWidth, uint64_t Value, int &UImm16, int &Shift);
107172062f5744557e270a38192554c3126ea5f97434Tim Northover
107287773c318fcee853fb34a80a10c4347d523bdafbTim Northover  uint64_t decodeNeonModImm(unsigned Val, unsigned OpCmode, unsigned &EltBits);
107387773c318fcee853fb34a80a10c4347d523bdafbTim Northover  bool decodeNeonModShiftImm(unsigned OpCmode, unsigned &ShiftImm,
107487773c318fcee853fb34a80a10c4347d523bdafbTim Northover                             unsigned &ShiftOnesIn);
107587773c318fcee853fb34a80a10c4347d523bdafbTim Northover  }
107672062f5744557e270a38192554c3126ea5f97434Tim Northover
107772062f5744557e270a38192554c3126ea5f97434Tim Northover} // end namespace llvm;
107872062f5744557e270a38192554c3126ea5f97434Tim Northover
107972062f5744557e270a38192554c3126ea5f97434Tim Northover#endif
1080