Richard,

Something in these constraint patches broke my mips16 build (I cannot
build glibc in mips16 mode).  I have cut down a test case and verified
that the problem started with this checkin:

2014-06-11  Richard Sandiford  <rdsandif...@googlemail.com>

        * common.md: New file.
        * doc/md.texi: Update description of generic, machine-independent
        constraints.
        * config/s390/constraints.md (e): Delete.
        * Makefile.in (md_file): Include common.md.
        * config/m32c/t-m32c (md_file): Likewise.
        * genpreds.c (general_mem): New array.
        (etc)

Attached is a small test case (its ugly but it comes from vfscanf in glibc) that
fails to compile for me with these options:

  -mips32r2 -mips16 -mabi=32 -std=gnu99 -fgnu89-inline -O2 -c x.c

Error message:

/tmp/ccAltddb.s: Assembler messages:
/tmp/ccAltddb.s:23: Error: invalid operands `sb $3,24($sp)'


Steve Ellcey
sell...@mips.com

extern long long __mips16_syscall4(long, long, long, long, long);
typedef unsigned int size_t;
 union __mips16_syscall_return   {
     long long val;
 };
 typedef struct {
 int lock;
 }
 _IO_lock_t;
 struct _IO_FILE {
   _IO_lock_t *_lock;
 };
 typedef struct _IO_FILE _IO_FILE;
int  _IO_vfscanf_internal (_IO_FILE *s) {
   int c = 0;
   char *wp = ((void *)0);
   size_t wpsize;
   wp = (char *) (__typeof (wp)) ({
	size_t __newlen = 32; /* (((newsize * sizeof (char)) + 15) & -16); */
	char *__newbuf = __builtin_alloca (__newlen);
 	__newbuf;
 	}
);
 wp[wpsize++] = (c);
 ((void) ({
 int *__futex = (&((*(s)->_lock).lock));
 int __val = ({
 	__typeof (*__futex) __atg1_result;
 	__atg1_result;
 	}
);
 if (__builtin_expect (__val > 1, 0)) ({
 long int __ret;
 __ret = ({
     union __mips16_syscall_return ret;
     ret.val = __mips16_syscall4 ((long) ((long) (__futex)), (long) (((1) | 128)), (long) ((1)), (long) (0), (long) ((4000 + 238)));
          }
);
 }
);
 }
));
 }

Reply via email to