linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: HongWoo Lee <hongwoo7@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Question : about difference with bdnz and bdnz+
Date: Thu, 27 Aug 2009 14:04:35 +0900	[thread overview]
Message-ID: <4A9613E3.8020700@gmail.com> (raw)

Hi ~

I found the code in the linux kernel.

static __inline__ void clear_page(void *addr)
{
    unsigned long lines, line_size;
    line_size = cpu_caches.dline_size;
    lines = cpu_caches.dlines_per_page;

    __asm__ __volatile__(
            "mtctr  %1      # clear_page\n\
            1:  dcbz    0,%0\n\
            add     %0,%0,%3\n\
            bdnz+   1b"
            : "=r" (addr)
            : "r" (lines), "0" (addr), "r" (line_size)
            : "ctr", "memory");
}

And I have a question about bdnz+ instruction.
Through googling, I learned that bdnz does decrement count register and 
branch if it is still nonzero.
But I couldn't find what "bdnz+" is.
Can anybody explain to me what it is ??

Thanks in advance.

HongWoo.

             reply	other threads:[~2009-08-27  5:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27  5:04 HongWoo Lee [this message]
2009-08-27  9:30 ` Question : about difference with bdnz and bdnz+ Benjamin Herrenschmidt

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=4A9613E3.8020700@gmail.com \
    --to=hongwoo7@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.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).