diff --git a/i386-asm.c b/i386-asm.c index 68298737..e3889dc9 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -722,7 +722,7 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode) } parse_operand(s1, pop); if (tok == ':') { - if (pop->type != OP_SEG || seg_prefix) + if (!(pop->type & OP_SEG) || seg_prefix) tcc_error("incorrect prefix"); seg_prefix = segment_prefixes[pop->reg]; next(); @@ -852,7 +852,7 @@ again: if (opcode >= TOK_ASM_first && opcode <= TOK_ASM_last) { int b; b = op0_codes[opcode - TOK_ASM_first]; - if (b & 0xff00) + if (b & 0xff00) g(b >> 8); g(b); return;