This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[PATCH] Fix sh-elf build failure


Unfortunately, it appears appears my patch this afternoon to change
the "builtin_function" API collided with Joern Rennecke's SH patch
earlier today to add "media" builtins to the SH backend.

This obvious fix passes the additional NULL_TREE to builtin_function.
I also needed to change a call to "bzero" to a "memset" in the same
function to avoid a "poisoned identifier" error.  These two changes
enable a sh-elf cross-compiler from i686-pc-linux-gnu to build again.


I've commited this patch as obvious.  I hope that's OK.


2002-07-01  Roger Sayle  <roger@eyesopen.com>

	* config/sh/sh.c (sh_media_init_builtins): Change use of poisoned
	identifier "bzero" to "memset".  Pass extra NULL_TREE argument to
	builtin_function.


Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.154
diff -c -3 -p -r1.154 sh.c
*** config/sh/sh.c	1 Jul 2002 19:41:52 -0000	1.154
--- config/sh/sh.c	2 Jul 2002 03:45:25 -0000
*************** sh_media_init_builtins ()
*** 7192,7198 ****
    tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES];
    const struct builtin_description *d;

!   bzero (shared, sizeof shared);
    for (d = bdesc; d - bdesc < sizeof bdesc / sizeof bdesc[0]; d++)
      {
        tree type, arg_type;
--- 7192,7198 ----
    tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES];
    const struct builtin_description *d;

!   memset (shared, 0, sizeof shared);
    for (d = bdesc; d - bdesc < sizeof bdesc / sizeof bdesc[0]; d++)
      {
        tree type, arg_type;
*************** sh_media_init_builtins ()
*** 7235,7241 ****
  	  if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
  	    shared[signature] = type;
  	}
!       builtin_function (d->name, type, d - bdesc, BUILT_IN_MD, NULL);
      }
  }

--- 7235,7242 ----
  	  if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
  	    shared[signature] = type;
  	}
!       builtin_function (d->name, type, d - bdesc, BUILT_IN_MD,
! 			NULL, NULL_TREE);
      }
  }


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


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