summaryrefslogtreecommitdiff
path: root/src/instr.cc
diff options
context:
space:
mode:
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