arm-asm: Allow implicit offset 0 in input of asm_single_data_transfer_opcode
This commit is contained in:
parent
483625065f
commit
29f36a8953
1 changed files with 11 additions and 7 deletions
10
arm-asm.c
10
arm-asm.c
|
@ -992,15 +992,19 @@ static void asm_single_data_transfer_opcode(TCCState *s1, int token)
|
||||||
closed_bracket = 1;
|
closed_bracket = 1;
|
||||||
// exclam = 1; // implicit in hardware; don't do it in software
|
// exclam = 1; // implicit in hardware; don't do it in software
|
||||||
}
|
}
|
||||||
if (tok != ',')
|
if (tok == ',') {
|
||||||
expect("','");
|
|
||||||
else
|
|
||||||
next(); // skip ','
|
next(); // skip ','
|
||||||
if (tok == '-') {
|
if (tok == '-') {
|
||||||
op2_minus = 1;
|
op2_minus = 1;
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
parse_operand(s1, &ops[2]);
|
parse_operand(s1, &ops[2]);
|
||||||
|
} else {
|
||||||
|
// end of input expression in brackets--assume 0 offset
|
||||||
|
ops[2].type = OP_IM8;
|
||||||
|
ops[2].e.v = 0;
|
||||||
|
opcode |= 1 << 24; // add offset before transfer
|
||||||
|
}
|
||||||
if (!closed_bracket) {
|
if (!closed_bracket) {
|
||||||
if (tok != ']')
|
if (tok != ']')
|
||||||
expect("']'");
|
expect("']'");
|
||||||
|
|
Loading…
Reference in a new issue