<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 12:08 AM, Nicholas Krause <span dir="ltr"><<a href="mailto:xerofoify@gmail.com" target="_blank">xerofoify@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On April 19, 2015 5:13:20 PM EDT, Anuz Pratap Singh Tomar <<a href="mailto:chambilkethakur@gmail.com">chambilkethakur@gmail.com</a>> wrote:<br>
>On Sun, Apr 19, 2015 at 9:51 PM, nick <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>> wrote:<br>
><br>
>> Greetings All,<br>
>> I am wondering what the below code in the asm modifier does:<br>
>> static inline void set_bit(int nr, void *addr)<br>
>> {<br>
>> asm("btsl %1,%0" : "+m" (*(u32 *)addr) : "Ir" (nr));<br>
>> }<br>
>> This would be very helpful as I am new to x86 assembly and don't<br>
>> even known what register(s)/instruction(s) this touches and therefore<br>
>this<br>
>> is impossible for me to look up in the Intel Manuals. If someone<br>
>either<br>
>> tells me the registers/instructions this uses or explains the code<br>
>that<br>
>> would be very helpful.<br>
>> Nick<br>
>><br>
>> _______________________________________________<br>
>> Kernelnewbies mailing list<br>
>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>><br>
><br>
>get a book on i86 assembly and learn it.<br>
</div></div>The reason I am asking is that is assembly worth my time to learn for this part of the kernel, I understand it's use in boot code but outside of that and cache memory lines in architecture directories there is very little, 95 percent of the kernel is written in C. In addition due to this the only practical reason I can thing of is for<br>
debugging, how useful is assembly for kernel debugging is my other question about this topic.<br>
<span class="HOEnZb"><font color="#888888">Nick<br>
--<br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Just read the books, don't be lazy.<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Thank you <br>Warm Regards<br>Anuz<br></div>
</div></div>