2024-02-21 20:43:24 +00:00
|
|
|
//
|
|
|
|
// ARMDecoderTests.m
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 16/02/2024.
|
|
|
|
// Copyright 2024 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <XCTest/XCTest.h>
|
|
|
|
|
|
|
|
#include "../../../InstructionSets/ARM/OperationMapper.hpp"
|
|
|
|
|
|
|
|
using namespace InstructionSet::ARM;
|
|
|
|
|
2024-02-22 15:16:54 +00:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
struct Scheduler {
|
|
|
|
template <Operation, Flags> void perform(Condition, DataProcessing) {}
|
|
|
|
template <Operation, Flags> void perform(Condition, Multiply) {}
|
|
|
|
template <Operation, Flags> void perform(Condition, SingleDataTransfer) {}
|
|
|
|
template <Operation, Flags> void perform(Condition, BlockDataTransfer) {}
|
|
|
|
template <Operation> void perform(Condition, Branch) {}
|
|
|
|
template <Operation, Flags> void perform(Condition, CoprocessorRegisterTransfer) {}
|
|
|
|
template <Flags> void perform(Condition, CoprocessorDataOperation) {}
|
|
|
|
template<Operation, Flags> void perform(Condition, CoprocessorDataTransfer) {}
|
|
|
|
|
|
|
|
void software_interrupt(Condition) {}
|
|
|
|
void unknown(uint32_t) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-02-21 20:43:24 +00:00
|
|
|
@interface ARMDecoderTests : XCTestCase
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation ARMDecoderTests
|
|
|
|
|
|
|
|
- (void)testXYX {
|
2024-02-22 15:16:54 +00:00
|
|
|
Scheduler scheduler;
|
|
|
|
|
|
|
|
InstructionSet::ARM::dispatch(1, scheduler);
|
2024-02-21 20:43:24 +00:00
|
|
|
// const auto intr = Instruction<Model::ARM2>(1);
|
|
|
|
// NSLog(@"%d", intr.operation());
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|