asm/dasm: Let's simply comment out these lines that generate the ext jmp operands.
[b43-tools.git] / disassembler / main.c
index 7fc8536384ec27c54259a02a9ac09532902b69b8..718e33fcb013874a7ccf28a0ef13dd547878a465 100644 (file)
@@ -539,9 +539,13 @@ static void disasm_opcodes(struct disassembler_context *ctx)
                        snprintf(str, 5, "0x%02X", (bin->opcode & 0x0FF));
                        stmt->u.insn.operands[0] = str;
 
-                       disasm_std_operand(stmt, 0, 1, 0);
-                       disasm_std_operand(stmt, 1, 2, 0);
-                       stmt->u.insn.is_labelref = 3;
+                       /* We don't disassemble the first and second operand, as
+                        * that always is a dummy r0 operand.
+                        * disasm_std_operand(stmt, 0, 1, 0);
+                        * disasm_std_operand(stmt, 1, 2, 0);
+                        * stmt->u.insn.is_labelref = 3;
+                        */
+                       stmt->u.insn.is_labelref = 1;
                        stmt->u.insn.labeladdr = stmt->u.insn.bin->operands[2];
                        break;
                case 0x700:
@@ -551,9 +555,13 @@ static void disasm_opcodes(struct disassembler_context *ctx)
                        snprintf(str, 5, "0x%02X", (bin->opcode & 0x0FF));
                        stmt->u.insn.operands[0] = str;
 
-                       disasm_std_operand(stmt, 0, 1, 0);
-                       disasm_std_operand(stmt, 1, 2, 0);
-                       stmt->u.insn.is_labelref = 3;
+                       /* We don't disassemble the first and second operand, as
+                        * that always is a dummy r0 operand.
+                        * disasm_std_operand(stmt, 0, 1, 0);
+                        * disasm_std_operand(stmt, 1, 2, 0);
+                        * stmt->u.insn.is_labelref = 3;
+                        */
+                       stmt->u.insn.is_labelref = 1;
                        stmt->u.insn.labeladdr = stmt->u.insn.bin->operands[2];
                        break;
                default:
@@ -643,7 +651,7 @@ static void emit_asm(struct disassembler_context *ctx)
                        first = 1;
                        for (i = 0; i < ARRAY_SIZE(stmt->u.insn.operands); i++) {
                                if (stmt->u.insn.is_labelref == i) {
-                                       fprintf(outfile, ",%s",
+                                       fprintf(outfile, ", %s",
                                                stmt->u.insn.labelref->u.label.name);
                                }
                                if (!stmt->u.insn.operands[i])
@@ -651,7 +659,7 @@ static void emit_asm(struct disassembler_context *ctx)
                                if (first)
                                        fprintf(outfile, "\t");
                                if (!first)
-                                       fprintf(outfile, ",");
+                                       fprintf(outfile, ", ");
                                first = 0;
                                fprintf(outfile, "%s",
                                        stmt->u.insn.operands[i]);