add nop pseudo code
This commit is contained in:
parent
4af200b001
commit
853a1ba612
1 changed files with 15 additions and 0 deletions
15
masm/parse.c
15
masm/parse.c
|
@ -889,6 +889,17 @@ static int parse_pseudo_move(struct parser *parser, struct ins_expr *expr)
|
|||
return M_SUCCESS;
|
||||
}
|
||||
|
||||
static int parse_pseudo_nop(struct parser *parser, struct ins_expr *expr)
|
||||
{
|
||||
(void) parser;
|
||||
|
||||
expr->ins_len = 1;
|
||||
expr->ins[0] = mips_instructions[MIPS_INS_SLL];
|
||||
expr->ref[0].type = R_MIPS_NONE;
|
||||
|
||||
return M_SUCCESS;
|
||||
}
|
||||
|
||||
static int parse_pseudo_instruction(struct parser *parser,
|
||||
struct ins_expr *expr,
|
||||
struct token ident)
|
||||
|
@ -911,6 +922,10 @@ static int parse_pseudo_instruction(struct parser *parser,
|
|||
res = parse_pseudo_la(parser, expr);
|
||||
else CHK(move)
|
||||
res = parse_pseudo_move(parser, expr);
|
||||
else CHK(nop)
|
||||
res = parse_pseudo_nop(parser, expr);
|
||||
|
||||
#undef CHK
|
||||
|
||||
if (res) {
|
||||
// reset on fail
|
||||
|
|
Loading…
Reference in a new issue