i386.c (ix86_decompose_address): Verify the base is a REG before trying to examine...
authorJeffrey A Law <law@cygnus.com>
Mon, 15 Nov 1999 09:06:12 +0000 (09:06 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 15 Nov 1999 09:06:12 +0000 (02:06 -0700)
        * i386.c (ix86_decompose_address): Verify the base is a REG
        before trying to examine its register number.

From-SVN: r30536

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

index ca68fd2a2808bf14af5a9947189a5829f085566c..95c2c773d5552b68079db1a8d7f9ac9f7c2cf98a 100644 (file)
@@ -1,5 +1,8 @@
 Sun Nov 14 23:11:05 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * i386.c (ix86_decompose_address): Verify the base is a REG
+       before trying to examine its register number.
+
        * basic-block.h: Remove all #defines and prototypes related to
        integer lists.
        (free_bb_mem, compute_preds_succs): Remove prototype.
index 090196002432af82c52eafe0b940ba09504ea045..92289705f11cae44e6c9719e22ec684d3165ceb1 100644 (file)
@@ -1828,6 +1828,7 @@ ix86_decompose_address (addr, out)
      Avoid this by transforming to [%esi+0].  */
   if (ix86_cpu == PROCESSOR_K6 && !optimize_size
       && base && !index && !disp
+      && REG_P (base)
       && REGNO_REG_CLASS (REGNO (base)) == SIREG)
     disp = const0_rtx;