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]

Re: PR target/16909: [3.5 Regression] "unrecognizable insn" ICE


On Sat, Aug 07, 2004 at 09:31:00AM -0700, H. J. Lu wrote:
> during bootstrap
> Reply-To: 
> 
> There is a typo in
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00305.html
> 
> I will check in this patch as an obvious fix.
> 

Well, my patch isn't enough. The code

+	    while (repcount-- > 0)
+	      {
+		rtx mem = adjust_automodify_address_nv (dst,
+							GET_MODE
(zeroreg),
+							destreg,
offset);
+		emit_insn (gen_strset (destreg, mem, zeroreg));
+		offset += size;
+	      }

in

http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00305.html

doesn't look right. It looks like "strset" won't take DImode and
adjust_automodify_address_nv assumes it does. There is
"*strsetdi_rex_1". But it is only used when

"TARGET_64BIT && (TARGET_SINGLE_STRINGOP || optimize_size)"

So the code will work for

const int x86_single_stringop = m_386 | m_PENT4 | m_NOCONA;

But not the default x86_64 target. Maybe I shouldn't complain :-).


H.J.
> 
> H.J.
> ---
> 2004-08-06  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* config/i386/i386.c (ix86_expand_clrmem): Properly call
> 	gen_strset for 64bit target.
> 
> --- gcc/config/i386/i386.c.64	2004-08-06 11:07:16.000000000 -0700
> +++ gcc/config/i386/i386.c	2004-08-07 09:23:31.006373343 -0700
> @@ -11569,7 +11569,10 @@ ix86_expand_clrmem (rtx dst, rtx count_e
>  		rtx mem = adjust_automodify_address_nv (dst,
>  							GET_MODE (zeroreg),
>  							destreg, offset);
> -		emit_insn (gen_strset (destreg, mem, zeroreg));
> +		emit_insn (gen_strset (destreg, mem,
> +				       (TARGET_64BIT
> +					? gen_rtx_SUBREG (SImode, zeroreg, 0)
> +					: zeroreg)));
>  		offset += size;
>  	      }
>  	  else


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