From: xerofoify@gmail.com (nick)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question about assembly in set bit function for x86 architecture
Date: Sun, 19 Apr 2015 16:51:08 -0400 [thread overview]
Message-ID: <5534153C.4070303@gmail.com> (raw)
Greetings All,
I am wondering what the below code in the asm modifier does:
static inline void set_bit(int nr, void *addr)
{
asm("btsl %1,%0" : "+m" (*(u32 *)addr) : "Ir" (nr));
}
This would be very helpful as I am new to x86 assembly and don't
even known what register(s)/instruction(s) this touches and therefore this
is impossible for me to look up in the Intel Manuals. If someone either
tells me the registers/instructions this uses or explains the code that
would be very helpful.
Nick
next reply other threads:[~2015-04-19 20:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-19 20:51 nick [this message]
2015-04-19 21:13 ` Question about assembly in set bit function for x86 architecture Anuz Pratap Singh Tomar
2015-04-19 23:08 ` Nicholas Krause
2015-04-19 23:11 ` Anuz Pratap Singh Tomar
2015-04-20 8:05 ` Alexander Kuleshov
2015-04-20 15:46 ` Valdis.Kletnieks at vt.edu
2015-04-20 16:29 ` Bjørn Mork
2015-04-20 16:27 ` Jeff Haran
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=5534153C.4070303@gmail.com \
--to=xerofoify@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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.