public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs-970825 cross build question
@ 1997-08-28 23:24 Joel Sherrill
  1997-08-28 23:24 ` genflags / genemit inconsistency Joern Rennecke
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill @ 1997-08-28 23:24 UTC (permalink / raw)
  To: egcs

On Thu, 28 Aug 1997, Ian Lance Taylor wrote:

> I believe the egcs snapshot is arranged like a standard Cygnus
> binutils or gdb release.  You should be able to just copy the
> bfd/gas/include/newlib etc. directories in as siblings to the gcc
> directory.  You should then be able to just run configure and make.

This did the trick. I have a modified version of the one-tree script to
work with egcs now.

I can post it or email it to Doug if he is interested.

--joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* genflags / genemit inconsistency
  1997-08-28 23:24 egcs-970825 cross build question Joel Sherrill
@ 1997-08-28 23:24 ` Joern Rennecke
  0 siblings, 0 replies; 5+ messages in thread
From: Joern Rennecke @ 1997-08-28 23:24 UTC (permalink / raw)
  To: egcs

For patterns like this one:

(define_expand "casesi_jump"
  [(parallel [(set (pc) (match_operand:SI 0 "register_operand" "r"))
              (use (label_ref (match_operand 2 "" "")))])]

genflags generates prototypes that don't match the function definition
that genemit creates: the function definition for this example has three
arguments, while the prototype has only two.

Here is a fix:

Thu Aug 28 23:09:53 1997  J"orn Rennecke <amylaar@cygnus.co.uk>

	* genflags.c (max_operand): New function.
	(num_operands): Deleted.
	(gen_proto): Agree with genemit on number of arguments.

*** genflags.c-970803	Wed Oct  9 12:25:42 1996
--- genflags.c	Thu Aug 28 23:09:53 1997
*************** static struct obstack call_obstack, norm
*** 49,90 ****
  /* Max size of names encountered.  */
  static int max_id_len;
  
- /* Count the number of match_operand's found.  */
- 
  static int
! num_operands (x)
       rtx x;
  {
!   int count = 0;
!   int i, j;
!   enum rtx_code code = GET_CODE (x);
!   char *format_ptr = GET_RTX_FORMAT (code);
  
    if (code == MATCH_OPERAND)
!     return 1;
  
    if (code == MATCH_OPERATOR || code == MATCH_PARALLEL)
!     count++;
  
!   for (i = 0; i < GET_RTX_LENGTH (code); i++)
      {
!       switch (*format_ptr++)
  	{
! 	case 'u':
! 	case 'e':
! 	  count += num_operands (XEXP (x, i));
! 	  break;
! 
! 	case 'E':
! 	  if (XVEC (x, i) != NULL)
! 	    for (j = 0; j < XVECLEN (x, i); j++)
! 	      count += num_operands (XVECEXP (x, i, j));
! 
! 	  break;
  	}
      }
! 
!   return count;
  }
  
  /* Print out prototype information for a function.  */
--- 49,89 ----
  /* Max size of names encountered.  */
  static int max_id_len;
  
  static int
! max_operand (x)
       rtx x;
  {
!   register RTX_CODE code;
!   register int i;
!   register int len;
!   register char *fmt;
!   int max_opno = -1;
! 
!   if (x == 0)
!     return;
! 
!   code = GET_CODE (x);
  
    if (code == MATCH_OPERAND)
!     return XINT (x, 0);
  
    if (code == MATCH_OPERATOR || code == MATCH_PARALLEL)
!     max_opno = XINT (x, 0);
  
!   fmt = GET_RTX_FORMAT (code);
!   len = GET_RTX_LENGTH (code);
!   for (i = 0; i < len; i++)
      {
!       if (fmt[i] == 'e' || fmt[i] == 'u')
! 	max_opno = MAX (max_opno, max_operand (XEXP (x, i)));
!       else if (fmt[i] == 'E')
  	{
! 	  int j;
! 	  for (j = 0; j < XVECLEN (x, i); j++)
! 	    max_opno = MAX (max_opno, max_operand (XVECEXP (x, i, j)));
  	}
      }
!   return max_opno;
  }
  
  /* Print out prototype information for a function.  */
*************** static void
*** 93,99 ****
  gen_proto (insn)
       rtx insn;
  {
!   int num = num_operands (insn);
    printf ("extern rtx gen_%-*s PROTO((", max_id_len, XSTR (insn, 0));
  
    if (num == 0)
--- 92,98 ----
  gen_proto (insn)
       rtx insn;
  {
!   int num = max_operand (insn) + 1;
    printf ("extern rtx gen_%-*s PROTO((", max_id_len, XSTR (insn, 0));
  
    if (num == 0)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs-970825 cross build question
@ 1997-08-28 23:24 Doug Evans
  0 siblings, 0 replies; 5+ messages in thread
From: Doug Evans @ 1997-08-28 23:24 UTC (permalink / raw)
  To: egcs

   Date: Thu, 28 Aug 1997 17:30:37 -0500 (CDT)
   From: Joel Sherrill <joel@OARcorp.com>

   > I believe the egcs snapshot is arranged like a standard Cygnus
   > binutils or gdb release.  You should be able to just copy the
   > bfd/gas/include/newlib etc. directories in as siblings to the gcc
   > directory.  You should then be able to just run configure and make.

   This did the trick. I have a modified version of the one-tree script to
   work with egcs now.

   I can post it or email it to Doug if he is interested.

I'll update the script.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs-970825 cross build question
@ 1997-08-28 15:58 Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 1997-08-28 15:58 UTC (permalink / raw)
  To: egcs

   Date: Thu, 28 Aug 1997 10:46:47 -0500 (CDT)
   From: Joel Sherrill <joel@OARcorp.com>

   I am trying to build the rtems configurations using egcs-970825.
   With the old organization, I used the one-tree shell script
   (ftp.cygnus.com:/pub/embedded/crossgcc) to generate a binutils,
   gcc, newlib source tree to configure and build.  The new organization
   seem incompatible with this.  Is there another one-tree script
   I should be using?

   Could someone please tell me what should be linked under a src directory
   to make a one-tree build possible?

I believe the egcs snapshot is arranged like a standard Cygnus
binutils or gdb release.  You should be able to just copy the
bfd/gas/include/newlib etc. directories in as siblings to the gcc
directory.  You should then be able to just run configure and make.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* egcs-970825 cross build question
  1997-08-28 14:34 A libio patch H.J. Lu
@ 1997-08-28 15:38 ` Joel Sherrill
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Sherrill @ 1997-08-28 15:38 UTC (permalink / raw)
  To: egcs

I am trying to build the rtems configurations using egcs-970825.
With the old organization, I used the one-tree shell script
(ftp.cygnus.com:/pub/embedded/crossgcc) to generate a binutils,
gcc, newlib source tree to configure and build.  The new organization
seem incompatible with this.  Is there another one-tree script
I should be using?

Could someone please tell me what should be linked under a src directory
to make a one-tree build possible?

Thanks.  At this point, I don't know how to build egcs snapshots
for rtems or any other embedded target.

--joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-08-28 23:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-28 23:24 egcs-970825 cross build question Joel Sherrill
1997-08-28 23:24 ` genflags / genemit inconsistency Joern Rennecke
  -- strict thread matches above, loose matches on Subject: below --
1997-08-28 23:24 egcs-970825 cross build question Doug Evans
1997-08-28 15:58 Ian Lance Taylor
1997-08-28 14:34 A libio patch H.J. Lu
1997-08-28 15:38 ` egcs-970825 cross build question Joel Sherrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).