Re: hi Why is "can't find a register in class ‘AREG’ while reloading ‘asm’" ?
Rajat Sharma
fs.rajat at gmail.com
Mon May 27 05:27:53 EDT 2013
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.
Note that it is CREG because it encounter "cx" in clobber list first.
-Rajat
On Mon, May 27, 2013 at 1:21 PM, lx <lxlenovostar at gmail.com> 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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130527/ded19756/attachment.html
More information about the Kernelnewbies
mailing list