projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add script for brcm80211 firmware conversion
[b43-tools.git]
/
assembler
/
main.c
diff --git
a/assembler/main.c
b/assembler/main.c
index ab79f7eaaa74f13f51c32f33f41d3a8504b53983..0d995a4d6ffe0619ecf57e4cc092364d5b11d5ed 100644
(file)
--- 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;
}
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");
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;
val |= off;
val |= (reg << 6);
break;
@@
-823,8
+829,8
@@
static void assemble_instruction(struct assembler_context *ctx,
/* Search the last insn. */
if (out->type == OUT_INSN) {
if (out->is_jump_insn) {
/* Search the last insn. */
if (out->type == OUT_INSN) {
if (out->is_jump_insn) {
- asm_
error
(ctx, "RET instruction directly after "
-
"jump instruction. The hardware won't like this.");
+ asm_
warn
(ctx, "RET instruction directly after "
+ "jump instruction. The hardware won't like this.");
}
break;
}
}
break;
}
@@
-1124,7
+1130,8
@@
static void emit_code(struct assembler_context *ctx)
if (arg_print_sizes) {
printf("%s: text = %u instructions (%u bytes)\n",
if (arg_print_sizes) {
printf("%s: text = %u instructions (%u bytes)\n",
- fn, insn_count, insn_count * sizeof(uint64_t));
+ fn, insn_count,
+ (unsigned int)(insn_count * sizeof(uint64_t)));
}
fclose(fd);
}
fclose(fd);