From: Graham Stott Date: Thu, 13 May 1999 00:51:03 +0000 (-0600) Subject: i386.c (memory_address_info): Correct the scale factor test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35f43fd13cbdb81e92ed952e4a20df7202713d81;p=gcc.git i386.c (memory_address_info): Correct the scale factor test. * i386.c (memory_address_info): Correct the scale factor test. From-SVN: r26917 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1109ce4fe04..6727dd59cc7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu May 13 01:49:55 1999 Graham Stott + + * i386.c (memory_address_info): Correct the scale + factor test. + Thu May 13 01:31:19 1999 Nick Burrett * arm.md (nop): Backout Apr 27 change. Ensure REGISTER_PREFIX is diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e3c2f02d3f2..8c4aa281f0e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5638,7 +5638,8 @@ memory_address_info (addr, disp_length) /* Scaling can not be encoded without base or displacement. Except for scale == 1 where we can encode reg + reg instead of reg * 2. */ - if (!base && index && scale != 1) + if (!base && index + && (!scale || GET_CODE (scale) != CONST_INT || (INTVAL (scale) != 1))) disp = const0_rtx; /* Find the length of the displacement constant. */