i386.c (print_operand_address, case REG): Do not use ESI addressing mode for the K6.
authorJan Hubicka <hubicka@paru.cas.cz>
Fri, 2 Apr 1999 10:44:02 +0000 (12:44 +0200)
committerJeff Law <law@gcc.gnu.org>
Fri, 2 Apr 1999 10:44:02 +0000 (03:44 -0700)
        * i386.c (print_operand_address, case REG): Do not use ESI addressing
        mode for the K6.
        * i386.c (print_operand_address, case MULT): Use more efficient
        encoding (mult (reg) (const_int 2)).

From-SVN: r26116

gcc/ChangeLog
gcc/config/i386/i386.c

index cf03778d8df318ddfae203a5ba51e81ebba85895..af1042da6df5ca2dd33944a18df260acb1743647 100644 (file)
@@ -1,3 +1,11 @@
+Fri Apr  2 11:36:12 1999  Jan Hubicka  (hubicka@paru.cas.cz)
+
+       * i386.c (print_operand_address, case REG): Do not use ESI addressing
+       mode for the K6.
+
+       * i386.c (print_operand_address, case MULT): Use more efficient
+       encoding (mult (reg) (const_int 2)).
+
 Thu Apr  1 17:01:50 1999  Richard Henderson  <rth@cygnus.com>
 
        Move over patch from Bernd Schmidt from GC branch:
index e288a15b3cfc1e2bf9531faf270c835bce16f649..7a3c332ac0c14acde78e9852089bebe0ed30c802 100644 (file)
@@ -3772,6 +3772,11 @@ print_operand_address (file, addr)
   switch (GET_CODE (addr))
     {
     case REG:
+      /* ESI addressing makes instruction vector decoded on the K6.  We can
+        avoid this by ESI+0 addressing.  */
+      if (REGNO_REG_CLASS (REGNO (addr)) == SIREG
+         && ix86_cpu == PROCESSOR_K6 && !optimize_size)
+       output_addr_const (file, const0_rtx);
       ADDR_BEG (file);
       fprintf (file, "%se", RP);
       fputs (hi_reg_name[REGNO (addr)], file);
@@ -3887,8 +3892,16 @@ print_operand_address (file, addr)
            ireg = XEXP (addr, 0);
          }
 
-       output_addr_const (file, const0_rtx);
-       PRINT_B_I_S (NULL_RTX, ireg, scale, file);
+       /* (reg,reg,) is shorter than (,reg,2).  */
+       if(scale == 2)
+         {
+           PRINT_B_I_S (ireg, ireg, 1, file);
+         } 
+       else 
+         {
+           output_addr_const (file, const0_rtx);
+           PRINT_B_I_S (NULL_RTX, ireg, scale, file);
+         }
       }
       break;