summaryrefslogtreecommitdiff
path: root/inc/stage.h
diff options
context:
space:
mode:
authorSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-04-26 23:57:02 -0400
committerSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-04-26 23:57:02 -0400
commitbd4714ae53898337a02cfcec17628eeff9d77a9c (patch)
tree04e01e43dab9768c78134190b99a3c9fc4f837cf /inc/stage.h
parent41f612789f652654b5f2fa8c3fee4e348e2081b1 (diff)
Fix for load and store vector
Diffstat (limited to 'inc/stage.h')
-rw-r--r--inc/stage.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/inc/stage.h b/inc/stage.h
index ae01723..dde103b 100644
--- a/inc/stage.h
+++ b/inc/stage.h
@@ -110,16 +110,6 @@ class Stage
template <typename T>
void store_register(signed int v, T d)
{
- // if (v < 0 || v >= GPR_NUM + V_NUM) {
- // throw std::out_of_range(
- // "instruction tried to access register which does not exist");
- // }
-
- // if (v >= GPR_NUM)
- // this->vrs[v % GPR_NUM] = d;
- // else
- // this->gprs[v] = d;
-
if constexpr (std::is_same_v<T, signed int>) {
if (v < 0 || v >= GPR_NUM) {
throw std::out_of_range("Invalid GPR index for storing scalar");
@@ -141,16 +131,6 @@ class Stage
template <typename T>
T dereference_register(signed int v)
{
- // signed int r;
-
- // if (v < 0 || v >= GPR_NUM + V_NUM) {
- // throw std::out_of_range(
- // "instruction tried to access register which does not exist");
- // }
-
- // r = (v >= GPR_NUM) ? this->vrs[v % GPR_NUM] : this->gprs[v];
- // return r;
-
if constexpr (std::is_same_v<T, signed int>) {
if (v < 0 || v >= GPR_NUM) {
throw std::out_of_range("Invalid GPR index");