All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about assembly in set bit function for x86 architecture
@ 2015-04-19 20:51 nick
  2015-04-19 21:13 ` Anuz Pratap Singh Tomar
  2015-04-20 16:27 ` Jeff Haran
  0 siblings, 2 replies; 8+ messages in thread
From: nick @ 2015-04-19 20:51 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-20 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-19 20:51 Question about assembly in set bit function for x86 architecture nick
2015-04-19 21:13 ` 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

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.