www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/10/23/20:58:24

Date: Sat, 23 Oct 1999 23:51:15 +0200
From: Marc Lehmann <pcg AT opengroup DOT org>
To: pgcc AT delorie DOT com
Subject: Re: Optimization bug in certain switch statements
Message-ID: <19991023235115.A32599@cerebro.laendle>
Mail-Followup-To: pgcc AT Delorie DOT com
References: <3 DOT 0 DOT 5 DOT 32 DOT 19991022211417 DOT 00793ac0 AT voruta DOT vu DOT lt>
Mime-Version: 1.0
In-Reply-To: <3.0.5.32.19991022211417.00793ac0@voruta.vu.lt>; from Rimantas Plaipa on Fri, Oct 22, 1999 at 09:14:17PM +0200
X-Operating-System: Linux version 2.2.12 (root AT cerebro) (gcc version 2.95.1 19990816 (release))
Sender: Marc Lehmann <pcg AT goof DOT com>
Reply-To: pgcc AT delorie DOT com
X-Mailing-List: pgcc AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii

On Fri, Oct 22, 1999 at 09:14:17PM +0200, Rimantas Plaipa <Rimantas DOT Plaipa AT gf DOT vu DOT lt> wrote:
> the bug is still here. I localized the bug and made the striped example
> which looks like that:

Thanks a lot, the fix is attached.

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg AT opengroup DOT org |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=Switchfix

Index: config/i386/i386.md
===================================================================
RCS file: /home/cvsroot/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.44
diff -u -p -u -r1.44 i386.md
--- config/i386/i386.md	1999/06/23 13:34:57	1.44
+++ config/i386/i386.md	1999/10/23 21:49:04
@@ -9219,7 +9219,7 @@ byte_xor_operation:
           output_asm_insn (AS2 (and%B0,%1,%b0), operands);
         }
     }
-  else if (!no_sign_extend && QI_REG_P (operands[0]) 
+  else if (QI_REG_P (operands[0]) 
            && (INTVAL (operands[1]) & 0xff) == 0xff)
     {
       if ((INTVAL (operands[1]) & 0xff00) == 0)
@@ -9231,6 +9231,9 @@ byte_xor_operation:
       operands[1] = GEN_INT ((INTVAL (operands[1]) >> 8) & 0xff);
       output_asm_insn (AS2 (and%B0,%1,%b0), operands);
     }
+  else
+    output_asm_insn (AS2 (and%W0,%1,%0), operands);
+
   if (REGNO (operands[2]) == 0 && REGNO (operands[0]) == 0)
 #ifdef INTEL_SYNTAX
     return \"cwde\";
@@ -9303,7 +9306,7 @@ byte_xor_operation:
 	  output_asm_insn (AS2 (and%B0,%2,%b0), operands);
 	}
     }
-  else if (!no_sign_extend && QI_REG_P (operands[0]) 
+  else if (QI_REG_P (operands[0]) 
            && (INTVAL (operands[2]) & 0xff) == 0xff)
     {
       if ((INTVAL (operands[2]) & 0xff00) == 0)

--zhXaljGHf11kAtnf--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019