arm-asm: Print a warning if asm_binary_opcode is used with SP as operand
This commit is contained in:
parent
67b402fda4
commit
612d9d7ae6
1 changed files with 6 additions and 0 deletions
|
@ -222,6 +222,9 @@ static void asm_binary_opcode(TCCState *s1, int token)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ops[0].reg == 13)
|
||||||
|
tcc_warning("Using 'sp' as operand with '%s' is deprecated by ARM", get_tok_str(token, NULL));
|
||||||
|
|
||||||
if (ops[1].type != OP_REG32) {
|
if (ops[1].type != OP_REG32) {
|
||||||
expect("(source operand) register");
|
expect("(source operand) register");
|
||||||
return;
|
return;
|
||||||
|
@ -232,6 +235,9 @@ static void asm_binary_opcode(TCCState *s1, int token)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ops[1].reg == 13)
|
||||||
|
tcc_warning("Using 'sp' as operand with '%s' is deprecated by ARM", get_tok_str(token, NULL));
|
||||||
|
|
||||||
if (tok == ',') {
|
if (tok == ',') {
|
||||||
next(); // skip ','
|
next(); // skip ','
|
||||||
if (tok == TOK_ASM_ror) {
|
if (tok == TOK_ASM_ror) {
|
||||||
|
|
Loading…
Reference in a new issue