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]

[PATCH]: Fix pb in 68hc11 machine reorg


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Committed this patch on 3_4 and mainline to fix 68hc11 z register replacement
on compare instructions.

Stephane

2004-03-02 Stephane Carrez <stcarrez@nerim.fr>

	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Fix when
	comparing with Z register.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQFARPKNNyQxO2LzKT0RAlcKAJ42STT0nT05XG25zO0rFoZZgk8sGwCgjhm4
URzsnmY9dswiKvyHP876vJs=
=1MqZ
-----END PGP SIGNATURE-----
Index: config/m68hc11/m68hc11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.c,v
retrieving revision 1.91
diff -u -p -r1.91 m68hc11.c
--- config/m68hc11/m68hc11.c	27 Oct 2003 12:26:19 -0000	1.91
+++ config/m68hc11/m68hc11.c	2 Mar 2004 20:41:01 -0000
@@ -1,5 +1,6 @@
 /* Subroutines for code generation on Motorola 68HC11 and 68HC12.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GCC.
@@ -4161,8 +4162,10 @@ m68hc11_check_z_replacement (rtx insn, s
 	{
 	  if ((GET_CODE (src) == REG && REGNO (src) == HARD_Z_REGNUM)
 	      || (GET_CODE (src) == COMPARE &&
-		  (rtx_equal_p (XEXP (src, 0), z_reg)
-		   || rtx_equal_p (XEXP (src, 1), z_reg))))
+		  ((rtx_equal_p (XEXP (src, 0), z_reg)
+                    && H_REG_P (XEXP (src, 1)))
+		   || (rtx_equal_p (XEXP (src, 1), z_reg)
+                       && H_REG_P (XEXP (src, 0))))))
 	    {
 	      if (insn == info->first)
 		{

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