summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp62
1 files changed, 26 insertions, 36 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
index 1b2281004d2..982eefea9ba 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
@@ -7,8 +7,8 @@
//
//===---------------------------------------------------------------------===//
-#include <vector>
#include <stddef.h>
+#include <vector>
// For eh_frame and DWARF Register numbers
#include "RegisterContextLinux_mips.h"
@@ -29,48 +29,38 @@ using namespace lldb;
#include "RegisterInfos_mips.h"
#undef DECLARE_REGISTER_INFOS_MIPS_STRUCT
-uint32_t
-GetUserRegisterInfoCount (bool msa_present)
-{
- if (msa_present)
- return static_cast<uint32_t> (k_num_user_registers_mips);
- return static_cast<uint32_t> (k_num_user_registers_mips - k_num_msa_registers_mips);
+uint32_t GetUserRegisterInfoCount(bool msa_present) {
+ if (msa_present)
+ return static_cast<uint32_t>(k_num_user_registers_mips);
+ return static_cast<uint32_t>(k_num_user_registers_mips -
+ k_num_msa_registers_mips);
}
-RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch, bool msa_present) :
- RegisterInfoInterface(target_arch),
- m_user_register_count (GetUserRegisterInfoCount (msa_present))
-{
-}
+RegisterContextLinux_mips::RegisterContextLinux_mips(
+ const ArchSpec &target_arch, bool msa_present)
+ : RegisterInfoInterface(target_arch),
+ m_user_register_count(GetUserRegisterInfoCount(msa_present)) {}
-size_t
-RegisterContextLinux_mips::GetGPRSize() const
-{
- return sizeof(GPR_linux_mips);
+size_t RegisterContextLinux_mips::GetGPRSize() const {
+ return sizeof(GPR_linux_mips);
}
-const RegisterInfo *
-RegisterContextLinux_mips::GetRegisterInfo() const
-{
- switch (m_target_arch.GetMachine())
- {
- case llvm::Triple::mips:
- case llvm::Triple::mipsel:
- return g_register_infos_mips;
- default:
- assert(false && "Unhandled target architecture.");
- return NULL;
- }
+const RegisterInfo *RegisterContextLinux_mips::GetRegisterInfo() const {
+ switch (m_target_arch.GetMachine()) {
+ case llvm::Triple::mips:
+ case llvm::Triple::mipsel:
+ return g_register_infos_mips;
+ default:
+ assert(false && "Unhandled target architecture.");
+ return NULL;
+ }
}
-uint32_t
-RegisterContextLinux_mips::GetRegisterCount () const
-{
- return static_cast<uint32_t> (sizeof (g_register_infos_mips) / sizeof (g_register_infos_mips [0]));
+uint32_t RegisterContextLinux_mips::GetRegisterCount() const {
+ return static_cast<uint32_t>(sizeof(g_register_infos_mips) /
+ sizeof(g_register_infos_mips[0]));
}
-uint32_t
-RegisterContextLinux_mips::GetUserRegisterCount () const
-{
- return static_cast<uint32_t> (m_user_register_count);
+uint32_t RegisterContextLinux_mips::GetUserRegisterCount() const {
+ return static_cast<uint32_t>(m_user_register_count);
}
OpenPOWER on IntegriCloud