mirror of https://github.com/TomHarte/CLK.git
Resolve various warnings.
This commit is contained in:
parent
16532136e9
commit
07984a2f8b
|
@ -42,7 +42,7 @@ struct NullStatusHandler {
|
||||||
template <Model model, typename MemoryT, typename StatusObserverT = NullStatusHandler>
|
template <Model model, typename MemoryT, typename StatusObserverT = NullStatusHandler>
|
||||||
struct Executor {
|
struct Executor {
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
Executor(StatusObserverT &observer, Args &&...args) : status_observer_(observer), bus(std::forward<Args>(args)...) {}
|
Executor(StatusObserverT &observer, Args &&...args) : bus(std::forward<Args>(args)...), status_observer_(observer) {}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
Executor(Args &&...args) : bus(std::forward<Args>(args)...) {}
|
Executor(Args &&...args) : bus(std::forward<Args>(args)...) {}
|
||||||
|
@ -327,7 +327,7 @@ struct Executor {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bool did_read;
|
bool did_read;
|
||||||
uint32_t value;
|
uint32_t value = 0;
|
||||||
|
|
||||||
if constexpr (flags.transfer_byte()) {
|
if constexpr (flags.transfer_byte()) {
|
||||||
uint8_t target;
|
uint8_t target;
|
||||||
|
@ -480,7 +480,7 @@ struct Executor {
|
||||||
// undo the previous load.
|
// undo the previous load.
|
||||||
struct {
|
struct {
|
||||||
uint32_t *target = nullptr;
|
uint32_t *target = nullptr;
|
||||||
uint32_t value;
|
uint32_t value = 0;
|
||||||
} last_replacement;
|
} last_replacement;
|
||||||
|
|
||||||
for(uint32_t c = 0; c < total; c++) {
|
for(uint32_t c = 0; c < total; c++) {
|
||||||
|
|
|
@ -34,15 +34,13 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
Log::Logger<Log::Source::Archimedes> logger;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Archimedes {
|
namespace Archimedes {
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
namespace {
|
||||||
|
Log::Logger<Log::Source::Archimedes> logger;
|
||||||
|
}
|
||||||
|
|
||||||
template <InstructionSet::ARM::Model model, typename Executor>
|
template <InstructionSet::ARM::Model model, typename Executor>
|
||||||
struct HackyDebugger {
|
struct HackyDebugger {
|
||||||
void notify(uint32_t address, uint32_t instruction, Executor &executor) {
|
void notify(uint32_t address, uint32_t instruction, Executor &executor) {
|
||||||
|
@ -452,7 +450,7 @@ class ConcreteMachine:
|
||||||
int video_divider_ = 1;
|
int video_divider_ = 1;
|
||||||
|
|
||||||
void tick_cpu() {
|
void tick_cpu() {
|
||||||
uint32_t instruction;
|
uint32_t instruction = 0;
|
||||||
if(!executor_.bus.read(executor_.pc(), instruction, executor_.registers().mode(), false)) {
|
if(!executor_.bus.read(executor_.pc(), instruction, executor_.registers().mode(), false)) {
|
||||||
// logger.info().append("Prefetch abort at %08x; last good was at %08x", executor_.pc(), last_pc);
|
// logger.info().append("Prefetch abort at %08x; last good was at %08x", executor_.pc(), last_pc);
|
||||||
executor_.prefetch_abort();
|
executor_.prefetch_abort();
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
|
|
@ -31,14 +31,21 @@ PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegment &segment) :
|
||||||
}
|
}
|
||||||
|
|
||||||
PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegmentEventSource &original) {
|
PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegmentEventSource &original) {
|
||||||
|
*this = original;
|
||||||
|
}
|
||||||
|
|
||||||
|
PCMSegmentEventSource &PCMSegmentEventSource::operator =(const PCMSegmentEventSource &original) {
|
||||||
// share underlying data with the original
|
// share underlying data with the original
|
||||||
segment_ = original.segment_;
|
segment_ = original.segment_;
|
||||||
|
|
||||||
// load up the clock rate and set initial conditions
|
// load up the clock rate and set initial conditions
|
||||||
next_event_.length.clock_rate = segment_->length_of_a_bit.clock_rate;
|
next_event_.length.clock_rate = segment_->length_of_a_bit.clock_rate;
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCMSegmentEventSource::reset() {
|
void PCMSegmentEventSource::reset() {
|
||||||
// start with the first bit to be considered the zeroth, and assume that it'll be
|
// start with the first bit to be considered the zeroth, and assume that it'll be
|
||||||
// flux transitions for the foreseeable
|
// flux transitions for the foreseeable
|
||||||
|
|
|
@ -163,6 +163,7 @@ class PCMSegmentEventSource {
|
||||||
but a unique pointer into it.
|
but a unique pointer into it.
|
||||||
*/
|
*/
|
||||||
PCMSegmentEventSource(const PCMSegmentEventSource &);
|
PCMSegmentEventSource(const PCMSegmentEventSource &);
|
||||||
|
PCMSegmentEventSource &operator =(const PCMSegmentEventSource &);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@returns the next event that will occur in this event stream.
|
@returns the next event that will occur in this event stream.
|
||||||
|
|
Loading…
Reference in New Issue