From 96e9a932267234f4e86b6bbd686bbb2300e58b49 Mon Sep 17 00:00:00 2001 From: Jacob Bohlin Date: Tue, 6 May 2025 14:19:35 +0100 Subject: [PATCH] MLBEDSW-8926 Fix WIN32 build issue Problem was a code snippet assuming that `uintptr_t` was >32 bit wide. Change-Id: I3bac0b0760b0f111d6ec6a9a1e955e0c19f3398c Signed-off-by: Jacob Bohlin --- ethosu/regor/common/buffer_view.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethosu/regor/common/buffer_view.hpp b/ethosu/regor/common/buffer_view.hpp index 92c0dfc8..8353757e 100644 --- a/ethosu/regor/common/buffer_view.hpp +++ b/ethosu/regor/common/buffer_view.hpp @@ -357,8 +357,9 @@ public: // If the buffer is empty use the pointer to this buffer object as a hash to // disambiguate between different empty buffers. uintptr_t ptr = reinterpret_cast(this); - _dataHash.v32[0] = _dataHash.v32[1] = static_cast(ptr); - _dataHash.v32[2] = _dataHash.v32[3] = static_cast(ptr >> 32); + uint64_t ptr64 = static_cast(ptr); + _dataHash.v32[0] = _dataHash.v32[1] = static_cast(ptr64); + _dataHash.v32[2] = _dataHash.v32[3] = static_cast(ptr64 >> 32); } _invalidHash = false; } -- GitLab