projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b43-asm: Terminate instructions with ; instead of |
[b43-tools.git]
/
assembler
/
main.c
diff --git
a/assembler/main.c
b/assembler/main.c
index 701721d6f202b2db71b34bee1bdfe4355b98989b..a2ace1df993217396e295579569780521cb52a3c 100644
(file)
--- a/
assembler/main.c
+++ b/
assembler/main.c
@@
-289,7
+289,7
@@
static unsigned int generate_reg_operand(struct assembler_context *ctx,
case SPR:
/* format: 0b100. .... .... */
val |= 0x800;
case SPR:
/* format: 0b100. .... .... */
val |= 0x800;
- if (ctx->arch == 15)
//FIXME is this ok?
+ if (ctx->arch == 15)
val <<= 1;
if (reg->nr & ~0x1FF)
asm_error(ctx, "SPR-nr too big");
val <<= 1;
if (reg->nr & ~0x1FF)
asm_error(ctx, "SPR-nr too big");
@@
-298,7
+298,7
@@
static unsigned int generate_reg_operand(struct assembler_context *ctx,
case OFFR:
/* format: 0b1000 0110 0rrr */
val |= 0x860;
case OFFR:
/* format: 0b1000 0110 0rrr */
val |= 0x860;
- if (ctx->arch == 15)
//FIXME is this ok?
+ if (ctx->arch == 15)
val <<= 1;
if (reg->nr & ~0x7)
asm_error(ctx, "OFFR-nr too big");
val <<= 1;
if (reg->nr & ~0x7)
asm_error(ctx, "OFFR-nr too big");
@@
-469,7
+469,7
@@
static unsigned int merge_external_jmp_into_opcode(struct assembler_context *ctx
ol = insn->operands;
opcode = opbase;
ol = insn->operands;
opcode = opbase;
- cond = ol->oper[0]->u.
raw
;
+ cond = ol->oper[0]->u.
imm->imm
;
if (cond & ~0xFF)
asm_error(ctx, "External jump condition value too big (> 0xFF)");
opcode |= cond;
if (cond & ~0xFF)
asm_error(ctx, "External jump condition value too big (> 0xFF)");
opcode |= cond;
@@
-1106,8
+1106,12
@@
int main(int argc, char **argv)
int err, res = 1;
err = parse_args(argc, argv);
int err, res = 1;
err = parse_args(argc, argv);
- if (err)
+ if (err
< 0
)
goto out;
goto out;
+ if (err > 0) {
+ res = 0;
+ goto out;
+ }
err = open_input_file();
if (err)
goto out;
err = open_input_file();
if (err)
goto out;