This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 8/8] Add a common .md file and define standard constraints there


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  <>

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

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

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;
 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);
 wp[wpsize++] = (c);
 ((void) ({
 int *__futex = (&((*(s)->_lock).lock));
 int __val = ({
 	__typeof (*__futex) __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)));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]