X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gold%2Faarch64.cc;h=46a278bd466bf14dc8f3700963a5882844b7b5c6;hb=5a8f5960fd8fc5136fc24ddaf08a25c73f9c8329;hp=2e3c42afdaa60d2404ef6726cdd5e60513664367;hpb=3b0357dadaf2366cc418ec725dec55b1cea1a2e7;p=binutils-gdb.git diff --git a/gold/aarch64.cc b/gold/aarch64.cc index 2e3c42afdaa..46a278bd466 100644 --- a/gold/aarch64.cc +++ b/gold/aarch64.cc @@ -1,6 +1,6 @@ // aarch64.cc -- aarch64 target support for gold. -// Copyright (C) 2014-2015 Free Software Foundation, Inc. +// Copyright (C) 2014-2023 Free Software Foundation, Inc. // Written by Jing Yu and Han Shen . // This file is part of gold. @@ -110,6 +110,10 @@ public: is_adrp(const Insntype insn) { return (insn & 0x9F000000) == 0x90000000; } + static bool + is_mrs_tpidr_el0(const Insntype insn) + { return (insn & 0xFFFFFFE0) == 0xd53bd040; } + static unsigned int aarch64_rm(const Insntype insn) { return aarch64_bits(insn, 16, 5); } @@ -156,7 +160,7 @@ public: uint64_t imm = ((adrp >> 29) & mask2) | (((adrp >> 5) & mask19) << 2); // Retrieve msb of 21-bit-signed imm for sign extension. uint64_t msbt = (imm >> 20) & 1; - // Real value is imm multipled by 4k. Value now has 33-bit information. + // Real value is imm multiplied by 4k. Value now has 33-bit information. int64_t value = imm << 12; // Sign extend to 64-bit by repeating msbt 31 (64-33) times and merge it // with value. @@ -266,7 +270,7 @@ public: uint32_t v = 0; uint32_t opc_v = 0; - /* Bail out quickly if INSN doesn't fall into the the load-store + /* Bail out quickly if INSN doesn't fall into the load-store encoding space. */ if (!aarch64_ldst (insn)) return false; @@ -784,8 +788,14 @@ Stub_template_repertoire::Stub_template_repertoire() 0x14000000, /* b