projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add details for extracting firmware from
[b43-tools.git]
/
assembler
/
main.c
diff --git
a/assembler/main.c
b/assembler/main.c
index b262276d2ee800305d6a192b42fd1e73b80cfdb3..ad180b274bc8ac2520718a83f7590d5a3b23011b 100644
(file)
--- a/
assembler/main.c
+++ b/
assembler/main.c
@@
-429,7
+429,7
@@
static struct code_output * do_assemble_insn(struct assembler_context *ctx,
struct instruction *insn,
unsigned int opcode)
{
struct instruction *insn,
unsigned int opcode)
{
- int i;
+
unsigned
int i;
struct operlist *ol;
int nr_oper = 0;
uint64_t code = 0;
struct operlist *ol;
int nr_oper = 0;
uint64_t code = 0;
@@
-1017,7
+1017,7
@@
static void resolve_labels(struct assembler_context *ctx)
{
struct code_output *c;
int addr;
{
struct code_output *c;
int addr;
- int i;
+
unsigned
int i;
unsigned int current_address;
/* Calculate the absolute addresses for each instruction. */
unsigned int current_address;
/* Calculate the absolute addresses for each instruction. */
@@
-1104,7
+1104,7
@@
static void emit_code(struct assembler_context *ctx)
exit(1);
}
if (IS_VERBOSE_DEBUG)
exit(1);
}
if (IS_VERBOSE_DEBUG)
-
fprintf(stderr,
"\nCode:\n");
+
printf(
"\nCode:\n");
list_for_each_entry(c, &ctx->output, list) {
switch (c->type) {
list_for_each_entry(c, &ctx->output, list) {
switch (c->type) {
@@
-1116,7
+1116,7
@@
static void emit_code(struct assembler_context *ctx)
}
}
}
}
- switch (
output_
format) {
+ switch (
cmdargs.out
format) {
case FMT_RAW_LE32:
case FMT_RAW_BE32:
/* Nothing */
case FMT_RAW_LE32:
case FMT_RAW_BE32:
/* Nothing */
@@
-1152,7
+1152,7
@@
static void emit_code(struct assembler_context *ctx)
switch (c->type) {
case OUT_INSN:
if (IS_VERBOSE_DEBUG) {
switch (c->type) {
case OUT_INSN:
if (IS_VERBOSE_DEBUG) {
-
fprintf(stderr, "%03X %03X,%03X,%03
X\n",
+
printf("%03X %04X,%04X,%04
X\n",
c->opcode,
c->operands[0].u.operand,
c->operands[1].u.operand,
c->opcode,
c->operands[0].u.operand,
c->operands[1].u.operand,
@@
-1179,7
+1179,7
@@
static void emit_code(struct assembler_context *ctx)
ctx->arch);
}
ctx->arch);
}
- switch (
output_
format) {
+ switch (
cmdargs.out
format) {
case FMT_B43:
case FMT_RAW_BE32:
code = ((code & (uint64_t)0xFFFFFFFF00000000ULL) >> 32) |
case FMT_B43:
case FMT_RAW_BE32:
code = ((code & (uint64_t)0xFFFFFFFF00000000ULL) >> 32) |
@@
-1215,7
+1215,7
@@
static void emit_code(struct assembler_context *ctx)
}
}
}
}
- if (
arg_
print_sizes) {
+ if (
cmdargs.
print_sizes) {
printf("%s: text = %u instructions (%u bytes)\n",
fn, insn_count,
(unsigned int)(insn_count * sizeof(uint64_t)));
printf("%s: text = %u instructions (%u bytes)\n",
fn, insn_count,
(unsigned int)(insn_count * sizeof(uint64_t)));