Commit 53b17778 authored by Michael Büsch's avatar Michael Büsch

Warn on usage of offset register 6. It is broken.

Signed-off-by: Michael Büsch's avatarMichael Buesch <mb@bu3sch.de>
parent 30bc378e
......@@ -341,8 +341,14 @@ static unsigned int generate_mem_operand(struct assembler_context *ctx,
asm_warn(ctx, "INDIRECT memoffset 0x%X too long (> 6 bits)", off);
off &= 0x3F;
}
if (reg & ~0x7)
if (reg > 6) {
/* Assembler bug. The parser shouldn't pass this value. */
asm_error(ctx, "OFFR-nr too big");
}
if (reg == 6) {
asm_warn(ctx, "Using offset register 6. This register is broken "
"on certain devices. Use off0 to off5 only.");
}
val |= off;
val |= (reg << 6);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment