mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-18 17:06:15 +00:00
27 lines
539 B
C++
27 lines
539 B
C++
//
|
|
// RegisterSet.hpp
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 16/05/2022.
|
|
// Copyright © 2022 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
namespace InstructionSet::M68k {
|
|
|
|
struct RegisterSet {
|
|
uint32_t data[8], address[7];
|
|
uint32_t user_stack_pointer;
|
|
uint32_t supervisor_stack_pointer;
|
|
uint16_t status;
|
|
uint32_t program_counter;
|
|
|
|
/// @returns The active stack pointer, whichever it may be.
|
|
uint32_t stack_pointer() const {
|
|
return (status & 0x2000) ? supervisor_stack_pointer : user_stack_pointer;
|
|
}
|
|
};
|
|
|
|
}
|