[llvm-branch-commits] [lldb] r245947 - Merging r245927:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 25 09:18:33 PDT 2015
Author: hans
Date: Tue Aug 25 11:18:32 2015
New Revision: 245947
URL: http://llvm.org/viewvc/llvm-project?rev=245947&view=rev
Log:
Merging r245927:
------------------------------------------------------------------------
r245927 | slthakur | 2015-08-25 02:52:59 -0700 (Tue, 25 Aug 2015) | 9 lines
Fix build on mips
Setting and getting register values as bytes instead of depending on the 128 bit integer support in register value.
This patch will fix the build failure in the release branch.
Reviewers: tberghammer, clayborg, hans
Subscribers: bhushan, nitesh.jain, jaydeep, lldb-commits
Differential: http://reviews.llvm.org/D12275
------------------------------------------------------------------------
Modified:
lldb/branches/release_37/ (props changed)
lldb/branches/release_37/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
Propchange: lldb/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 25 11:18:32 2015
@@ -1,3 +1,3 @@
/lldb/branches/apple/python-GIL:156467-162159
/lldb/branches/iohandler:198360-200250
-/lldb/trunk:242306,242381,242525,242529,243091,243618,244006,244864-244866,245217
+/lldb/trunk:242306,242381,242525,242529,243091,243618,244006,244864-244866,245217,245927
Modified: lldb/branches/release_37/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp?rev=245947&r1=245946&r2=245947&view=diff
==============================================================================
--- lldb/branches/release_37/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp (original)
+++ lldb/branches/release_37/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Tue Aug 25 11:18:32 2015
@@ -584,7 +584,6 @@ NativeRegisterContextLinux_mips64::ReadR
if (IsMSA(reg) || IsFPR(reg))
{
uint8_t *src;
- type128 int128;
error = ReadCP1();
@@ -604,9 +603,6 @@ NativeRegisterContextLinux_mips64::ReadR
assert (reg_info->byte_offset < sizeof(UserArea));
src = (uint8_t *)&m_msa + reg_info->byte_offset - (sizeof(m_gpr) + sizeof(m_fpr));
}
- int128.x[0] = *(uint64_t *)src;
- int128.x[1] = *(uint64_t *)(src + 8);
- llvm::APInt rhs = llvm::APInt(128, 2, int128.x);
switch (reg_info->byte_size)
{
case 4:
@@ -616,7 +612,7 @@ NativeRegisterContextLinux_mips64::ReadR
reg_value.SetUInt64(*(uint64_t *)src);
break;
case 16:
- reg_value.SetUInt128(rhs);
+ reg_value.SetBytes((const void *)src, 16, GetByteOrder());
break;
default:
assert(false && "Unhandled data size.");
@@ -660,7 +656,7 @@ NativeRegisterContextLinux_mips64::Write
if (IsFPR(reg_index) || IsMSA(reg_index))
{
uint8_t *dst;
- const uint64_t *src;
+ uint64_t *src;
// Initialise the FP and MSA buffers by reading all co-processor 1 registers
ReadCP1();
@@ -675,8 +671,6 @@ NativeRegisterContextLinux_mips64::Write
assert (reg_info->byte_offset < sizeof(UserArea));
dst = (uint8_t *)&m_msa + reg_info->byte_offset - (sizeof(m_gpr) + sizeof(m_fpr));
}
- llvm::APInt lhs;
- llvm::APInt fail_value = llvm::APInt::getMaxValue(128);
switch (reg_info->byte_size)
{
case 4:
@@ -686,8 +680,7 @@ NativeRegisterContextLinux_mips64::Write
*(uint64_t *)dst = reg_value.GetAsUInt64();
break;
case 16:
- lhs = reg_value.GetAsUInt128(fail_value);
- src = lhs.getRawData();
+ src = (uint64_t *)reg_value.GetBytes();
*(uint64_t *)dst = *src;
*(uint64_t *)(dst + 8) = *(src + 1);
break;
More information about the llvm-branch-commits
mailing list