diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-05-11 11:51:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-11 11:51:15 -0400 |
commit | a35eb451889f0efa99ff7fe1c0a3a76afd5e7ad5 (patch) | |
tree | 44205b454c11a2d98711cd3226b4828e12a8479a /src/instr.cc | |
parent | c7132dbc9c38ff766053bd9a0b72c68b23cd08d2 (diff) | |
parent | 6f4e9e0b914c3e68691a5d884cbad0b5813fcf18 (diff) |
Merge pull request #78 from bdunahu/bdunahu
cleanup/fix existing vector extension
Diffstat (limited to 'src/instr.cc')
-rw-r--r-- | src/instr.cc | 11 |
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 |