i386.c (memory_address_info): Correct the scale factor test.

* i386.c (memory_address_info): Correct the scale
        factor test.

From-SVN: r26917
This commit is contained in:
Graham Stott 1999-05-12 18:51:03 -06:00 committed by Jeff Law
parent 269bcf848b
commit 35f43fd13c
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu May 13 01:49:55 1999 Graham Stott <GrahamS@RCP.co.uk>
* i386.c (memory_address_info): Correct the scale
factor test.
Thu May 13 01:31:19 1999 Nick Burrett <nick.burrett@btinternet.com>
* arm.md (nop): Backout Apr 27 change. Ensure REGISTER_PREFIX is

View File

@ -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. */