This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB 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: gdb/300: Obsolete or multi-arch z8k


The following reply was made to PR gdb/300; it has been noted by GNATS.

From: Andrew Cagney <ac131313@redhat.com>
To: nobody@sources.redhat.com, gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: gdb/300: Obsolete or multi-arch z8k
Date: Fri, 27 Sep 2002 17:24:44 -0400

 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=300
 
 FYI:
 
 
 
 The z8k compiler is in
 ftp://sources.redhat.com/pub/ecos/ecos-1.2.1/ecosSWtools-990319-src.tar.bz2
 
 This is a complete toolchain source with other things.
 
 To build it with current binutils, I got a binutils cvs sandbox, moved the
 gcc directory from above archive into it, added the newlib directory from
 newlib-1.9 or 1.10 and it built. I needed to add a newer config.sub and
 configure in the gcc directory.
 That's what I remember, I have a local cvs repository where I build the
 compiler. If you have problems building it, I can send you my source tree.
 
 When building the cross compiler will fail with a ICE at one libiberty
 file. Compile this file without -O2, then it should work.
 
 Attached is a small patch which is needed for it to compile and also fixes
 a code generation problem.
 
 Index: gcc/config/z8k/z8k.c
 ===================================================================
 RCS file: /nfs/soft/src/CVSdepot/z8kgcc/ecosgcc/config/z8k/z8k.c,v
 retrieving revision 1.1.1.1
 retrieving revision 1.2
 diff -u -r1.1.1.1 -r1.2
 --- gcc/config/z8k/z8k.c	2001/09/18 23:40:43	1.1.1.1
 +++ gcc/config/z8k/z8k.c	2001/09/24 19:32:31	1.2
 @@ -2233,11 +2233,11 @@
     /* The mask is a bit-for-bit for the internal register numbering system,
        so r10 has the fp in it.  We work out the external register numbering
        so that we can push the registers efficiently */
 -  int exregs[FIRST_PSEUDO_REGISTER];
 +  int exregs[16];
 
     memset (exregs, 0, sizeof (exregs));
 
 -  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
 +  for (i = 0; i < 16; i++)
       {
         if (mask & (1<<i))
   	{
 @@ -2245,7 +2245,7 @@
   	}
       }
 
 -  for (i = 0; i < FIRST_PSEUDO_REGISTER; i+=2)
 +  for (i = 0; i < 16; i+=2)
       {
         if (exregs[i] && exregs[i+1])
   	{
 Index: gcc/config/z8k/z8k.h
 ===================================================================
 RCS file: /nfs/soft/src/CVSdepot/z8kgcc/ecosgcc/config/z8k/z8k.h,v
 retrieving revision 1.1.1.1
 retrieving revision 1.3
 diff -u -r1.1.1.1 -r1.3
 --- gcc/config/z8k/z8k.h	2001/09/18 23:40:43	1.1.1.1
 +++ gcc/config/z8k/z8k.h	2001/10/26 23:19:30	1.3
 @@ -216,7 +216,7 @@
 
   /* Define this to change the optimizations performed by default.  */
 
 -#define OPTIMIZATION_OPTIONS(LEVEL)	\
 +#define OPTIMIZATION_OPTIONS(LEVEL,SIZE)	\
   {	 
 			\
     if ((LEVEL) >= 1)			\
       {					\
 @@ -945,7 +945,7 @@
   #define IS_STRICT 0
   /* Nonzero if X is a hard reg that can be used as an index
      or if it is a pseudo reg.  */
 -#define REG_OK_FOR_INDEX_P(X)
 +#define REG_OK_FOR_INDEX_P(X) (REGNO(X) != 0)
 
   /* Nonzero if X is a hard reg that can be used as a base reg
      or if it is a pseudo reg.  */
 @@ -1017,7 +1017,7 @@
   	(((c) == 'Q')  ? (IR_P(op) || DA_P(op)) :               \
           (((c) == 'R')  ? (X_P(op))  :                           \
           (((c) == 'T')  ? (BA_P(op))  :                          \
 -        (((c) == 'S')  ? (BA_P(op) || BX_P(op)) : abort() ))))
 +        (((c) == 'S')  ? (BA_P(op) || BX_P(op)) : ( abort() , 0) ))))
 
   /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
      that is a valid memory address for an instruction.
 
 
 


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