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]

[PATCH] c4x HARD_REGNO_MODE_OK


While building c4x cross, I realized c4x handles SImode but does not accept
it in HARD_REGNO_MODE_OK. This breaks e.g. the SUBREG_BYTE stuff because it
aborts immediately when you use SImode.

1999-12-16  Jakub Jelinek  <jakub@redhat.com>

	* config/c4x/c4x.c (c4x_hard_regno_mode_ok): Accept SImode.

--- gcc/config/c4x/c4x.c.jj	Sun Nov 14 21:43:34 1999
+++ gcc/config/c4x/c4x.c	Thu Dec 16 10:03:45 1999
@@ -350,6 +350,16 @@ c4x_hard_regno_mode_ok (regno, mode)
 	&& IS_INT_REG (regno + 1)
 	&& (regno & 1) == 0;
 
+    case SImode:		/* Very Long Long (128 bits) */
+      /* We need four registers to store SImode.  Note that 
+	 it is much easier to constrain the first register
+	 to start on an even boundary.  */
+      return IS_INT_REG (regno)
+	&& IS_INT_REG (regno + 1)
+	&& IS_INT_REG (regno + 2)
+	&& IS_INT_REG (regno + 3)
+	&& (regno & 3) == 0;
+
     default:
       return 0;			/* We don't support these modes */
     }


Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.26 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________


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