diff options
| author | bellard <bellard> | 2005-09-03 22:23:59 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2005-09-03 22:23:59 +0000 |
| commit | 7b8e283980a4bc6cadca2b0862e77c61cc117b95 (patch) | |
| tree | b33a1df322beb44b5047134ab9abfcffe6296102 /tccasm.c | |
| parent | e9c64e3f473a29324988169f7fcffeff49649a96 (diff) | |
| download | tinycc-7b8e283980a4bc6cadca2b0862e77c61cc117b95.tar.gz tinycc-7b8e283980a4bc6cadca2b0862e77c61cc117b95.tar.bz2 | |
support for empty input register section in asm (Filip Navara)
Diffstat (limited to 'tccasm.c')
| -rw-r--r-- | tccasm.c | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -916,21 +916,23 @@ static void asm_instr(void) nb_outputs = nb_operands; if (tok == ':') { next(); - /* input args */ - parse_asm_operands(operands, &nb_operands, 0); - if (tok == ':') { - /* clobber list */ - /* XXX: handle registers */ - next(); - for(;;) { - if (tok != TOK_STR) - expect("string constant"); - asm_clobber(clobber_regs, tokc.cstr->data); + if (tok != ')') { + /* input args */ + parse_asm_operands(operands, &nb_operands, 0); + if (tok == ':') { + /* clobber list */ + /* XXX: handle registers */ next(); - if (tok == ',') { + for(;;) { + if (tok != TOK_STR) + expect("string constant"); + asm_clobber(clobber_regs, tokc.cstr->data); next(); - } else { - break; + if (tok == ',') { + next(); + } else { + break; + } } } } |
