b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: b43-dev@lists.infradead.org
Subject: [PATCH] b43-asm, b43-dasm: Add 5 new instructions.
Date: Mon, 12 Sep 2011 11:15:15 +0200	[thread overview]
Message-ID: <20110912111515.22249d2c@milhouse> (raw)
In-Reply-To: <alpine.LFD.2.02.1109121040030.18551@oracolo.ing.unibs.it>

On Mon, 12 Sep 2011 10:50:16 +0200 (CEST)
Francesco Gringoli <francesco.gringoli@ing.unibs.it> wrote:

> Hi Larry and Michael,
> 
> I did some testing with the firmware and discovered the meaning of a few
> instructions that are currently marked either as "unknown jump" on the
> bcm-specs site or do not appear at all. I chose some names but maybe you
> have better ideas regard them.
> 
> Here is a brief description of the instructions I'm talking about and a
> set of patches for b43-tools to enable proper dis/assembly.
> 
> Regards,
> -Francesco
> 
> -------------=--------------
> Description of the new instructions
> 
> Opcode 0x0D6: jumps if the difference between op1 and op2 is negative.
> Suggested name "jdn" (jump if difference is negative).
> 
> Opcode 0x0D6|1: jumps if the difference between op1 and op2 is positive or 
> null.
> Suggested name "jdpz" (jump if difference is positive or zero).
> 
> Opcode 0x0D8: jumps if the difference between op1 and op2 is positive.
> Suggested name "jdp" (jump if difference is positive).
> 
> Opcode 0x0D8|1: jumps if the difference between op1 and op2 is negative or 
> null.
> Suggested name "jdnz" (jump if difference is negative or zero).
> 
> Opcode 0x101: multiply op1 and op2 and store upper 16 bits in op3.
> Suggested name "mul" (multiply).
> This works on CPUs running ucode11. I have tested it on CPUs running
> ucode5 and op3 is not assigned.
> 
> -------------=--------------
> The following changes are made to b43-tools
> 
> 1) b43-asm assembles new instructions jdn, jdnz, jdp, jdpz, mul;
> 2) b43-dasm disassembles opcodes 0xD6, 0xD7, 0xD8, 0xD9, 0x101.

Thanks a lot. That looks pretty cool. Could you also add simple testcases
to the test.asm file? That file contains basic tests for all instructions
and at the end also tests for fixed bugs or special features.

Did you test the jump insns on r5?
And we should probably add a comment which cores support mul (most likely >=r11).

> --- disassembler.orig/main.c	2011-08-21 14:16:33.000000000 +0200
> +++ disassembler/main.c	2011-09-11 17:43:25.000000000 +0200
> @@ -284,6 +284,12 @@
> ?	struct bin_instruction *bin = stmt->u.insn.bin;
> ?
> ?	switch (bin->opcode) {
> +	case 0x101:
> +		stmt->u.insn.name = "mul";
> +		disasm_std_operand(stmt, 0, 0);
> + ? ? ? ? ? ? ? ?disasm_std_operand(stmt, 1, 1);
> + ? ? ? ? ? ? ? ?disasm_std_operand(stmt, 2, 2);
> +		break;

There's some whitespace damage here.

-- 
Greetings, Michael.

  parent reply	other threads:[~2011-09-12  9:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12  8:50 [PATCH] b43-asm, b43-dasm: Add 5 new instructions Francesco Gringoli
2011-09-12  9:12 ` Gábor Stefanik
2011-09-12  9:25   ` Michael Büsch
2011-09-12 10:09     ` francesco.gringoli at ing.unibs.it
2011-09-12 10:35       ` Michael Büsch
2011-09-12 10:58         ` francesco.gringoli at ing.unibs.it
2011-09-12 11:19           ` Michael Büsch
2011-09-12 13:16             ` francesco.gringoli at ing.unibs.it
2011-09-12 13:32               ` Michael Büsch
2011-09-12  9:15 ` Michael Büsch [this message]
2011-09-12  9:56   ` francesco.gringoli at ing.unibs.it
2011-09-12 10:02     ` Michael Büsch
2011-09-12 11:35 ` Michael Büsch
2011-09-12 13:49   ` francesco.gringoli at ing.unibs.it
2011-09-12 14:04   ` francesco.gringoli at ing.unibs.it
2011-09-12 14:13     ` Michael Büsch
2011-09-12 14:31 ` Michael Büsch
2011-09-12 14:44   ` francesco.gringoli at ing.unibs.it
2011-09-12 15:07     ` Michael Büsch
  -- strict thread matches above, loose matches on Subject: below --
2011-09-12 15:23 Francesco Gringoli
2011-09-12 15:36 ` Michael Büsch
2011-09-12 17:30 francesco.gringoli at ing.unibs.it
2011-09-12 18:02 ` Michael Büsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110912111515.22249d2c@milhouse \
    --to=m@bues.ch \
    --cc=b43-dev@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).