[Lldb-commits] [lldb] r266418 - Fix Scalar::SetValueFromData for 128- and 256-bit types
Ulrich Weigand via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 15 02:14:59 PDT 2016
Author: uweigand
Date: Fri Apr 15 04:14:59 2016
New Revision: 266418
URL: http://llvm.org/viewvc/llvm-project?rev=266418&view=rev
Log:
Fix Scalar::SetValueFromData for 128- and 256-bit types
Obvious fix for incorrect use of GetU64 offset pointer.
Originally committed as part of (now reverted) r266311.
Modified:
lldb/trunk/source/Core/Scalar.cpp
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=266418&r1=266417&r2=266418&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Fri Apr 15 04:14:59 2016
@@ -2652,12 +2652,12 @@ Scalar::SetValueFromData (DataExtractor
if (data.GetByteOrder() == eByteOrderBig)
{
int128.x[1] = (uint64_t)data.GetU64 (&offset);
- int128.x[0] = (uint64_t)data.GetU64 (&offset + 1);
+ int128.x[0] = (uint64_t)data.GetU64 (&offset);
}
else
{
int128.x[0] = (uint64_t)data.GetU64 (&offset);
- int128.x[1] = (uint64_t)data.GetU64 (&offset + 1);
+ int128.x[1] = (uint64_t)data.GetU64 (&offset);
}
operator=(llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, int128.x));
break;
@@ -2665,16 +2665,16 @@ Scalar::SetValueFromData (DataExtractor
if (data.GetByteOrder() == eByteOrderBig)
{
int256.x[3] = (uint64_t)data.GetU64 (&offset);
- int256.x[2] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[1] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[0] = (uint64_t)data.GetU64 (&offset + 1);
+ int256.x[2] = (uint64_t)data.GetU64 (&offset);
+ int256.x[1] = (uint64_t)data.GetU64 (&offset);
+ int256.x[0] = (uint64_t)data.GetU64 (&offset);
}
else
{
int256.x[0] = (uint64_t)data.GetU64 (&offset);
- int256.x[1] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[2] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[3] = (uint64_t)data.GetU64 (&offset + 1);
+ int256.x[1] = (uint64_t)data.GetU64 (&offset);
+ int256.x[2] = (uint64_t)data.GetU64 (&offset);
+ int256.x[3] = (uint64_t)data.GetU64 (&offset);
}
operator=(llvm::APInt(BITWIDTH_INT256, NUM_OF_WORDS_INT256, int256.x));
break;
@@ -2698,12 +2698,12 @@ Scalar::SetValueFromData (DataExtractor
if (data.GetByteOrder() == eByteOrderBig)
{
int128.x[1] = (uint64_t)data.GetU64 (&offset);
- int128.x[0] = (uint64_t)data.GetU64 (&offset + 1);
+ int128.x[0] = (uint64_t)data.GetU64 (&offset);
}
else
{
int128.x[0] = (uint64_t)data.GetU64 (&offset);
- int128.x[1] = (uint64_t)data.GetU64 (&offset + 1);
+ int128.x[1] = (uint64_t)data.GetU64 (&offset);
}
operator=(llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, int128.x));
break;
@@ -2711,16 +2711,16 @@ Scalar::SetValueFromData (DataExtractor
if (data.GetByteOrder() == eByteOrderBig)
{
int256.x[3] = (uint64_t)data.GetU64 (&offset);
- int256.x[2] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[1] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[0] = (uint64_t)data.GetU64 (&offset + 1);
+ int256.x[2] = (uint64_t)data.GetU64 (&offset);
+ int256.x[1] = (uint64_t)data.GetU64 (&offset);
+ int256.x[0] = (uint64_t)data.GetU64 (&offset);
}
else
{
int256.x[0] = (uint64_t)data.GetU64 (&offset);
- int256.x[1] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[2] = (uint64_t)data.GetU64 (&offset + 1);
- int256.x[3] = (uint64_t)data.GetU64 (&offset + 1);
+ int256.x[1] = (uint64_t)data.GetU64 (&offset);
+ int256.x[2] = (uint64_t)data.GetU64 (&offset);
+ int256.x[3] = (uint64_t)data.GetU64 (&offset);
}
operator=(llvm::APInt(BITWIDTH_INT256, NUM_OF_WORDS_INT256, int256.x));
break;
More information about the lldb-commits
mailing list