Comment 13 for bug 838994

Revision history for this message
In , Michael Hope (michaelh1) wrote :

arm_legitimate_index_p() seems to be wrong. Near the end it has:

  /* For ARM v4 we may be doing a sign-extend operation during the
     load. */
  if (arm_arch4)
    {
      if (mode == HImode
   || mode == HFmode
   || (outer == SIGN_EXTEND && mode == QImode))
 range = 256;
      else
 range = 4096;
    }
  else
    range = (mode == HImode || mode == HFmode) ? 4095 : 4096;

The final 4096 range is incorrect for ARM mode sign extends. The arm_arch4 path looks good.