From 797c9fe129ac31f317607caf3dd1154f06852a19 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 5 Nov 2023 21:47:52 -0500 Subject: [PATCH] Temporarily avoid use of Writeable. --- InstructionSets/x86/AccessType.hpp | 3 ++- OSBindings/Mac/Clock SignalTests/8088Tests.mm | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/InstructionSets/x86/AccessType.hpp b/InstructionSets/x86/AccessType.hpp index 544bb2e02..12eb03846 100644 --- a/InstructionSets/x86/AccessType.hpp +++ b/InstructionSets/x86/AccessType.hpp @@ -46,7 +46,8 @@ class Writeable { private: IntT &target_; }; -template struct ReturnType { using type = Writeable; }; +//template struct ReturnType { using type = Writeable; }; +template struct ReturnType { using type = IntT &; }; // Read-modify-writes: return a reference. template struct ReturnType { using type = IntT &; }; diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 2e19f35f8..d39e79df3 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -273,7 +273,7 @@ struct Memory { // Entry point used by the flow controller so that it can mark up locations at which the flags were written, // so that defined-flag-only masks can be applied while verifying RAM contents. template - typename ReturnType::type &access(InstructionSet::x86::Source segment, uint16_t offset, Tag tag) { + typename InstructionSet::x86::ReturnType::type &access(InstructionSet::x86::Source segment, uint16_t offset, Tag tag) { const uint32_t physical_address = address(segment, offset); return access(physical_address, tag); } @@ -281,7 +281,7 @@ struct Memory { // An additional entry point for the flow controller; on the original 8086 interrupt vectors aren't relative // to a selector, they're just at an absolute location. template - typename ReturnType::type &access(uint32_t address, Tag tag) { + typename InstructionSet::x86::ReturnType::type &access(uint32_t address, Tag tag) { if constexpr (type == AccessType::PreauthorisedRead) { if(!test_preauthorisation(address)) { printf("Non preauthorised access\n");