https://github.com/sedymrak updated 
https://github.com/llvm/llvm-project/pull/166363

From 2db982dc82d45647944e8d511fc074caab3127c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Fri, 31 Oct 2025 18:12:18 +0100
Subject: [PATCH 01/15] [lldb] reorganize existing tests (in order to facility
 sucessive additions)

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 27 ++++++++++----------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index 6239dbe21634a..92c0172e0c909 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -57,13 +57,11 @@ TEST(RegisterValueTest, GetScalarValue) {
                    APInt(128, 0x7766554433221100)));
 }
 
-static const Scalar etalon128(APInt(128, 0xffeeddccbbaa9988ull) << 64 |
-                              APInt(128, 0x7766554433221100ull));
-
-void TestSetValueFromData128(void *src, const lldb::ByteOrder endianness) {
+void TestSetValueFromData(const Scalar &etalon, void *src, size_t 
src_byte_size,
+                          const lldb::ByteOrder endianness) {
   RegisterInfo ri{"uint128_register",
                   nullptr,
-                  16,
+                  static_cast<uint32_t>(src_byte_size),
                   0,
                   lldb::Encoding::eEncodingUint,
                   lldb::Format::eFormatDefault,
@@ -71,26 +69,29 @@ void TestSetValueFromData128(void *src, const 
lldb::ByteOrder endianness) {
                   nullptr,
                   nullptr,
                   nullptr};
-  DataExtractor src_extractor(src, 16, endianness, 8);
+  DataExtractor src_extractor(src, src_byte_size, 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);
+  EXPECT_EQ(s, etalon);
 }
 
+static const Scalar etalon128(APInt(128, 0x0f0e0d0c0b0a0908ull) << 1 * 64 |
+                              APInt(128, 0x0706050403020100ull) << 0 * 64);
+
 // Test that the "RegisterValue::SetValueFromData" method works correctly
 // with 128-bit little-endian data that represents an integer.
 TEST(RegisterValueTest, SetValueFromData_128_le) {
-  uint8_t src[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                   0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
-  TestSetValueFromData128(src, lldb::ByteOrder::eByteOrderLittle);
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
+  TestSetValueFromData(etalon128, src, 16, lldb::ByteOrder::eByteOrderLittle);
 }
 
 // Test that the "RegisterValue::SetValueFromData" method works correctly
 // with 128-bit big-endian data that represents an integer.
 TEST(RegisterValueTest, SetValueFromData_128_be) {
-  uint8_t src[] = {0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88,
-                   0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00};
-  TestSetValueFromData128(src, lldb::ByteOrder::eByteOrderBig);
+  uint8_t src[] = {0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
+                   0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon128, src, 16, lldb::ByteOrder::eByteOrderBig);
 }

From eb234f996d8d32149501ac53eeb1a89a1b4bcc74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Fri, 31 Oct 2025 19:04:26 +0100
Subject: [PATCH 02/15] [lldb] add new tests that demonstrate the problem

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index 92c0172e0c909..d6b7b2e448d8b 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -95,3 +95,28 @@ TEST(RegisterValueTest, SetValueFromData_128_be) {
                    0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
   TestSetValueFromData(etalon128, src, 16, lldb::ByteOrder::eByteOrderBig);
 }
+
+static const Scalar etalon256(APInt(256, 0x1f1e1d1c1b1a1918ull) << 3 * 64 |
+                              APInt(256, 0x1716151413121110ull) << 2 * 64 |
+                              APInt(256, 0x0f0e0d0c0b0a0908ull) << 1 * 64 |
+                              APInt(256, 0x0706050403020100ull) << 0 * 64);
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 256-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_256_le) {
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f};
+  TestSetValueFromData(etalon256, src, 32, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 256-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_256_be) {
+  uint8_t src[] = {0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
+                   0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
+                   0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
+                   0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon256, src, 32, lldb::ByteOrder::eByteOrderBig);
+}

From 6b48d039647efd1e69e9a4a0b9db2c2ad4045358 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Fri, 31 Oct 2025 21:33:35 +0100
Subject: [PATCH 03/15] [lldb] fix the "RegisterValue::SetValueFromData" method

---
 lldb/source/Utility/RegisterValue.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index 8b2af4e3d4f0e..5190320e11fd0 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -207,6 +207,18 @@ Status RegisterValue::SetValueFromData(const RegisterInfo 
&reg_info,
         int128.x[1] = data1;
       }
       SetUInt128(llvm::APInt(128, int128.x));
+    } else {
+      std::vector<uint8_t> bytes(src_len, 0);
+      for (size_t i = 0; i < src_len; i++)
+        bytes[i] = src.GetU8(&src_offset);
+      if (src.GetByteOrder() == eByteOrderBig)
+        std::reverse(bytes.begin(), bytes.end());
+      // The number of 64-bit wide words that are stored in "src".
+      size_t size64 = (reg_info.byte_size - 1) / 8 + 1;
+      bytes.resize(size64 * sizeof(uint64_t), 0);
+      llvm::APInt uint = llvm::APInt::getZero(src_len * 8);
+      llvm::LoadIntFromMemory(uint, bytes.data(), src_len);
+      SetUInt128(uint);
     }
     break;
   case eEncodingIEEE754:

From ca5d68a2a355d695e582b1c4a16f2b080a6ebc8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Fri, 31 Oct 2025 22:04:03 +0100
Subject: [PATCH 04/15] [lldb] add new tests that demonstrate the problem

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index d6b7b2e448d8b..48a920b11e4e0 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -77,6 +77,23 @@ void TestSetValueFromData(const Scalar &etalon, void *src, 
size_t src_byte_size,
   EXPECT_EQ(s, etalon);
 }
 
+static const Scalar etalon72(APInt(72, 0x0000000000000008ull) << 1 * 64 |
+                             APInt(72, 0x0706050403020100ull) << 0 * 64);
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 72-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_72_le) {
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
+  TestSetValueFromData(etalon72, src, 9, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 72-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_72_be) {
+  uint8_t src[] = {0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon72, src, 9, lldb::ByteOrder::eByteOrderBig);
+}
+
 static const Scalar etalon128(APInt(128, 0x0f0e0d0c0b0a0908ull) << 1 * 64 |
                               APInt(128, 0x0706050403020100ull) << 0 * 64);
 

From ef8859f8785cd711353fb270f6fbb1d227bb83ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Fri, 31 Oct 2025 23:38:39 +0100
Subject: [PATCH 05/15] [lldb] fix the "RegisterValue::SetValueFromData" method

---
 lldb/source/Utility/RegisterValue.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index 5190320e11fd0..ce900f82f37df 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -196,7 +196,7 @@ Status RegisterValue::SetValueFromData(const RegisterInfo 
&reg_info,
       SetUInt32(src.GetMaxU32(&src_offset, src_len));
     else if (reg_info.byte_size <= 8)
       SetUInt64(src.GetMaxU64(&src_offset, src_len));
-    else if (reg_info.byte_size <= 16) {
+    else if (reg_info.byte_size == 16) {
       uint64_t data1 = src.GetU64(&src_offset);
       uint64_t data2 = src.GetU64(&src_offset);
       if (src.GetByteOrder() == eByteOrderLittle) {

From 460b8fc9d97d6c3a162c77d0c0dc2982bd3cfd04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Mon, 3 Nov 2025 11:51:14 +0100
Subject: [PATCH 06/15] [lldb] rename an existing enum value so that it better
 expresses its meaning

---
 lldb/include/lldb/Utility/RegisterValue.h |  8 ++++----
 lldb/source/Utility/RegisterValue.cpp     | 24 +++++++++++------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lldb/include/lldb/Utility/RegisterValue.h 
b/lldb/include/lldb/Utility/RegisterValue.h
index 49aaf68be17fc..0226fe36a7990 100644
--- a/lldb/include/lldb/Utility/RegisterValue.h
+++ b/lldb/include/lldb/Utility/RegisterValue.h
@@ -46,7 +46,7 @@ class RegisterValue {
     eTypeUInt16,
     eTypeUInt32,
     eTypeUInt64,
-    eTypeUInt128,
+    eTypeUIntBig,  // an integer that has more than 64 bits
     eTypeFloat,
     eTypeDouble,
     eTypeLongDouble,
@@ -69,7 +69,7 @@ class RegisterValue {
     m_scalar = inst;
   }
 
-  explicit RegisterValue(llvm::APInt inst) : m_type(eTypeUInt128) {
+  explicit RegisterValue(llvm::APInt inst) : m_type(eTypeUIntBig) {
     m_scalar = llvm::APInt(std::move(inst));
   }
 
@@ -178,7 +178,7 @@ class RegisterValue {
   }
 
   void operator=(llvm::APInt uint) {
-    m_type = eTypeUInt128;
+    m_type = eTypeUIntBig;
     m_scalar = llvm::APInt(std::move(uint));
   }
 
@@ -218,7 +218,7 @@ class RegisterValue {
   }
 
   void SetUInt128(llvm::APInt uint) {
-    m_type = eTypeUInt128;
+    m_type = eTypeUIntBig;
     m_scalar = std::move(uint);
   }
 
diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index ce900f82f37df..fe84117c5e305 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -127,7 +127,7 @@ bool RegisterValue::GetScalarValue(Scalar &scalar) const {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -454,7 +454,7 @@ bool RegisterValue::SignExtend(uint32_t sign_bitpos) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
     return m_scalar.SignExtend(sign_bitpos);
   case eTypeFloat:
   case eTypeDouble:
@@ -477,7 +477,7 @@ bool RegisterValue::CopyValue(const RegisterValue &rhs) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -593,7 +593,7 @@ llvm::APInt RegisterValue::GetAsUInt128(const llvm::APInt 
&fail_value,
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -628,7 +628,7 @@ float RegisterValue::GetAsFloat(float fail_value, bool 
*success_ptr) const {
     break;
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -648,7 +648,7 @@ double RegisterValue::GetAsDouble(double fail_value, bool 
*success_ptr) const {
 
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -669,7 +669,7 @@ long double RegisterValue::GetAsLongDouble(long double 
fail_value,
 
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -688,7 +688,7 @@ const void *RegisterValue::GetBytes() const {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -710,7 +710,7 @@ uint32_t RegisterValue::GetByteSize() const {
     return 2;
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -761,7 +761,7 @@ bool RegisterValue::operator==(const RegisterValue &rhs) 
const {
     case eTypeUInt16:
     case eTypeUInt32:
     case eTypeUInt64:
-    case eTypeUInt128:
+    case eTypeUIntBig:
     case eTypeFloat:
     case eTypeDouble:
     case eTypeLongDouble:
@@ -786,7 +786,7 @@ bool RegisterValue::ClearBit(uint32_t bit) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
     if (bit < (GetByteSize() * 8)) {
       return m_scalar.ClearBit(bit);
     }
@@ -826,7 +826,7 @@ bool RegisterValue::SetBit(uint32_t bit) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUInt128:
+  case eTypeUIntBig:
     if (bit < (GetByteSize() * 8)) {
       return m_scalar.SetBit(bit);
     }

From 82b5385c3a34d9a6b1a9fd0a84c81f72418b20cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Tue, 4 Nov 2025 13:19:09 +0100
Subject: [PATCH 07/15] formatting

---
 lldb/include/lldb/Utility/RegisterValue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/include/lldb/Utility/RegisterValue.h 
b/lldb/include/lldb/Utility/RegisterValue.h
index 0226fe36a7990..83487cfd46fc1 100644
--- a/lldb/include/lldb/Utility/RegisterValue.h
+++ b/lldb/include/lldb/Utility/RegisterValue.h
@@ -46,7 +46,7 @@ class RegisterValue {
     eTypeUInt16,
     eTypeUInt32,
     eTypeUInt64,
-    eTypeUIntBig,  // an integer that has more than 64 bits
+    eTypeUIntBig, // an integer that has more than 64 bits
     eTypeFloat,
     eTypeDouble,
     eTypeLongDouble,

From a0f52e4a7cd77b88a83d4fcd831335e1cda61df7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Tue, 4 Nov 2025 22:50:14 +0100
Subject: [PATCH 08/15] [lldb] rename "eTypeUIntBig" enum value to "eTypeUInt"

---
 lldb/include/lldb/Utility/RegisterValue.h |  8 ++++----
 lldb/source/Utility/RegisterValue.cpp     | 24 +++++++++++------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lldb/include/lldb/Utility/RegisterValue.h 
b/lldb/include/lldb/Utility/RegisterValue.h
index 83487cfd46fc1..249c60db3fb4d 100644
--- a/lldb/include/lldb/Utility/RegisterValue.h
+++ b/lldb/include/lldb/Utility/RegisterValue.h
@@ -46,7 +46,7 @@ class RegisterValue {
     eTypeUInt16,
     eTypeUInt32,
     eTypeUInt64,
-    eTypeUIntBig, // an integer that has more than 64 bits
+    eTypeUInt, // an integer that has more than 64 bits
     eTypeFloat,
     eTypeDouble,
     eTypeLongDouble,
@@ -69,7 +69,7 @@ class RegisterValue {
     m_scalar = inst;
   }
 
-  explicit RegisterValue(llvm::APInt inst) : m_type(eTypeUIntBig) {
+  explicit RegisterValue(llvm::APInt inst) : m_type(eTypeUInt) {
     m_scalar = llvm::APInt(std::move(inst));
   }
 
@@ -178,7 +178,7 @@ class RegisterValue {
   }
 
   void operator=(llvm::APInt uint) {
-    m_type = eTypeUIntBig;
+    m_type = eTypeUInt;
     m_scalar = llvm::APInt(std::move(uint));
   }
 
@@ -218,7 +218,7 @@ class RegisterValue {
   }
 
   void SetUInt128(llvm::APInt uint) {
-    m_type = eTypeUIntBig;
+    m_type = eTypeUInt;
     m_scalar = std::move(uint);
   }
 
diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index fe84117c5e305..bc7ae5606bf64 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -127,7 +127,7 @@ bool RegisterValue::GetScalarValue(Scalar &scalar) const {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -454,7 +454,7 @@ bool RegisterValue::SignExtend(uint32_t sign_bitpos) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
     return m_scalar.SignExtend(sign_bitpos);
   case eTypeFloat:
   case eTypeDouble:
@@ -477,7 +477,7 @@ bool RegisterValue::CopyValue(const RegisterValue &rhs) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -593,7 +593,7 @@ llvm::APInt RegisterValue::GetAsUInt128(const llvm::APInt 
&fail_value,
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -628,7 +628,7 @@ float RegisterValue::GetAsFloat(float fail_value, bool 
*success_ptr) const {
     break;
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -648,7 +648,7 @@ double RegisterValue::GetAsDouble(double fail_value, bool 
*success_ptr) const {
 
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -669,7 +669,7 @@ long double RegisterValue::GetAsLongDouble(long double 
fail_value,
 
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -688,7 +688,7 @@ const void *RegisterValue::GetBytes() const {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -710,7 +710,7 @@ uint32_t RegisterValue::GetByteSize() const {
     return 2;
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
   case eTypeFloat:
   case eTypeDouble:
   case eTypeLongDouble:
@@ -761,7 +761,7 @@ bool RegisterValue::operator==(const RegisterValue &rhs) 
const {
     case eTypeUInt16:
     case eTypeUInt32:
     case eTypeUInt64:
-    case eTypeUIntBig:
+    case eTypeUInt:
     case eTypeFloat:
     case eTypeDouble:
     case eTypeLongDouble:
@@ -786,7 +786,7 @@ bool RegisterValue::ClearBit(uint32_t bit) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
     if (bit < (GetByteSize() * 8)) {
       return m_scalar.ClearBit(bit);
     }
@@ -826,7 +826,7 @@ bool RegisterValue::SetBit(uint32_t bit) {
   case eTypeUInt16:
   case eTypeUInt32:
   case eTypeUInt64:
-  case eTypeUIntBig:
+  case eTypeUInt:
     if (bit < (GetByteSize() * 8)) {
       return m_scalar.SetBit(bit);
     }

From eab73d217cdcf86e8de82c1e5876701cf2823580 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Wed, 5 Nov 2025 08:01:05 +0100
Subject: [PATCH 09/15] [lldb] fix the comment

Co-authored-by: Jonas Devlieghere <[email protected]>
---
 lldb/include/lldb/Utility/RegisterValue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/include/lldb/Utility/RegisterValue.h 
b/lldb/include/lldb/Utility/RegisterValue.h
index 249c60db3fb4d..6587cff786c01 100644
--- a/lldb/include/lldb/Utility/RegisterValue.h
+++ b/lldb/include/lldb/Utility/RegisterValue.h
@@ -46,7 +46,7 @@ class RegisterValue {
     eTypeUInt16,
     eTypeUInt32,
     eTypeUInt64,
-    eTypeUInt, // an integer that has more than 64 bits
+    eTypeUInt, /// < An integer that has more than 64 bits.
     eTypeFloat,
     eTypeDouble,
     eTypeLongDouble,

From 9c946214408a5f226b74272fcf2a2a0d20237015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Wed, 5 Nov 2025 21:17:30 +0100
Subject: [PATCH 10/15] [lldb] fix a misleading name of the register

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index 48a920b11e4e0..6dbc2dafd8f81 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -59,7 +59,7 @@ TEST(RegisterValueTest, GetScalarValue) {
 
 void TestSetValueFromData(const Scalar &etalon, void *src, size_t 
src_byte_size,
                           const lldb::ByteOrder endianness) {
-  RegisterInfo ri{"uint128_register",
+  RegisterInfo ri{"test",
                   nullptr,
                   static_cast<uint32_t>(src_byte_size),
                   0,

From b796fae5c6d8060764263d6184a2ecf07c8a1dc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Wed, 5 Nov 2025 21:18:23 +0100
Subject: [PATCH 11/15] [lldb] add new tests

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 245 ++++++++++++++++++-
 1 file changed, 236 insertions(+), 9 deletions(-)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index 6dbc2dafd8f81..b1bdabbe7116e 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -77,21 +77,248 @@ void TestSetValueFromData(const Scalar &etalon, void *src, 
size_t src_byte_size,
   EXPECT_EQ(s, etalon);
 }
 
-static const Scalar etalon72(APInt(72, 0x0000000000000008ull) << 1 * 64 |
+static const Scalar etalon7(APInt(32, 0x0000007F));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 7-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_7_le) {
+  uint8_t src[] = {0x7F};
+  TestSetValueFromData(etalon7, src, 1, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 7-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_7_be) {
+  uint8_t src[] = {0x7F};
+  TestSetValueFromData(etalon7, src, 1, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon8(APInt(32, 0x000000FE));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 8-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_8_le) {
+  uint8_t src[] = {0xFE};
+  TestSetValueFromData(etalon8, src, 1, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 8-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_8_be) {
+  uint8_t src[] = {0xFE};
+  TestSetValueFromData(etalon8, src, 1, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon9(APInt(32, 0x000001FE));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 9-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_9_le) {
+  uint8_t src[] = {0xFE, 0x01};
+  TestSetValueFromData(etalon9, src, 2, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 9-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_9_be) {
+  uint8_t src[] = {0x01, 0xFE};
+  TestSetValueFromData(etalon9, src, 2, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon15(APInt(32, 0x00007FED));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 15-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_15_le) {
+  uint8_t src[] = {0xED, 0x7F};
+  TestSetValueFromData(etalon15, src, 2, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 15-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_15_be) {
+  uint8_t src[] = {0x7F, 0xED};
+  TestSetValueFromData(etalon15, src, 2, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon16(APInt(32, 0x0000FEDC));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 16-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_16_le) {
+  uint8_t src[] = {0xDC, 0xFE};
+  TestSetValueFromData(etalon16, src, 2, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 16-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_16_be) {
+  uint8_t src[] = {0xFE, 0xDC};
+  TestSetValueFromData(etalon16, src, 2, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon17(APInt(32, 0x0001FEDC));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 17-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_17_le) {
+  uint8_t src[] = {0xDC, 0xFE, 0x01};
+  TestSetValueFromData(etalon17, src, 3, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 17-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_17_be) {
+  uint8_t src[] = {0x01, 0xFE, 0xDC};
+  TestSetValueFromData(etalon17, src, 3, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon24(APInt(32, 0x00FEDCBA));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 24-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_24_le) {
+  uint8_t src[] = {0xBA, 0xDC, 0xFE};
+  TestSetValueFromData(etalon24, src, 3, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 24-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_24_be) {
+  uint8_t src[] = {0xFE, 0xDC, 0xBA};
+  TestSetValueFromData(etalon24, src, 3, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon31(APInt(32, 0x7EDCBA98));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 31-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_31_le) {
+  uint8_t src[] = {0x98, 0xBA, 0xDC, 0x7E};
+  TestSetValueFromData(etalon31, src, 4, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 31-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_31_be) {
+  uint8_t src[] = {0x7E, 0xDC, 0xBA, 0x98};
+  TestSetValueFromData(etalon31, src, 4, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon32(APInt(32, 0xFEDCBA98));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 32-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_32_le) {
+  uint8_t src[] = {0x98, 0xBA, 0xDC, 0xFE};
+  TestSetValueFromData(etalon32, src, 4, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 32-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_32_be) {
+  uint8_t src[] = {0xFE, 0xDC, 0xBA, 0x98};
+  TestSetValueFromData(etalon32, src, 4, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon33(APInt(64, 0x00000001FEDCBA98));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 33-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_33_le) {
+  uint8_t src[] = {0x98, 0xBA, 0xDC, 0xFE, 0x01};
+  TestSetValueFromData(etalon33, src, 5, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 33-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_33_be) {
+  uint8_t src[] = {0x01, 0xFE, 0xDC, 0xBA, 0x98};
+  TestSetValueFromData(etalon33, src, 5, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon40(APInt(64, 0x000000FEDCBA9876));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 40-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_40_le) {
+  uint8_t src[] = {0x76, 0x98, 0xBA, 0xDC, 0xFE};
+  TestSetValueFromData(etalon40, src, 5, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 33-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_40_be) {
+  uint8_t src[] = {0xFE, 0xDC, 0xBA, 0x98, 0x76};
+  TestSetValueFromData(etalon40, src, 5, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon63(APInt(64, 0x7EDCBA9876543210));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 63-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_63_le) {
+  uint8_t src[] = {0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0x7E};
+  TestSetValueFromData(etalon63, src, 8, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 63-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_63_be) {
+  uint8_t src[] = {0x7E, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10};
+  TestSetValueFromData(etalon63, src, 8, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon64(APInt(64, 0xFEDCBA9876543210));
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 64-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_64_le) {
+  uint8_t src[] = {0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE};
+  TestSetValueFromData(etalon64, src, 8, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 64-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_64_be) {
+  uint8_t src[] = {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10};
+  TestSetValueFromData(etalon64, src, 8, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon65(APInt(72, 0x0000000000000001ull) << 1 * 64 |
                              APInt(72, 0x0706050403020100ull) << 0 * 64);
 
 // Test that the "RegisterValue::SetValueFromData" method works correctly
-// with 72-bit little-endian data that represents an integer.
-TEST(RegisterValueTest, SetValueFromData_72_le) {
-  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
-  TestSetValueFromData(etalon72, src, 9, lldb::ByteOrder::eByteOrderLittle);
+// with 65-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_65_le) {
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x01};
+  TestSetValueFromData(etalon65, src, 9, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 65-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_65_be) {
+  uint8_t src[] = {0x01, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon65, src, 9, lldb::ByteOrder::eByteOrderBig);
+}
+
+static const Scalar etalon127(APInt(128, 0x7f0e0d0c0b0a0908ull) << 1 * 64 |
+                              APInt(128, 0x0706050403020100ull) << 0 * 64);
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 127-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_127_le) {
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x7f};
+  TestSetValueFromData(etalon127, src, 16, lldb::ByteOrder::eByteOrderLittle);
 }
 
 // Test that the "RegisterValue::SetValueFromData" method works correctly
-// with 72-bit big-endian data that represents an integer.
-TEST(RegisterValueTest, SetValueFromData_72_be) {
-  uint8_t src[] = {0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
-  TestSetValueFromData(etalon72, src, 9, lldb::ByteOrder::eByteOrderBig);
+// with 128-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_127_be) {
+  uint8_t src[] = {0x7f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
+                   0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon127, src, 16, lldb::ByteOrder::eByteOrderBig);
 }
 
 static const Scalar etalon128(APInt(128, 0x0f0e0d0c0b0a0908ull) << 1 * 64 |

From d368469f9656963ede5b84e6670fc847c1bb6933 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Wed, 5 Nov 2025 22:40:28 +0100
Subject: [PATCH 12/15] [lldb] add a new test

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index b1bdabbe7116e..63795d23bbbae 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -364,3 +364,31 @@ TEST(RegisterValueTest, SetValueFromData_256_be) {
                    0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
   TestSetValueFromData(etalon256, src, 32, lldb::ByteOrder::eByteOrderBig);
 }
+
+static const Scalar etalon257(APInt(512, 0x0000000000000001ull) << 4 * 64 |
+                              APInt(512, 0x1f1e1d1c1b1a1918ull) << 3 * 64 |
+                              APInt(512, 0x1716151413121110ull) << 2 * 64 |
+                              APInt(512, 0x0f0e0d0c0b0a0908ull) << 1 * 64 |
+                              APInt(512, 0x0706050403020100ull) << 0 * 64);
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 256-bit little-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_257_le) {
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+                   0x01};
+  TestSetValueFromData(etalon257, src, 33, lldb::ByteOrder::eByteOrderLittle);
+}
+
+// Test that the "RegisterValue::SetValueFromData" method works correctly
+// with 256-bit big-endian data that represents an integer.
+TEST(RegisterValueTest, SetValueFromData_257_be) {
+  uint8_t src[] = {0x01,
+                   0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
+                   0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
+                   0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
+                   0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  TestSetValueFromData(etalon257, src, 33, lldb::ByteOrder::eByteOrderBig);
+}

From 804442f418bce677fb6381b5d1facab1fedc1693 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Wed, 5 Nov 2025 23:11:53 +0100
Subject: [PATCH 13/15] [lldb] formatting

---
 lldb/source/Utility/RegisterValue.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index bc7ae5606bf64..a2a2ff9da1351 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -211,8 +211,10 @@ Status RegisterValue::SetValueFromData(const RegisterInfo 
&reg_info,
       std::vector<uint8_t> bytes(src_len, 0);
       for (size_t i = 0; i < src_len; i++)
         bytes[i] = src.GetU8(&src_offset);
+
       if (src.GetByteOrder() == eByteOrderBig)
         std::reverse(bytes.begin(), bytes.end());
+
       // The number of 64-bit wide words that are stored in "src".
       size_t size64 = (reg_info.byte_size - 1) / 8 + 1;
       bytes.resize(size64 * sizeof(uint64_t), 0);

From 2a1bb4c68e72e2c8773b220604663e8354ec559c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Thu, 6 Nov 2025 13:58:01 +0100
Subject: [PATCH 14/15] [lldb] add more comments

---
 lldb/source/Utility/RegisterValue.cpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index a2a2ff9da1351..f68b8ab383eb4 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -213,11 +213,20 @@ Status RegisterValue::SetValueFromData(const RegisterInfo 
&reg_info,
         bytes[i] = src.GetU8(&src_offset);
 
       if (src.GetByteOrder() == eByteOrderBig)
+        // Transform the big-endian input to little-endian
+        // because that is what the "llvm::LoadIntFromMemory" function
+        // we call below expects.
         std::reverse(bytes.begin(), bytes.end());
 
-      // The number of 64-bit wide words that are stored in "src".
-      size_t size64 = (reg_info.byte_size - 1) / 8 + 1;
-      bytes.resize(size64 * sizeof(uint64_t), 0);
+      if (llvm::sys::IsBigEndianHost) {
+        // If LLDB runs on a big-endian architecture,
+        // make sure that the input data can be read in
+        // 64-bit chunks because that is what
+        // the "llvm::LoadIntFromMemory" function will do.
+        size_t size64 = (reg_info.byte_size - 1) / 8 + 1;
+        bytes.resize(size64 * sizeof(uint64_t), 0);
+      }
+
       llvm::APInt uint = llvm::APInt::getZero(src_len * 8);
       llvm::LoadIntFromMemory(uint, bytes.data(), src_len);
       SetUInt128(uint);

From 79a8afbdfbe41da5faae6d536c34383798496e6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= <[email protected]>
Date: Thu, 6 Nov 2025 14:04:55 +0100
Subject: [PATCH 15/15] [lldb] formatting

---
 lldb/unittests/Utility/RegisterValueTest.cpp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/lldb/unittests/Utility/RegisterValueTest.cpp 
b/lldb/unittests/Utility/RegisterValueTest.cpp
index 63795d23bbbae..c89848e006ccf 100644
--- a/lldb/unittests/Utility/RegisterValueTest.cpp
+++ b/lldb/unittests/Utility/RegisterValueTest.cpp
@@ -374,21 +374,19 @@ static const Scalar etalon257(APInt(512, 
0x0000000000000001ull) << 4 * 64 |
 // Test that the "RegisterValue::SetValueFromData" method works correctly
 // with 256-bit little-endian data that represents an integer.
 TEST(RegisterValueTest, SetValueFromData_257_le) {
-  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                   0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
-                   0x01};
+  uint8_t src[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                   0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
+                   0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
+                   0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x01};
   TestSetValueFromData(etalon257, src, 33, lldb::ByteOrder::eByteOrderLittle);
 }
 
 // Test that the "RegisterValue::SetValueFromData" method works correctly
 // with 256-bit big-endian data that represents an integer.
 TEST(RegisterValueTest, SetValueFromData_257_be) {
-  uint8_t src[] = {0x01,
-                   0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
-                   0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
-                   0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
-                   0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
+  uint8_t src[] = {0x01, 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18,
+                   0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0f,
+                   0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06,
+                   0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
   TestSetValueFromData(etalon257, src, 33, lldb::ByteOrder::eByteOrderBig);
 }

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to