All of lore.kernel.org
 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 13:19:21 +0200	[thread overview]
Message-ID: <20110912131921.3d32b719@milhouse> (raw)
In-Reply-To: <B0B2605A-E101-40D5-AD61-9EA490A2F502@ing.unibs.it>

On Mon, 12 Sep 2011 12:58:52 +0200
francesco.gringoli at ing.unibs.it wrote:

> On Sep 12, 2011, at 12:35 PM, Michael B?sch wrote:
> 
> > On Mon, 12 Sep 2011 12:09:01 +0200
> > francesco.gringoli at ing.unibs.it wrote:
> > 
> >> but trying on a = 0x8000 and b = 0x7fff helped me understanding. a - b = 0x8000 + 2'(0x7fff) = 0x0001 > 0. While 0x8000 < 0x7fff.
> > 
> > I don't get it.
> > Can you write simple pseudocode for your instruction?
> Will try for jdn.
> 
> > For example, for jls, we have this pseudocode:
> > 
> > if (xxx < yyy)
> >    pc := jjj
> > (where xxx and yyy are two's complement)
> > 
> 
> ** jump if difference is negative
> 
> 0d6 xxx yyy jjj
> 
> if ( xxx - yyy < 0 )
> 	pc := jjj
> 
> C-pseudocode for jdn
> 
> 	short c = xxx - yyy;
> 	if ( c < 0 )
> 		goto jjj;

Ok. So the existing signed-compare jumps look at the carry of the subtraction
operation, but the new jdX instructions look at bit 0x8000 of the subtraction
result. (if set -> negative, otherwise positive). jdX ignores the carry.

Did I get it now?

-- 
Greetings, Michael.

  reply	other threads:[~2011-09-12 11:19 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 [this message]
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
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=20110912131921.3d32b719@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.