Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static lldb_private::RegisterInfo g_register_infos_mte[] = {
DEFINE_EXTENSION_REG(mte_ctrl)};

static lldb_private::RegisterInfo g_register_infos_tls[] = {
DEFINE_EXTENSION_REG(tpidr),
DEFINE_EXTENSION_REG_GENERIC(tpidr, LLDB_REGNUM_GENERIC_TP),
// Only present when SME is present
DEFINE_EXTENSION_REG(tpidr2)};

Expand Down
15 changes: 13 additions & 2 deletions lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ static uint32_t g_d29_invalidates[] = {fpu_v29, fpu_s29, LLDB_INVALID_REGNUM};
static uint32_t g_d30_invalidates[] = {fpu_v30, fpu_s30, LLDB_INVALID_REGNUM};
static uint32_t g_d31_invalidates[] = {fpu_v31, fpu_s31, LLDB_INVALID_REGNUM};

// clang-format off
// Generates register kinds array with DWARF, EH frame and generic kind
#define MISC_KIND(reg, type, generic_kind) \
{ \
Expand All @@ -470,6 +471,11 @@ static uint32_t g_d31_invalidates[] = {fpu_v31, fpu_s31, LLDB_INVALID_REGNUM};
LLDB_INVALID_REGNUM, lldb_kind \
}

#define GENERIC_KIND(genenric_kind) \
{ \
LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, genenric_kind, \
LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM \
}
// Generates register kinds array for registers with only lldb kind
#define KIND_ALL_INVALID \
{ \
Expand All @@ -484,8 +490,6 @@ static uint32_t g_d31_invalidates[] = {fpu_v31, fpu_s31, LLDB_INVALID_REGNUM};
#define MISC_FPU_KIND(lldb_kind) LLDB_KIND(lldb_kind)
#define MISC_EXC_KIND(lldb_kind) LLDB_KIND(lldb_kind)

// clang-format off

// Defines a 64-bit general purpose register
#define DEFINE_GPR64(reg, generic_kind) \
{ \
Expand Down Expand Up @@ -540,6 +544,13 @@ static uint32_t g_d31_invalidates[] = {fpu_v31, fpu_s31, LLDB_INVALID_REGNUM};
#reg, nullptr, 8, 0, lldb::eEncodingUint, lldb::eFormatHex, \
KIND_ALL_INVALID, nullptr, nullptr, nullptr, \
}

// Used to define tpidr as a generic tp register
#define DEFINE_EXTENSION_REG_GENERIC(reg, generic_kind) \
{ \
#reg, nullptr, 8, 0, lldb::eEncodingUint, lldb::eFormatHex, \
GENERIC_KIND(generic_kind), nullptr, nullptr, nullptr, \
}

static lldb_private::RegisterInfo g_register_infos_arm64_le[] = {
// DEFINE_GPR64(name, GENERIC KIND)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def check_tls_reg(self, registers):
for register in registers:
self.expect("p {}_was_set".format(register), substrs=["true"])

self.expect("reg read tp", substrs=[hex(set_values["tpidr"])])

@skipUnlessArch("aarch64")
@skipUnlessPlatform(["linux"])
def test_tls_no_sme(self):
Expand Down
Loading