summaryrefslogtreecommitdiff
path: root/src/sim/stage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/stage.cc')
-rw-r--r--src/sim/stage.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sim/stage.cc b/src/sim/stage.cc
index 74a2176..2c03741 100644
--- a/src/sim/stage.cc
+++ b/src/sim/stage.cc
@@ -21,6 +21,14 @@ Storage *Stage::storage;
bool Stage::is_pipelined;
int Stage::clock_cycle;
+bool Stage::get_condition(CC c) {
+ return (this->gprs[3] >> c) & 1;
+}
+
+void Stage::set_pc(unsigned int pc) {
+ this->pc = pc;
+}
+
InstrDTO *Stage::advance(Response p)
{
InstrDTO *r = nullptr;
@@ -50,10 +58,6 @@ void Stage::set_condition(CC c, bool v)
this->gprs[3] = this->gprs[3] & ~(1 << c);
}
-bool Stage::get_condition(CC c) {
- return (this->gprs[3] >> c) & 1;
-}
-
signed int Stage::dereference_register(signed int v)
{
signed int r;