File tree 3 files changed +6
-1
lines changed
3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class LoongArch final : public TargetInfo {
41
41
};
42
42
} // end anonymous namespace
43
43
44
+ namespace {
44
45
enum Op {
45
46
SUB_W = 0x00110000 ,
46
47
SUB_D = 0x00118000 ,
@@ -65,6 +66,7 @@ enum Reg {
65
66
R_T2 = 14 ,
66
67
R_T3 = 15 ,
67
68
};
69
+ } // namespace
68
70
69
71
// Mask out the input's lowest 12 bits for use with `pcalau12i`, in sequences
70
72
// like `pcalau12i + addi.[wd]` or `pcalau12i + {ld,st}.*` where the `pcalau12i`
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ using namespace lld::elf;
26
26
constexpr uint64_t ppc64TocOffset = 0x8000 ;
27
27
constexpr uint64_t dynamicThreadPointerOffset = 0x8000 ;
28
28
29
+ namespace {
29
30
// The instruction encoding of bits 21-30 from the ISA for the Xform and Dform
30
31
// instructions that can be used as part of the initial exec TLS sequence.
31
32
enum XFormOpcd {
@@ -139,6 +140,7 @@ enum class PPCPrefixedInsn : uint64_t {
139
140
PSTXV = PREFIX_8LS | 0xd8000000 ,
140
141
PSTXVP = PREFIX_8LS | 0xf8000000
141
142
};
143
+
142
144
static bool checkPPCLegacyInsn (uint32_t encoding) {
143
145
PPCLegacyInsn insn = static_cast <PPCLegacyInsn>(encoding);
144
146
if (insn == PPCLegacyInsn::NOINSN)
@@ -164,7 +166,6 @@ enum class LegacyToPrefixMask : uint64_t {
164
166
0x8000000003e00000 , // S/T (6-10) - The [S/T]X bit moves from 28 to 5.
165
167
};
166
168
167
- namespace {
168
169
class PPC64 final : public TargetInfo {
169
170
public:
170
171
PPC64 ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class RISCV final : public TargetInfo {
57
57
58
58
const uint64_t dtpOffset = 0x800 ;
59
59
60
+ namespace {
60
61
enum Op {
61
62
ADDI = 0x13 ,
62
63
AUIPC = 0x17 ,
@@ -78,6 +79,7 @@ enum Reg {
78
79
X_A0 = 10 ,
79
80
X_T3 = 28 ,
80
81
};
82
+ } // namespace
81
83
82
84
static uint32_t hi20 (uint32_t val) { return (val + 0x800 ) >> 12 ; }
83
85
static uint32_t lo12 (uint32_t val) { return val & 4095 ; }
You can’t perform that action at this time.
0 commit comments