Everything works with GCC 4.2.1 but this is the real pain:

Trying to build Glibc from CVS redhat repo got this message:

../sysdeps/i386/i486/bits/string.h:  ôóíêöèè ‘__mempcpy_by2’
../sysdeps/i386/i486/bits/string.h:755: îøèáêà: can't find a register in class
‘GENERAL_REGS’ while reloading ‘asm’
../sysdeps/i386/i486/bits/string.h:755: îøèáêà: ‘asm’ operand has impossible
constraints
make[2]: *** [/usr/src/rpm/BUILD/glibc-build/string/string-inlines.os] Îøèáêà 1


This is i486 string op. Is it too old and should be rewritten for i686? Got no
glue here. If you need preprocessed source I will attach this.

So far, the piece of code leading to the fail is:


__STRING_INLINE char *
__mempcpy_by2 (char *__dest, __const char *__src, size_t __srclen)
{
  register char *__tmp = __dest;
  register unsigned long int __d0, __d1;
  __asm__ __volatile__
    ("shrl      $1,%3\n\t"
     "jz        2f\n"                 /* only a word */
     "1:\n\t"
     "movl      (%2),%0\n\t"
     "leal      4(%2),%2\n\t"
     "movl      %0,(%1)\n\t"
     "leal      4(%1),%1\n\t"
     "decl      %3\n\t"
     "jnz       1b\n"
     "2:\n\t"
     "movw      (%2),%w0\n\t"
     "movw      %w0,(%1)"
     : "=&q" (__d0), "=r" (__tmp), "=&r" (__src), "=&r" (__d1),
       "=m" ( *(struct { __extension__ char __x[__srclen]; } *)__dest)
     : "1" (__tmp), "2" (__src), "3" (__srclen / 2),
       "m" ( *(struct { __extension__ char __x[__srclen]; } *)__src)
     : "cc");
  return __tmp + 2;
}


-- 
           Summary: i486 assembler bug (GLIBC 2.6) or feature?
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Vladislav dot Mikhailikov at paradox-neo dot uz
 GCC build triplet: pentium4-east-linux
  GCC host triplet: pentium4-east-linux
GCC target triplet: pentium4-east-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32818

Reply via email to