Matej =?utf-8?q?Ko=C5=A1=C3=ADk?= <[email protected]>,
Matej =?utf-8?q?Ko=C5=A1=C3=ADk?= <[email protected]>,
Matej =?utf-8?q?Ko=C5=A1=C3=ADk?= <[email protected]>,
Matej =?utf-8?q?Ko=C5=A1=C3=ADk?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -54,3 +56,56 @@ TEST(RegisterValueTest, GetScalarValue) {
Scalar((APInt(128, 0xffeeddccbbaa9988ull) << 64) |
APInt(128, 0x7766554433221100)));
}
+
+static const Scalar etalon128(APInt(128, 0xffeeddccbbaa9988ull) << 64 |
+ APInt(128, 0x7766554433221100ull));
+
+void TestSetValueFromData128(const RegisterInfo &ri, void *src,
+ const lldb::ByteOrder endianness) {
+ DataExtractor src_extractor(src, 16, endianness, 8);
+ RegisterValue rv;
+ EXPECT_TRUE(rv.SetValueFromData(ri, src_extractor, 0, false).Success());
+ Scalar s;
+ EXPECT_TRUE(rv.GetScalarValue(s));
+ EXPECT_EQ(s, etalon128);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 128-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_128_le) {
+ RegisterValue rv;
----------------
DavidSpickett wrote:
Is now unused.
https://github.com/llvm/llvm-project/pull/163646
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits