[Lldb-commits] [PATCH] D143374: [LLDB][RISCV] Add RVV register infos
Emmmer S via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 19 01:26:47 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGefd64c2f2506: [LLDB][RISCV] Add RVV register infos (authored by Emmmer).
Herald added a subscriber: lldb-commits.
Changed prior to commit:
https://reviews.llvm.org/D143374?vs=495161&id=514857#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143374/new/
https://reviews.llvm.org/D143374
Files:
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h
lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h
Index: lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h
===================================================================
--- lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h
+++ lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h
@@ -42,6 +42,9 @@
// FPR register kinds array for vector registers
#define FPR64_KIND(reg, generic_kind) KIND_HELPER(reg, generic_kind)
+// VPR register kinds array for vector registers
+#define VPR_KIND(reg, generic_kind) KIND_HELPER(reg, generic_kind)
+
// Defines a 64-bit general purpose register
#define DEFINE_GPR64(reg, generic_kind) DEFINE_GPR64_ALT(reg, reg, generic_kind)
@@ -64,6 +67,16 @@
FPR64_KIND(fpr_##reg, generic_kind), nullptr, nullptr, nullptr, \
}
+#define DEFINE_VPR(reg, generic_kind) DEFINE_VPR_ALT(reg, reg, generic_kind)
+
+// Defines a scalable vector register, with default size 128 bits
+// The byte offset 0 is a placeholder, which should be corrected at runtime.
+#define DEFINE_VPR_ALT(reg, alt, generic_kind) \
+ { \
+ #reg, #alt, 16, 0, lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, \
+ VPR_KIND(vpr_##reg, generic_kind), nullptr, nullptr \
+ }
+
// clang-format on
static lldb_private::RegisterInfo g_register_infos_riscv64_le[] = {
@@ -135,6 +148,39 @@
DEFINE_FPR64_ALT(ft10, f30, LLDB_INVALID_REGNUM),
DEFINE_FPR64_ALT(ft11, f31, LLDB_INVALID_REGNUM),
DEFINE_FPR_ALT(fcsr, nullptr, 4, LLDB_INVALID_REGNUM),
+
+ DEFINE_VPR(v0, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v1, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v2, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v3, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v4, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v5, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v6, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v7, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v8, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v9, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v10, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v11, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v12, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v13, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v14, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v15, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v16, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v17, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v18, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v19, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v20, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v21, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v22, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v23, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v24, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v25, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v26, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v27, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v28, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v29, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v30, LLDB_INVALID_REGNUM),
+ DEFINE_VPR(v31, LLDB_INVALID_REGNUM),
};
#endif // DECLARE_REGISTER_INFOS_RISCV64_STRUCT
Index: lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h
===================================================================
--- lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h
+++ lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h
@@ -35,6 +35,11 @@
uint32_t fcsr;
};
+ struct VPR {
+ // The size should be VLEN*32 in bits, but we don't have VLEN here.
+ void *vpr;
+ };
+
RegisterInfoPOSIX_riscv64(const lldb_private::ArchSpec &target_arch,
lldb_private::Flags flags);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143374.514857.patch
Type: text/x-patch
Size: 3591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230419/b34cd00a/attachment-0001.bin>
More information about the lldb-commits
mailing list