diff --git a/Intel8080/test/Makefile b/Intel8080/test/Makefile index 2209b81..b9bfe87 100644 --- a/Intel8080/test/Makefile +++ b/Intel8080/test/Makefile @@ -2,7 +2,7 @@ EXE = test_intel8080 CXXFLAGS = -I ../inc -I ../../inc -CXXFILES = Board.cpp Configuration.cpp test.cpp +CXXFILES = Board.cpp test.cpp LDFLAGS = -L ../src -L ../../src -lintel8080 -leightbit diff --git a/M6502/src/Profiler.cpp b/M6502/src/Profiler.cpp index 9f3be51..c0ee9f2 100644 --- a/M6502/src/Profiler.cpp +++ b/M6502/src/Profiler.cpp @@ -33,7 +33,8 @@ void EightBit::Profiler::EmitProfileInformation() { if (cycles > 0) { // Dump a profile/disassembly line auto source = disassembler.disassemble(address); - EmitLine.fire(ProfileLineEventArgs(source, cycles)); + ProfileLineEventArgs event(source, cycles); + EmitLine.fire(event); } } FinishedLineOutput.fire(EventArgs::empty()); @@ -46,7 +47,8 @@ void EightBit::Profiler::EmitProfileInformation() { auto cycles = scopeCycle.second; auto namedAddress = (size_t)symbols.addresses().find(name)->second; auto count = addressCounts[namedAddress]; - EmitScope.fire(ProfileScopeEventArgs(name, cycles, count)); + ProfileScopeEventArgs event(name, cycles, count); + EmitScope.fire(event); } FinishedScopeOutput.fire(EventArgs::empty()); } @@ -80,4 +82,4 @@ void EightBit::Profiler::BuildAddressScopes() { } } } -} \ No newline at end of file +} diff --git a/M6502/test/Board.h b/M6502/test/Board.h index 2bf9ca5..694dc8d 100644 --- a/M6502/test/Board.h +++ b/M6502/test/Board.h @@ -4,12 +4,12 @@ #include -#include #include #include #include -#include +#include #include +#include class Board : public EightBit::Bus { public: diff --git a/M6502/test/Makefile b/M6502/test/Makefile index 495eda2..18d3a83 100644 --- a/M6502/test/Makefile +++ b/M6502/test/Makefile @@ -2,7 +2,7 @@ EXE = test_m6502 CXXFLAGS = -I ../inc -I ../../inc -CXXFILES = Board.cpp Configuration.cpp test.cpp +CXXFILES = Board.cpp test.cpp LDFLAGS = -L ../src -L ../../src -lboost_regex -lm6502 -leightbit diff --git a/M6502/test/stdafx.h b/M6502/test/stdafx.h index 730a19b..ab19cbe 100644 --- a/M6502/test/stdafx.h +++ b/M6502/test/stdafx.h @@ -2,24 +2,20 @@ #pragma once #endif +#include #include - -#include - -#include #include #include - -#include +#include +#include #ifdef _MSC_VER #include #endif -#include #include -#include #include -#include +#include +#include #include #include diff --git a/Z80/test/Configuration.h b/Z80/test/Configuration.h index 4ae06e8..9891edf 100644 --- a/Z80/test/Configuration.h +++ b/Z80/test/Configuration.h @@ -6,7 +6,7 @@ class Configuration final { public: - Configuration() noexcept = default; + Configuration() = default; bool isDebugMode() const { return m_debugMode; diff --git a/Z80/test/Makefile b/Z80/test/Makefile index fab9f10..f27558d 100644 --- a/Z80/test/Makefile +++ b/Z80/test/Makefile @@ -2,7 +2,7 @@ EXE = test_z80 CXXFLAGS = -I ../inc -I ../../inc -CXXFILES = Board.cpp Configuration.cpp test.cpp +CXXFILES = Board.cpp test.cpp LDFLAGS = -L ../src -L ../../src -lz80 -leightbit diff --git a/compile.mk b/compile.mk index 6bd8b93..a5bc34a 100644 --- a/compile.mk +++ b/compile.mk @@ -1,4 +1,4 @@ -CXXFLAGS += -g -Wall -std=c++14 -pipe +CXXFLAGS += -g -Wall -std=c++17 -pipe CXXFLAGS_OPT = -DNDEBUG -march=native -Ofast -flto CXXFLAGS_DEBUG = -D_DEBUG diff --git a/inc/EightBitCompilerDefinitions.h b/inc/EightBitCompilerDefinitions.h index 674455f..806466a 100644 --- a/inc/EightBitCompilerDefinitions.h +++ b/inc/EightBitCompilerDefinitions.h @@ -15,7 +15,7 @@ namespace EightBit { constexpr void assume(int expression); } -inline int EightBit::countBits(const uint8_t value) noexcept { +inline int EightBit::countBits(uint8_t value) noexcept { #ifdef _MSC_VER return __popcnt(value); #else diff --git a/inc/TestHarness.h b/inc/TestHarness.h index d825d33..db3329b 100644 --- a/inc/TestHarness.h +++ b/inc/TestHarness.h @@ -82,11 +82,11 @@ namespace EightBit { uint64_t m_startHostCycles = 0; uint64_t m_finishHostCycles = 0; - static [[nodiscard]] auto now() { + [[nodiscard]] static auto now() { return std::chrono::steady_clock::now(); } - static [[nodiscard]] uint64_t currentHostCycles() { + [[nodiscard]] static uint64_t currentHostCycles() { return __rdtsc(); } }; diff --git a/src/Makefile b/src/Makefile index 09eb00d..5259306 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ LIB = libeightbit.a CXXFLAGS = -I ../inc -CXXFILES = Bus.cpp EventArgs.cpp InputOutput.cpp IntelProcessor.cpp Memory.cpp Processor.cpp +CXXFILES = BigEndianProcessor.cpp Bus.cpp Chip.cpp EventArgs.cpp InputOutput.cpp IntelProcessor.cpp LittleEndianProcessor.cpp Memory.cpp Processor.cpp Ram.cpp Rom.cpp UnusedMemory.cpp include ../compile.mk include ../lib_build.mk