I tried compiling this but I get slightly different error:
error: can’t find a register in class ‘CREG’ while reloading ‘asm’
this error is because of explicit clobber list which is not needed in this case as all registers in clobber list are input list.
error: can’t find a register in class ‘CREG’ while reloading ‘asm’
this error is because of explicit clobber list which is not needed in this case as all registers in clobber list are input list.
Note that it is CREG because it encounter "cx" in clobber list first.
On Mon, May 27, 2013 at 1:21 PM, lx <lxlenovostar@xxxxxxxxx> wrote:
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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies