summaryrefslogtreecommitdiff
path: root/inc/wb.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-01 15:57:14 -0400
committerbd <bdunahu@operationnull.com>2025-04-01 15:57:14 -0400
commit25ce77db5f0dbfe6064eb0553591f1b956bad24a (patch)
tree5a1c347f05f14496d2d3a2f1befd88be9020cad3 /inc/wb.h
parent6579f7272905d1e25b43ef051da6c2180e60ca2b (diff)
Fix a lot of pipeline bugs
Diffstat (limited to 'inc/wb.h')
-rw-r--r--inc/wb.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/inc/wb.h b/inc/wb.h
index 62cef17..c4755ea 100644
--- a/inc/wb.h
+++ b/inc/wb.h
@@ -14,9 +14,27 @@ class WB : public Stage
*/
WB(Stage *next);
using Stage::advance;
-
+
private:
void advance_helper() override;
+ /**
+ * Performs the actual work of storing into a register.
+ */
+ void write_handler();
+ /**
+ * Performs the actual work of processing a jump instruction.
+ */
+ void jump_handler();
+ /**
+ * @return true if the current instruction is an R or I type and is not a
+ * STORE.
+ */
+ bool should_write();
+ /**
+ * @return true if the current instruction is a J type and is not a push.
+ * STORE.
+ */
+ bool should_jump();
};
#endif /* WB_H_INCLUDED */