OSDN Git Service

* i386.c (ix86_decompose_address): Verify the base is a REG
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Nov 1999 09:06:12 +0000 (09:06 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Nov 1999 09:06:12 +0000 (09:06 +0000)
        before trying to examine its register number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30536 138bc75d-0d04-0410-961f-82ee72b054a4

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

index ca68fd2..95c2c77 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 0901960..9228970 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;