From f608153c1a92e40c1ef8a68fc1a245218a07fd4e Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 7 Nov 2023 14:38:23 -0500 Subject: [PATCH] Don't bother prepropulating for writes. --- OSBindings/Mac/Clock SignalTests/8088Tests.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index f698860a3..2c96678b7 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -302,7 +302,12 @@ struct Memory { write_back_address_[1] = high_address; tags[low_address] = tag; tags[high_address] = tag; - write_back_value_ = memory[write_back_address_[0]] | (memory[write_back_address_[1]] << 8); + + // Prepopulate only if this is a modify. + if constexpr (type == AccessType::ReadModifyWrite) { + write_back_value_ = memory[write_back_address_[0]] | (memory[write_back_address_[1]] << 8); + } + return write_back_value_; } else { return memory[low_address] | (memory[high_address] << 8);