aboutsummaryrefslogtreecommitdiff
path: root/i386-asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'i386-asm.c')
-rw-r--r--i386-asm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/i386-asm.c b/i386-asm.c
index 80184a7..3d65c00 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -320,8 +320,10 @@ static void parse_operand(TCCState *s1, Operand *op)
if (tok != ',') {
op->reg2 = asm_parse_reg();
}
- skip(',');
- op->shift = get_reg_shift(s1);
+ if (tok == ',') {
+ next();
+ op->shift = get_reg_shift(s1);
+ }
}
skip(')');
}