From 6ca0299e5b7b9d59a56c6d1674ee61b2bc84c608 Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 20 Feb 2006 21:16:10 +0000 Subject: [PATCH] allow (base,index) as alias to (base,index,1) --- i386-asm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/i386-asm.c b/i386-asm.c index 80184a7c..3d65c009 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(')'); }