title: can't find a register in class 'CREG' while reloading 'asm' - memcpy inline asm
body: <p>I am trying to make an earlier verion Linux got compiled, you can download the source code from git://github.com/azru0512/linux-0.12.git. While compiling ''kernel/blk_drv/ramdisk.c'', I got error message below,</p>
  
  <pre><code>ramdisk.c:36:10: error: can't find a register in class 'CREG' while reloading 'asm'
  ramdisk.c:40:10: error: can't find a register in class 'CREG' while reloading 'asm'
  ramdisk.c:36:10: error: 'asm' operand has impossible constraints
  ramdisk.c:40:10: error: 'asm' operand has impossible constraints
  </code></pre>
  
  <p>What in ramdisk.c are,</p>
  
  <pre><code>  if (CURRENT-&gt; cmd == WRITE) {
      (void) memcpy(addr,
              CURRENT-&gt;buffer,
              len);
    } else if (CURRENT-&gt;cmd == READ) {
      (void) memcpy(CURRENT-&gt;buffer,
              addr,
              len);
    } else
      panic("unknown ramdisk-command");
  </code></pre>
  
  <p>And the memcpy is,</p>
  
  <pre><code>extern inline void * memcpy(void * dest,const void * src, int n)
  {
  __asm__("cld\n\t"
    "rep\n\t"
    "movsb"
    ::"c" (n),"S" (src),"D" (dest)
    :"cx","si","di");
  return dest;
  }
  </code></pre>
  
  <p>I guess it's memcpy (include/string.h) inline asm problem, so I remove the clobber list from it but without luck. Could you help me to find out what's going wrong? Thanks!</p>