mie: implement comparison and branch instruction generation
This commit is contained in:
@@ -27,6 +27,13 @@ static struct mie_type *get_type(struct mie_value *v, struct mie_ctx *ctx)
|
||||
struct mie_binary_op *op = (struct mie_binary_op *)instr;
|
||||
return op->op_type;
|
||||
}
|
||||
case MIE_INSTR_CMP_EQ:
|
||||
case MIE_INSTR_CMP_NEQ:
|
||||
case MIE_INSTR_CMP_LT:
|
||||
case MIE_INSTR_CMP_LEQ:
|
||||
case MIE_INSTR_CMP_GT:
|
||||
case MIE_INSTR_CMP_GEQ:
|
||||
return mie_ctx_get_int_type(ctx, 1);
|
||||
case MIE_INSTR_LOAD: {
|
||||
struct mie_load *load = (struct mie_load *)instr;
|
||||
return load->l_type;
|
||||
|
||||
Reference in New Issue
Block a user