File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 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 {
4141};
4242} // end anonymous namespace
4343
44+ namespace {
4445enum Op {
4546 SUB_W = 0x00110000 ,
4647 SUB_D = 0x00118000 ,
@@ -65,6 +66,7 @@ enum Reg {
6566 R_T2 = 14 ,
6667 R_T3 = 15 ,
6768};
69+ } // namespace
6870
6971// Mask out the input's lowest 12 bits for use with `pcalau12i`, in sequences
7072// 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;
2626constexpr uint64_t ppc64TocOffset = 0x8000 ;
2727constexpr uint64_t dynamicThreadPointerOffset = 0x8000 ;
2828
29+ namespace {
2930// The instruction encoding of bits 21-30 from the ISA for the Xform and Dform
3031// instructions that can be used as part of the initial exec TLS sequence.
3132enum XFormOpcd {
@@ -139,6 +140,7 @@ enum class PPCPrefixedInsn : uint64_t {
139140 PSTXV = PREFIX_8LS | 0xd8000000 ,
140141 PSTXVP = PREFIX_8LS | 0xf8000000
141142};
143+
142144static bool checkPPCLegacyInsn (uint32_t encoding) {
143145 PPCLegacyInsn insn = static_cast <PPCLegacyInsn>(encoding);
144146 if (insn == PPCLegacyInsn::NOINSN)
@@ -164,7 +166,6 @@ enum class LegacyToPrefixMask : uint64_t {
164166 0x8000000003e00000 , // S/T (6-10) - The [S/T]X bit moves from 28 to 5.
165167};
166168
167- namespace {
168169class PPC64 final : public TargetInfo {
169170public:
170171 PPC64 ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class RISCV final : public TargetInfo {
5757
5858const uint64_t dtpOffset = 0x800 ;
5959
60+ namespace {
6061enum Op {
6162 ADDI = 0x13 ,
6263 AUIPC = 0x17 ,
@@ -78,6 +79,7 @@ enum Reg {
7879 X_A0 = 10 ,
7980 X_T3 = 28 ,
8081};
82+ } // namespace
8183
8284static uint32_t hi20 (uint32_t val) { return (val + 0x800 ) >> 12 ; }
8385static uint32_t lo12 (uint32_t val) { return val & 4095 ; }
You can’t perform that action at this time.
0 commit comments