diff options
Diffstat (limited to 'src/as_op.c')
| -rw-r--r-- | src/as_op.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/as_op.c b/src/as_op.c index 67c91ff..71ba0f3 100644 --- a/src/as_op.c +++ b/src/as_op.c @@ -19,6 +19,7 @@ struct op_table_entry op_table [] = { {OP_SRV, "srv"}, // OP_IMM, {OP_IMM, "imm"}, + {OP_IMM, "rel"}, // OP_LD8, OP_LD16, OP_LD32, OP_LD, {OP_LD8, "ld8"}, {OP_LD16, "ld16"}, @@ -93,7 +94,7 @@ struct op_table_entry op_table [] = { }; int op_size(enum op op) { - if (op == OP_IMM) { + if (op == OP_IMM || op == OP_REL) { return 8 + 1; } if (op == OP_CALL @@ -112,21 +113,11 @@ int op_size(enum op op) { return 1; } -int is_ld_op(enum op op) { - if (op == OP_LD - || op == OP_LD8 - || op == OP_LD16 - || op == OP_LD32) { +int is_pseudo_op(enum op op) { + if (op == OP_LDARG || op == OP_STARG) { return 1; } - return 0; -} - -int is_st_op(enum op op) { - if (op == OP_ST - || op == OP_ST8 - || op == OP_ST16 - || op == OP_ST32) { + if (op == OP_LDVAR || op == OP_STVAR) { return 1; } return 0; @@ -141,6 +132,6 @@ enum op str2op(const char* str) { return OP_END; } -int isOp(const char *str) { +int is_op(const char *str) { return OP_END != str2op(str); } |
