This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
MMIX fixed (was: Re: mmix broken in mainline by real changes)
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: <gcc-bugs at gcc dot gnu dot org>, <zack at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 May 2002 02:55:37 -0400 (EDT)
- Subject: MMIX fixed (was: Re: mmix broken in mainline by real changes)
On Thu, 30 May 2002, Andreas Jaeger wrote:
> Crosscompiling to mmix I get with current CVS:
>
> gcc -c -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -DHAVE_CONFIG_H -I. -I. -I/mmix/mmix/sources/combined/gcc -I/mmix/mmix/sources/combined/gcc/. -I/mmix/mmix/sources/combined/gcc/config -I/mmix/mmix/sources/combined/gcc/../include \
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c -o mmix.o
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c: In function `mmix_print_operand_address':
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c:2363: warning: comparison between signed and unsigned
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c:2381: warning: comparison between signed and unsigned
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c:2386: warning: comparison between signed and unsigned
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c: In function `mmix_intval':
> /mmix/mmix/sources/combined/gcc/config/mmix/mmix.c:3139: `REAL_VALUE_TYPE' undeclared (first use in this function)
Yup, noticed that too... Thanks for the heads-up Andreas.
Tsk tsk: the ChangeLog entry for the patch at fault doesn't say
"tree.h: Don't include real.h". That would have simplified
searching just a tiny bit for me and perhaps other port
maintainers days behind on the mailing lists and scratching
their head over who/what pulled the carpet from under them.
The mmix.c brokenness is fixed by the following patch, which
also removes some redundant code; a fix that was waiting for
some real (no pun intended) change to tailgate. (I've just
checked that cc1 builds again; I noticed that the tree has
general regressions right now so the build may fail later.)
* config/mmix/mmix.c: Include real.h.
(mmix_constant_address_p): Remove redundant test before case.
Index: mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.28
diff -p -c -r1.28 mmix.c
*** mmix.c 19 May 2002 07:55:38 -0000 1.28
--- mmix.c 30 May 2002 06:44:35 -0000
*************** Boston, MA 02111-1307, USA. */
*** 40,45 ****
--- 40,46 ----
#include "integrate.h"
#include "target.h"
#include "target-def.h"
+ #include "real.h"
/* First some local helper definitions. */
#define MMIX_FIRST_GLOBAL_REGNUM 32
*************** mmix_constant_address_p (x)
*** 1458,1466 ****
int addend = 0;
/* When using "base addresses", anything constant goes. */
int constant_ok = TARGET_BASE_ADDRESSES != 0;
-
- if (code == LABEL_REF || code == SYMBOL_REF)
- return 1;
if (code == CONSTANT_P_RTX || code == HIGH)
/* FIXME: Don't know how to dissect these. Avoid them for now. */
--- 1459,1464 ----
brgds, H-P