Skip to content

Commit

Permalink
Introduce a generic register context for SVCs
Browse files Browse the repository at this point in the history
`SvcContext` represents a common interface for accessing registers from SVCs, decoupling them from a particular thread context.
  • Loading branch information
nickbeth committed Feb 23, 2024
1 parent 44225a6 commit 18626a4
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 321 deletions.
22 changes: 22 additions & 0 deletions app/src/main/cpp/skyline/common/wregister.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright © 2023 Strato Team and Contributors (https://github.com/strato-emu/)

#pragma once

#include <common/base.h>

namespace skyline {
struct WRegister {
u32 lower;
u32 upper;

constexpr operator u32() const {
return lower;
}

void operator=(u32 value) {
lower = value;
upper = 0;
}
};
}
Loading

0 comments on commit 18626a4

Please sign in to comment.