void yasm_x86__bc_transform_jmpfar(yasm_bytecode *bc, x86_jmpfar *jmpfar);
void yasm_x86__bc_apply_prefixes
- (yasm_bytecode *bc, int num_prefixes, unsigned long **prefixes);
+ (x86_common *common, int num_prefixes, unsigned long **prefixes,
+ unsigned long line);
void yasm_x86__ea_init(yasm_effaddr *ea, unsigned int spare,
/*@null@*/ yasm_symrec *origin);
/*@=compmempass@*/
void
-yasm_x86__bc_apply_prefixes(yasm_bytecode *bc, int num_prefixes,
- unsigned long **prefixes)
+yasm_x86__bc_apply_prefixes(x86_common *common, int num_prefixes,
+ unsigned long **prefixes, unsigned long line)
{
- x86_common *common = (x86_common *)bc->contents;
int i;
for (i=0; i<num_prefixes; i++) {
switch ((x86_parse_insn_prefix)prefixes[i][0]) {
case X86_LOCKREP:
if (common->lockrep_pre != 0)
- yasm__warning(YASM_WARN_GENERAL, bc->line,
+ yasm__warning(YASM_WARN_GENERAL, line,
N_("multiple LOCK or REP prefixes, using leftmost"));
common->lockrep_pre = (unsigned char)prefixes[i][1];
break;
yasm_internal_error(N_("didn't get FAR expression in jmpfar"));
}
+ yasm_x86__bc_apply_prefixes((x86_common *)jmpfar, num_prefixes, prefixes,
+ bc->line);
+
/* Transform the bytecode */
yasm_x86__bc_transform_jmpfar(bc, jmpfar);
- yasm_x86__bc_apply_prefixes(bc, num_prefixes, prefixes);
}
static void
yasm__error(bc->line,
N_("no NEAR form of that jump instruction exists"));
+ yasm_x86__bc_apply_prefixes((x86_common *)jmp, num_prefixes, prefixes,
+ bc->line);
+
/* Transform the bytecode */
yasm_x86__bc_transform_jmp(bc, jmp);
- yasm_x86__bc_apply_prefixes(bc, num_prefixes, prefixes);
}
void
} else
insn->imm = NULL;
+ yasm_x86__bc_apply_prefixes((x86_common *)insn, num_prefixes, prefixes,
+ bc->line);
+
/* Transform the bytecode */
yasm_x86__bc_transform_insn(bc, insn);
- yasm_x86__bc_apply_prefixes(bc, num_prefixes, prefixes);
}