diff options
author | bd <bdunahu@operationnull.com> | 2025-03-30 12:33:25 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-30 12:33:25 -0400 |
commit | 6557e7e623140871968776429d241570002a65f5 (patch) | |
tree | 420c2aced8e008708ea951edf36608e0bc5d4e2c /inc/stage.h | |
parent | 8e56373a5436852fe9c7934e03d7b57493625003 (diff) |
Setting condition code register, overflow guard
Diffstat (limited to 'inc/stage.h')
-rw-r--r-- | inc/stage.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/inc/stage.h b/inc/stage.h index 50c413a..c0dc6a8 100644 --- a/inc/stage.h +++ b/inc/stage.h @@ -9,6 +9,13 @@ #include <deque> #include <memory> +enum CC { + GT, + EQ, + UF, + OF, +}; + class Stage { public: @@ -31,6 +38,17 @@ class Stage protected: /** + * Sets the bit in the condition code register corresponding to `c`. + * @param the condition code to set. + * @param the truthy value to set it to. + */ + void set_condition(CC c, bool v); + /** + * Gets the bit in the condition code register correspondng to `c`. + * @param the condition code to retrieve, + */ + bool get_condition(CC c); + /** * Helper for `check_out`. * Returns true if r are not checked out, false otherwise. * @param a list of register numbers. |