This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, MMIX: Fix PR target/18347, incorrect TImode refusal on3.4
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 14 Nov 2004 00:13:40 -0500 (EST)
- Subject: Committed, MMIX: Fix PR target/18347, incorrect TImode refusal on3.4
This was the actual patch I checked into the gcc-3.4 branch: it needed
quote adjustment. Long time ago, INIT_CUMULATIVE_ARGS had the semantics
and name for one of its lesser used parameters tweaked, but the names in
all target macros were not corrected (making it a regression compared
to the documentation, if you will). Since I had that change in the tree
I tested, I committed it as well.
Another thing that nobody will care about but should be noted for the
record, is that this change causes gcc.dg/compat/vector-1 to fail at
"compilation of gcc.dg/compat/vector-1 c_compat_x_tst.o compile" rather
than execution: "sorry, unimplemented: support for mode `V16QI'" (several
similar messages, then ICE). Also similar compilation messages for
vector-2_x.c, which I suppose just SEGV:ed during compilation before,
since it doesn't show up as a regression. This on the 3.4 branch only:
open-coding of vectors DTRT on trunk. I think the compile-time message is
better than failing at run-time, so not actually a regression. Of course
it'd have been better to try and avoid the ICE, but I guess that'd have
to include fixing the open-coding of vector support and that's not a
regression and appropriate for 3.4.
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.2326.2.690
diff -p -c -r2.2326.2.690 ChangeLog
*** ChangeLog 13 Nov 2004 22:31:29 -0000 2.2326.2.690
--- ChangeLog 14 Nov 2004 04:51:24 -0000
***************
*** 1,3 ****
--- 1,11 ----
+ 2004-11-14 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR target/18347
+ * config/mmix/mmix.c (mmix_function_outgoing_value): Handle
+ TImode. Sorry for other non-complex larger-than-64-bit modes.
+ * config/mmix/mmix.h (MIN_UNITS_PER_WORD): Do not define.
+ (INIT_CUMULATIVE_ARGS): Correct unused macro name FNDECL.
+
2004-11-13 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/md.texi (constraints) <% modifier>: Mention that it is
Index: config/mmix/mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.55
diff -p -c -r1.55 mmix.c
*** config/mmix/mmix.c 5 Oct 2003 19:50:55 -0000 1.55
--- config/mmix/mmix.c 14 Nov 2004 04:51:26 -0000
*************** mmix_function_outgoing_value (tree valty
*** 620,627 ****
return
gen_rtx_REG (mode, MMIX_OUTGOING_RETURN_VALUE_REGNUM);
! /* A complex type, made up of components. */
! cmode = TYPE_MODE (TREE_TYPE (valtype));
nregs = ((GET_MODE_BITSIZE (mode) + BITS_PER_WORD - 1) / BITS_PER_WORD);
/* We need to take care of the effect of the register hole on return
--- 620,641 ----
return
gen_rtx_REG (mode, MMIX_OUTGOING_RETURN_VALUE_REGNUM);
! if (COMPLEX_MODE_P (mode))
! /* A complex type, made up of components. */
! cmode = TYPE_MODE (TREE_TYPE (valtype));
! else
! {
! /* Of the other larger-than-register modes, we only support
! scalar mode TImode. (At least, that's the only one that's
! been rudimentally tested.) Make sure we're alerted for
! unexpected cases. */
! if (mode != TImode)
! sorry ("support for mode `%s'", GET_MODE_NAME (mode));
!
! /* In any case, we will fill registers to the natural size. */
! cmode = DImode;
! }
!
nregs = ((GET_MODE_BITSIZE (mode) + BITS_PER_WORD - 1) / BITS_PER_WORD);
/* We need to take care of the effect of the register hole on return
Index: config/mmix/mmix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.h,v
retrieving revision 1.58.14.1
diff -p -c -r1.58.14.1 mmix.h
*** config/mmix/mmix.h 9 Mar 2004 03:00:05 -0000 1.58.14.1
--- config/mmix/mmix.h 14 Nov 2004 04:51:27 -0000
***************
*** 1,5 ****
/* Definitions of target machine for GNU compiler, for MMIX.
! Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
--- 1,5 ----
/* Definitions of target machine for GNU compiler, for MMIX.
! Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
*************** extern int target_flags;
*** 269,283 ****
#define FLOAT_WORDS_BIG_ENDIAN 1
#define UNITS_PER_WORD 8
- /* FIXME: This macro is correlated to MAX_FIXED_MODE_SIZE in that
- e.g. this macro must not be 8 (default, UNITS_PER_WORD) when
- MAX_FIXED_MODE_SIZE is 64 (default, DImode), or really: this must be
- set manually if MAX_FIXED_MODE_SIZE is not at least twice the register
- size. By setting it to 4, we don't have to worry about TImode things
- yet. Revisit, perhaps get TImode going or get some solution that does
- not mandate TImode or lie in other ways. */
- #define MIN_UNITS_PER_WORD 4
-
/* FIXME: Promotion of modes currently generates slow code, extending
before every operation. */
--- 269,274 ----
*************** enum reg_class
*** 745,751 ****
typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
! #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0))
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
--- 736,742 ----
typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
! #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0))
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
brgds, H-P