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.

llvm-svn: 266418
This commit is contained in:
Ulrich Weigand 2016-04-15 09:14:59 +00:00
parent 2b6c791930
commit d8d2c5c81c
1 changed files with 16 additions and 16 deletions

View File

@ -2652,12 +2652,12 @@ Scalar::SetValueFromData (DataExtractor &data, lldb::Encoding encoding, size_t b
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 &data, lldb::Encoding encoding, size_t b
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 &data, lldb::Encoding encoding, size_t b
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 &data, lldb::Encoding encoding, size_t b
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;