From 8a83d7156077b53591fc578ee85a8408c9ede155 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 3 Mar 2024 14:40:05 -0500 Subject: [PATCH] Fix condition. --- InstructionSets/ARM/OperationMapper.hpp | 2 +- OSBindings/Mac/Clock SignalTests/ARMDecoderTests.mm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InstructionSets/ARM/OperationMapper.hpp b/InstructionSets/ARM/OperationMapper.hpp index 23fe41c5b..1898b14b7 100644 --- a/InstructionSets/ARM/OperationMapper.hpp +++ b/InstructionSets/ARM/OperationMapper.hpp @@ -254,7 +254,7 @@ struct SingleDataTransfer: public WithShiftControlBits { /// The base register index. i.e. 'Rn'. int base() const { return (opcode_ >> 16) & 0xf; } - /// The immediate offset, if @c offset_is_immediate() was @c true; meaningless otherwise. + /// The immediate offset, if @c offset_is_register() was @c false; meaningless otherwise. int immediate() const { return opcode_ & 0xfff; } }; diff --git a/OSBindings/Mac/Clock SignalTests/ARMDecoderTests.mm b/OSBindings/Mac/Clock SignalTests/ARMDecoderTests.mm index f82a61ab6..9ce934b60 100644 --- a/OSBindings/Mac/Clock SignalTests/ARMDecoderTests.mm +++ b/OSBindings/Mac/Clock SignalTests/ARMDecoderTests.mm @@ -30,7 +30,7 @@ struct Memory { template bool read(uint32_t address, IntT &source, Mode mode, bool trans) { - if(address > 0x3800000) { + if(address >= 0x3800000) { has_moved_rom_ = true; source = *reinterpret_cast(&rom[address - 0x3800000]); } else if(!has_moved_rom_) { @@ -202,7 +202,7 @@ struct Memory { } // TODO: turn the below into a trace-driven test case. -/*- (void)testROM319 { +- (void)testROM319 { constexpr ROM::Name rom_name = ROM::Name::AcornRISCOS319; ROM::Request request(rom_name); const auto roms = CSROMFetcher()(request); @@ -217,6 +217,6 @@ struct Memory { printf("%08x: %08x\n", executor.pc(), instruction); execute(instruction, executor); } -}*/ +} @end