support for empty input register section in asm (Filip Navara)

tcc-xref
bellard 2005-09-03 22:23:59 +00:00
parent e9c64e3f47
commit 7b8e283980
1 changed files with 15 additions and 13 deletions

View File

@ -916,21 +916,23 @@ static void asm_instr(void)
nb_outputs = nb_operands; nb_outputs = nb_operands;
if (tok == ':') { if (tok == ':') {
next(); next();
/* input args */ if (tok != ')') {
parse_asm_operands(operands, &nb_operands, 0); /* input args */
if (tok == ':') { parse_asm_operands(operands, &nb_operands, 0);
/* clobber list */ if (tok == ':') {
/* XXX: handle registers */ /* clobber list */
next(); /* XXX: handle registers */
for(;;) {
if (tok != TOK_STR)
expect("string constant");
asm_clobber(clobber_regs, tokc.cstr->data);
next(); next();
if (tok == ',') { for(;;) {
if (tok != TOK_STR)
expect("string constant");
asm_clobber(clobber_regs, tokc.cstr->data);
next(); next();
} else { if (tok == ',') {
break; next();
} else {
break;
}
} }
} }
} }