Patchwork RFA: Fix m68hc11 --enable-werror-always build

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 12, 2010, 7:07 p.m.
Message ID <20101112140751.yj4rd936ok4k4sck-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/71007/
State New
Headers show

Comments

Joern Rennecke - Nov. 12, 2010, 7:07 p.m.
Built on i686-pc-linux-gnu with gcc (GCC) 4.6.0 20101111 (experimental) .
2010-11-12  Joern Rennecke  <amylaar@spamcop.net>

	PR target/46436
	* config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Split shift count
	to accomodate 32 bit HOST_WIDE_INT.
	(m68hc11_emit_logical): Remove unused variable insn.
	(m68hc11_check_z_replacement) <CLOBBER>: Set this_insn_uses_ix and
	this_insn_uses_iy before use.
Joern Rennecke - Nov. 19, 2010, 3:44 a.m.
Ping?
This patch hasn't been reviewed for a week:
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01331.html
Richard Henderson - Nov. 19, 2010, 6:26 p.m.
On 11/18/2010 07:44 PM, Joern Rennecke wrote:
> Ping?
> This patch hasn't been reviewed for a week:
> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01331.html

Ok.


r~

Patch

Index: config/m68hc11/m68hc11.c
===================================================================
--- config/m68hc11/m68hc11.c	(revision 166609)
+++ config/m68hc11/m68hc11.c	(working copy)
@@ -1999,7 +1999,7 @@  m68hc11_gen_highpart (enum machine_mode 
 	}
       else if (mode == SImode)
        {
-         return gen_int_mode (val >> 32, SImode);
+         return gen_int_mode ((val >> 16) >> 16, SImode);
        }
     }
   if (mode == QImode && D_REG_P (x))
@@ -2967,8 +2967,6 @@  m68hc11_emit_logical (enum machine_mode 
     }
   else if (operands[1] != 0 && operands[2] != 0)
     {
-      rtx insn;
-
       if (!H_REG_P (operands[0]) && operands[3])
 	{
 	  emit_move_insn (operands[3], operands[1]);
@@ -2976,15 +2974,13 @@  m68hc11_emit_logical (enum machine_mode 
 				  operands[3],
 				  gen_rtx_fmt_ee (code, mode,
 						  operands[3], operands[2])));
-	  insn = emit_move_insn (operands[0], operands[3]);
+	  emit_move_insn (operands[0], operands[3]);
 	}
       else
 	{
-	  insn = emit_insn (gen_rtx_SET (mode,
-					 operands[0],
-					 gen_rtx_fmt_ee (code, mode,
-							 operands[0],
-							 operands[2])));
+	  emit_insn (gen_rtx_SET (mode, operands[0],
+				  gen_rtx_fmt_ee (code, mode,
+						  operands[0], operands[2])));
 	}
     }
 
@@ -4657,6 +4653,10 @@  m68hc11_check_z_replacement (rtx insn, s
     }
   if (GET_CODE (body) == CLOBBER)
     {
+      rtx dst = XEXP (body, 0);
+
+      this_insn_uses_ix = reg_mentioned_p (ix_reg, dst);
+      this_insn_uses_iy = reg_mentioned_p (iy_reg, dst);
 
       /* IX and IY are used at the same time, we have to restore
          the value of the scratch register before this insn.  */