i386.c (print_reg): Handle QI and HI modes for non Q regs.
authorRichard Henderson <rth@redhat.com>
Wed, 19 Nov 2003 07:59:08 +0000 (23:59 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 19 Nov 2003 07:59:08 +0000 (23:59 -0800)
        * config/i386/i386.c (print_reg): Handle QI and HI modes for
        non Q regs.

From-SVN: r73730

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

index 0184f4354478c77089d480ec322e74c9bf49f776..931f74c2aeb83f2541cafd4ca1cb61ad1fe78897 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-19  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/i386.c (print_reg): Handle QI and HI modes for
+       non Q regs.
+
 2003-11-19  Andreas Tobler  <a.tobler@schweiz.ch>
 
        * config/config.gcc (powerpc-*-darwin*): Add libgcc build
index 744f5213c9a588ce6108975dea755064d5595c60..80603716cb59fa8c9bd3fa9b3c9587a0fe40222e 100644 (file)
@@ -7072,12 +7072,17 @@ print_reg (rtx x, int code, FILE *file)
       /* FALLTHRU */
     case 16:
     case 2:
+    normal:
       fputs (hi_reg_name[REGNO (x)], file);
       break;
     case 1:
+      if (REGNO (x) >= ARRAY_SIZE (qi_reg_name))
+       goto normal;
       fputs (qi_reg_name[REGNO (x)], file);
       break;
     case 0:
+      if (REGNO (x) >= ARRAY_SIZE (qi_high_reg_name))
+       goto normal;
       fputs (qi_high_reg_name[REGNO (x)], file);
       break;
     default: