hi Why is "can't find a register in class ‘AREG’ while reloading ‘asm’" ?

lx lxlenovostar at gmail.com
Mon May 27 03:51:26 EDT 2013


hi all:
       The codes is:
static int match(int len,const char * name,struct dir_entry * de)
{
        register int same __asm__("ax");

        if (!de || !de->inode || len > NAME_LEN)
                return 0;
        if (len < NAME_LEN && de->name[len])
                return 0;
        *__asm__ ("cld\n\t"*
                "fs ; repe ; cmpsb\n\t"
                "setz %%al"
                :"=a" (same)
                :"0" (0),"S" ((long) name),"D" ((long) de->name),"c" (len)
                :"cx","di","si");
        return same;
}

When I make it, the error messages is:
*namei.c:35: error: can't find a register in class ‘AREG’ while reloading
‘asm’*
*
*
*This is why? *
*Thank you*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130527/c63c87a2/attachment.html 


More information about the Kernelnewbies mailing list