what's the meaning of "%%fs" ?

Ender Dai ender.dai at gmail.com
Thu May 9 08:04:57 EDT 2013


%fs is a segment register. More details, see
http://en.wikipedia.org/wiki/X86_assembly_language , section
"Registers", "Segmented addressing".

On Thu, May 9, 2013 at 6:04 PM, lx <lxlenovostar at gmail.com> wrote:
> hi all:
>        the codes is:
>
> extern inline unsigned char get_fs_byte(const char * addr)
> {
>         unsigned register char _v;
>
>         __asm__ ("movb %%fs:%1,%0":"=r" (_v):"m" (*addr));
>         return _v;
> }
>
> What's the meaning of "%%fs" ?
>
> Is "  __asm__ ("movb %1,%0":"=r" (_v):"m" (*addr));" not ok?
>
>
> Thank you.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list