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]

Fix handling of complex doubles on VAX


This patch fixes the handling of complex doubles on the vax by restricting
index operations to modes less than or equal to eight bytes in length.
Indexed moves of operands larger than this are not supported by the
machine definition.  Without the patch, an ICE in instantiate_virtual_regs_1
occurs compiling compile/991213-1.c.  Tested on vax-dec-ultrix4.3.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-01-15  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size
	less than or equal to eight bytes.

--- vax.h.orig	Thu Dec 20 12:36:38 2001
+++ vax.h	Wed Jan  2 19:56:20 2002
@@ -695,14 +695,14 @@
       && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob))		\
     goto ADDR; }
 
-/* 1 if PROD is either a reg times size of mode MODE
-   or just a reg, if MODE is just one byte.
+/* 1 if PROD is either a reg times size of mode MODE and MODE is less
+   than or equal 8 bytes, or just a reg if MODE is one byte.
    This macro's expansion uses the temporary variables xfoo0 and xfoo1
    that must be declared in the surrounding context.  */
 #define INDEX_TERM_P(PROD, MODE)   \
 (GET_MODE_SIZE (MODE) == 1						\
  ? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD))			\
- : (GET_CODE (PROD) == MULT						\
+ : (GET_CODE (PROD) == MULT && GET_MODE_SIZE (MODE) <= 8		\
     &&									\
     (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1),			\
      ((((GET_CODE (xfoo0) == CONST_INT					\


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