mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Fix parameter case.
This commit is contained in:
parent
83850d7596
commit
ebdf10525c
@ -191,18 +191,18 @@ namespace Primitive {
|
|||||||
|
|
||||||
// The below takes a reference in order properly to handle PUSH SP,
|
// The below takes a reference in order properly to handle PUSH SP,
|
||||||
// which should place the value of SP after the push onto the stack.
|
// which should place the value of SP after the push onto the stack.
|
||||||
template <typename IntT, bool Preauthorised, typename ContextT>
|
template <typename IntT, bool preauthorised, typename ContextT>
|
||||||
void push(IntT &value, ContextT &context) {
|
void push(IntT &value, ContextT &context) {
|
||||||
context.registers.sp_ -= sizeof(IntT);
|
context.registers.sp_ -= sizeof(IntT);
|
||||||
context.memory.template access<IntT, Preauthorised ? AccessType::PreauthorisedWrite : AccessType::Write>(
|
context.memory.template access<IntT, preauthorised ? AccessType::PreauthorisedWrite : AccessType::Write>(
|
||||||
Source::SS,
|
Source::SS,
|
||||||
context.registers.sp_) = value;
|
context.registers.sp_) = value;
|
||||||
context.memory.template write_back<IntT>();
|
context.memory.template write_back<IntT>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename IntT, bool Preauthorised, typename ContextT>
|
template <typename IntT, bool preauthorised, typename ContextT>
|
||||||
IntT pop(ContextT &context) {
|
IntT pop(ContextT &context) {
|
||||||
const auto value = context.memory.template access<IntT, Preauthorised ? AccessType::PreauthorisedRead : AccessType::Read>(
|
const auto value = context.memory.template access<IntT, preauthorised ? AccessType::PreauthorisedRead : AccessType::Read>(
|
||||||
Source::SS,
|
Source::SS,
|
||||||
context.registers.sp_);
|
context.registers.sp_);
|
||||||
context.registers.sp_ += sizeof(IntT);
|
context.registers.sp_ += sizeof(IntT);
|
||||||
|
Loading…
Reference in New Issue
Block a user