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>
|
|
|
|
|
2024-03-01 20:02:47 +00:00
|
|
|
#include "../../../InstructionSets/ARM/Executor.hpp"
|
2024-02-21 20:43:24 +00:00
|
|
|
|
|
|
|
using namespace InstructionSet::ARM;
|
|
|
|
|
2024-02-22 15:16:54 +00:00
|
|
|
namespace {
|
|
|
|
|
2024-02-29 15:18:09 +00:00
|
|
|
struct Memory {
|
|
|
|
template <typename IntT>
|
|
|
|
bool write(uint32_t address, IntT source, Mode mode, bool trans) {
|
|
|
|
(void)address;
|
|
|
|
(void)source;
|
|
|
|
(void)mode;
|
|
|
|
(void)trans;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename IntT>
|
|
|
|
bool read(uint32_t address, IntT &source, Mode mode, bool trans) {
|
|
|
|
(void)address;
|
|
|
|
(void)source;
|
|
|
|
(void)mode;
|
|
|
|
(void)trans;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-02-22 15:16:54 +00:00
|
|
|
}
|
|
|
|
|
2024-02-21 20:43:24 +00:00
|
|
|
@interface ARMDecoderTests : XCTestCase
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation ARMDecoderTests
|
|
|
|
|
|
|
|
- (void)testXYX {
|
2024-03-01 20:02:47 +00:00
|
|
|
Executor<Memory> scheduler;
|
2024-02-22 15:16:54 +00:00
|
|
|
|
2024-02-26 19:50:45 +00:00
|
|
|
for(int c = 0; c < 65536; c++) {
|
|
|
|
InstructionSet::ARM::dispatch(c << 16, scheduler);
|
|
|
|
}
|
2024-02-22 15:48:19 +00:00
|
|
|
InstructionSet::ARM::dispatch(0xEAE06900, scheduler);
|
2024-02-21 20:43:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|