From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@thepuffingroup.com
Subject: [parisc-linux] parisc asm questions
Date: Sat, 21 Oct 2000 13:39:50 -0700 [thread overview]
Message-ID: <20001021133950.A7980@tausq.org> (raw)
would someone please enlighten me about why this is happening?
i have a simple fetch-add asm loop:
/* arg0 is a pointer to a buffer, %arg1 is the length, %r4 == %arg1>>2 */
$loop:
ldws,ma 4(%arg0), %r3
addc %ret0, %r3, %ret0
addib,<> -1, %r4, $loop
addi -4, %arg1, %arg1
i notice that the sum returned is sometimes off by a certain amount from
what i was expecting. while i was tracing this down, i added a line to
the loop so that it's:
$loop:
add %r0, %r3, %r3 /* isn't this equivalent to a nop? */
ldws,ma 4(%arg0), %r3
addc %ret0, %r3, %ret0
addib,<> -1, %r4, $loop
addi -4, %arg1, %arg1
and i get fairly different behavior. I think I'm not understanding how
the carry bit gets updated or something. any hints will be much appreciated.
randolph
--
@..@ http://www.TauSq.org/
(----)
( >__< )
^^ ~~ ^^
reply other threads:[~2000-10-21 20:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20001021133950.A7980@tausq.org \
--to=randolph@tausq.org \
--cc=parisc-linux@thepuffingroup.com \
/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