From 4f021b319a7e35fff7ae70a00768792b90172ccf Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Tue, 27 Feb 2024 19:08:28 +0100 Subject: [PATCH] Fix Linux build --- lib86cpu/support.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib86cpu/support.h b/lib86cpu/support.h index d3d0f51..c294157 100644 --- a/lib86cpu/support.h +++ b/lib86cpu/support.h @@ -94,15 +94,17 @@ void log_unhandled_write(addr_t addr, T value) if constexpr ((sizeof(T) == 10) || (sizeof(T) == 16)) { constexpr size_t val_high_digits = sizeof(T) == 10 ? 4 : 16; using type_high_digits = std::conditional_t; + type_high_digits high = value.high; + uint64_t low = value.low; if constexpr (type == mem_type::unmapped) { LOG(log_level::warn, ("Memory write of value high=0x%0" + std::to_string(val_high_digits) + get_prix_prefix() + " and low=0x%016" PRIX64 " to \ unmapped memory at address 0x%08" PRIX32 " with size %" PRId32).c_str(), - value.high, value.low, addr, sizeof(T)); + high, low, addr, sizeof(T)); } else { LOG(log_level::warn, ("Unhandled mmio write of value high=0x%0" + std::to_string(val_high_digits) + get_prix_prefix() + " and low=0x%016" PRIX64 " at \ address 0x%08" PRIX32 " with size %" PRId32).c_str(), - value.high, value.low, addr, sizeof(T)); + high, low, addr, sizeof(T)); } } else {