diff options
-rw-r--r-- | src/core/device_memory_manager.h | 4 | ||||
-rw-r--r-- | src/core/device_memory_manager.inc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/device_memory_manager.h b/src/core/device_memory_manager.h index f9cb13a7a..cc9fd023f 100644 --- a/src/core/device_memory_manager.h +++ b/src/core/device_memory_manager.h @@ -62,13 +62,13 @@ public: DAddr subbits = static_cast<DAddr>(address & page_mask); const u32 base = compressed_device_addr[(address >> page_bits)]; if ((base >> MULTI_FLAG_BITS) == 0) [[likely]] { - const DAddr d_address = static_cast<DAddr>(base << page_bits) + subbits; + const DAddr d_address = (static_cast<DAddr>(base) << page_bits) + subbits; operation(d_address); return; } InnerGatherDeviceAddresses(buffer, address); for (u32 value : buffer) { - operation(static_cast<DAddr>(value << page_bits) + subbits); + operation((static_cast<DAddr>(value) << page_bits) + subbits); } } diff --git a/src/core/device_memory_manager.inc b/src/core/device_memory_manager.inc index 5241293b6..d7b4abacc 100644 --- a/src/core/device_memory_manager.inc +++ b/src/core/device_memory_manager.inc @@ -301,7 +301,7 @@ template <typename Traits> u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) { size_t page_index = src_addr >> page_bits; size_t subbits = src_addr & page_mask; - if ((continuity_tracker[page_index] << page_bits) >= size + subbits) { + if ((static_cast<size_t>(continuity_tracker[page_index]) << page_bits) >= size + subbits) { return GetPointer<u8>(src_addr); } return nullptr; @@ -311,7 +311,7 @@ template <typename Traits> const u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) const { size_t page_index = src_addr >> page_bits; size_t subbits = src_addr & page_mask; - if ((continuity_tracker[page_index] << page_bits) >= size + subbits) { + if ((static_cast<size_t>(continuity_tracker[page_index]) << page_bits) >= size + subbits) { return GetPointer<u8>(src_addr); } return nullptr; |