aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard>2005-09-03 22:23:59 +0000
committerbellard <bellard>2005-09-03 22:23:59 +0000
commit7b8e283980a4bc6cadca2b0862e77c61cc117b95 (patch)
treeb33a1df322beb44b5047134ab9abfcffe6296102
parente9c64e3f473a29324988169f7fcffeff49649a96 (diff)
downloadtinycc-7b8e283980a4bc6cadca2b0862e77c61cc117b95.tar.gz
tinycc-7b8e283980a4bc6cadca2b0862e77c61cc117b95.tar.bz2
support for empty input register section in asm (Filip Navara)
-rw-r--r--tccasm.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/tccasm.c b/tccasm.c
index 3339a62..4732405 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -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;
+ }
}
}
}