From: Michael Buesch Date: Sat, 14 Jun 2008 12:57:37 +0000 (+0200) Subject: Warn on usage of offset register 6. It is broken. X-Git-Tag: b43-fwcutter-013~43 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=53b17778d7fa85974e29b13d79c82b1837f4d77a;p=b43-tools.git Warn on usage of offset register 6. It is broken. Signed-off-by: Michael Buesch --- diff --git a/assembler/main.c b/assembler/main.c index 54252da..51de8f7 100644 --- a/assembler/main.c +++ b/assembler/main.c @@ -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;