This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Error: register does not match opcode suffix with current CVS
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Error: register does not match opcode suffix with current CVS
- From: Andreas Jaeger <aj at suse dot de>
- Date: 28 Jan 2000 14:28:45 +0100
Trying to compile the CVS version of glibc 2.2 with GCC 2.96 20000128
I get an error message that "register does not match opcode suffix".
I've contructed a minimal preprocessed example which is appended
below.
/opt/gcc-2.96/bin/gcc fts.i -O2 -mpentiumpro -o /usr/src/build-glibc/20000125-main-Linux-2.3.x/io/fts.o
/tmp/cc4cZ2ki.s: Assembler messages:
/tmp/cc4cZ2ki.s:96: Error: register does not match opcode suffix
The file compiles fine with -O1 (or with -m386) but not with "-O2
-mpentiumpro".
Btw. line 96 contains: "addb %di, %di"
My system: Linux 2.2.13 on i686 with glibc 2.1.3, binutils 2.9.1.0.25.
I reported the error five days ago already but without further
details. This time I hope I've added everything so that you can
reproduce the bug.
Andreas
typedef unsigned int size_t;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
__extension__ typedef unsigned long long int __u_quad_t;
typedef __u_quad_t __dev_t;
typedef __u_long __ino_t;
typedef __u_int __nlink_t;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __ino_t ino_t;
typedef __dev_t dev_t;
typedef __nlink_t nlink_t;
extern int __open (__const char *__file, int __oflag, ...) ;
extern int *__errno_location (void) __attribute__ ((__const__));
typedef struct {
struct _ftsent *fts_cur;
struct _ftsent *fts_child;
struct _ftsent **fts_array;
dev_t fts_dev;
char *fts_path;
int fts_rfd;
int fts_pathlen;
int fts_nitems;
int (*fts_compar) (const void *, const void *);
int fts_options;
} FTS;
typedef struct _ftsent {
struct _ftsent *fts_cycle;
struct _ftsent *fts_parent;
struct _ftsent *fts_link;
long fts_number;
void *fts_pointer;
char *fts_accpath;
char *fts_path;
int fts_errno;
int fts_symfd;
u_short fts_pathlen;
u_short fts_namelen;
ino_t fts_ino;
dev_t fts_dev;
nlink_t fts_nlink;
short fts_level;
u_short fts_info;
u_short fts_flags;
u_short fts_instr;
char fts_name[1];
} FTSENT;
FTS *fts_open (char * const *, int,
int (*)(const FTSENT **, const FTSENT **)) ;
extern void *malloc (size_t __size) __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__)) ;
extern void free (void *__ptr) ;
extern size_t strlen (__const char *__s) ;
extern void bcopy (__const void *__src, void *__dest, size_t __n) ;
static FTSENT *fts_alloc (FTS *, const char *, int) __attribute__ ((regparm (3), stdcall)) ;
FTS *
fts_open(argv, options, compar)
char * const *argv;
register int options;
int (*compar) (const FTSENT **, const FTSENT **) ;
{
register FTS *sp;
register FTSENT *p, *root;
register int nitems;
FTSENT *parent, *tmp;
int len;
if (options & ~0x00ff ) {
(*__errno_location ()) = ( 22 ) ;
return (((void *)0) );
}
if ((sp = malloc((u_int)sizeof(FTS))) == ((void *)0) )
return (((void *)0) );
__builtin_memset ( sp , '\0', sizeof(FTS) ) ;
sp->fts_compar = (int (*) (const void *, const void *) ) compar;
sp->fts_options = options;
if ((sp->fts_options & 0x0002 ) )
(sp->fts_options |= 0x0004 ) ;
if ((parent = fts_alloc(sp, "", 0)) == ((void *)0) )
goto mem2;
parent->fts_level = -1 ;
for (root = ((void *)0) , nitems = 0; *argv; ++argv, ++nitems) {
if ((len = strlen(*argv)) == 0) {
(*__errno_location ()) = ( 2 ) ;
goto mem3;
}
p = fts_alloc(sp, *argv, len);
p->fts_level = 0 ;
p->fts_parent = parent;
p->fts_accpath = p->fts_name;
if (p->fts_info == 5 )
p->fts_info = 1 ;
if (compar) {
p->fts_link = root;
root = p;
} else {
p->fts_link = ((void *)0) ;
if (root == ((void *)0) )
tmp = root = p;
else {
tmp->fts_link = p;
tmp = p;
}
}
}
if ((sp->fts_cur = fts_alloc(sp, "", 0)) == ((void *)0) )
goto mem3;
sp->fts_cur->fts_link = root;
sp->fts_cur->fts_info = 9 ;
if (! (sp->fts_options & 0x0004 )
&& (sp->fts_rfd = __open(".", 00 , 0)) < 0)
(sp->fts_options |= 0x0004 ) ;
return (sp);
mem3:
free(parent);
mem2: free(sp->fts_path);
free(sp);
return (((void *)0) );
}
static FTSENT *
__attribute__ ((regparm (3), stdcall))
fts_alloc(sp, name, namelen)
FTS *sp;
const char *name;
register int namelen;
{
register FTSENT *p;
size_t len;
len = sizeof(FTSENT) + namelen;
if (! (sp->fts_options & 0x0008 ) )
len += (__alignof__ (long double) - 1) ;
if ((p = malloc(len)) == ((void *)0) )
return (((void *)0) );
bcopy(name, p->fts_name, namelen + 1);
p->fts_namelen = namelen;
p->fts_path = sp->fts_path;
p->fts_errno = 0;
p->fts_flags = 0;
p->fts_instr = 3 ;
p->fts_number = 0;
p->fts_pointer = ((void *)0) ;
return (p);
}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de