summaryrefslogtreecommitdiff
path: root/src/instr.cc
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-05-11 11:51:15 -0400
committerGitHub <noreply@github.com>2025-05-11 11:51:15 -0400
commita35eb451889f0efa99ff7fe1c0a3a76afd5e7ad5 (patch)
tree44205b454c11a2d98711cd3226b4828e12a8479a /src/instr.cc
parentc7132dbc9c38ff766053bd9a0b72c68b23cd08d2 (diff)
parent6f4e9e0b914c3e68691a5d884cbad0b5813fcf18 (diff)
Merge pull request #78 from bdunahu/bdunahu
cleanup/fix existing vector extension
Diffstat (limited to 'src/instr.cc')
-rw-r--r--src/instr.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/instr.cc b/src/instr.cc
index 9bd951b..ee2d37f 100644
--- a/src/instr.cc
+++ b/src/instr.cc
@@ -37,4 +37,15 @@ const std::unordered_map<unsigned int, Mnemonic> mnemonic_map = {
{0b0011010, BUF}, {0b0011110, BOF}, {0b0100010, PUSH},
{0b0100110, POP}, {0b0101010, RET},
};
+
+FieldType get_field_types(Mnemonic m)
+{
+ if (m == ADDV || m == SUBV || m == MULV || m == DIVV || m == CEV) {
+ return R_VECT;
+ } else if (m == STOREV || m == LOADV) {
+ return I_VECT;
+ } else {
+ return SI_INT;
+ }
+}
} // namespace instr