From 62e04845b107f58e51632d161c1bcac11c344d81 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 16 Jun 2020 11:52:51 +0100 Subject: [PATCH] A64/config: Provide default implementation of MemoryWriteExclusive functions Returning false is always safe, because this means the exclusive write has failed. --- include/dynarmic/A64/config.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/dynarmic/A64/config.h b/include/dynarmic/A64/config.h index b4c56ec0..3905eb88 100644 --- a/include/dynarmic/A64/config.h +++ b/include/dynarmic/A64/config.h @@ -84,17 +84,17 @@ struct UserCallbacks { virtual void MemoryWrite128(VAddr vaddr, Vector value) = 0; // Writes through these callbacks may not be aligned. - virtual bool MemoryWriteExclusive8(VAddr vaddr, std::uint8_t value, std::uint8_t expected) = 0; - virtual bool MemoryWriteExclusive16(VAddr vaddr, std::uint16_t value, std::uint16_t expected) = 0; - virtual bool MemoryWriteExclusive32(VAddr vaddr, std::uint32_t value, std::uint32_t expected) = 0; - virtual bool MemoryWriteExclusive64(VAddr vaddr, std::uint64_t value, std::uint64_t expected) = 0; - virtual bool MemoryWriteExclusive128(VAddr vaddr, Vector value, Vector expected) = 0; + virtual bool MemoryWriteExclusive8(VAddr /*vaddr*/, std::uint8_t /*value*/, std::uint8_t /*expected*/) { return false; } + virtual bool MemoryWriteExclusive16(VAddr /*vaddr*/, std::uint16_t /*value*/, std::uint16_t /*expected*/) { return false; } + virtual bool MemoryWriteExclusive32(VAddr /*vaddr*/, std::uint32_t /*value*/, std::uint32_t /*expected*/) { return false; } + virtual bool MemoryWriteExclusive64(VAddr /*vaddr*/, std::uint64_t /*value*/, std::uint64_t /*expected*/) { return false; } + virtual bool MemoryWriteExclusive128(VAddr /*vaddr*/, Vector /*value*/, Vector /*expected*/) { return false; } // If this callback returns true, the JIT will assume MemoryRead* callbacks will always // return the same value at any point in time for this vaddr. The JIT may use this information // in optimizations. // A conservative implementation that always returns false is safe. - virtual bool IsReadOnlyMemory(VAddr /* vaddr */) { return false; } + virtual bool IsReadOnlyMemory(VAddr /*vaddr*/) { return false; } /// The interpreter must execute exactly num_instructions starting from PC. virtual void InterpreterFallback(VAddr pc, size_t num_instructions) = 0;