You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
/* Utility functions for manipulation with TARGET_MEM_REFs -- tree expressions
that directly map to addressing modes of the target. */
/* Add the symbol to base, eventually forcing it to register. */
if (parts.base)
- parts.base = force_gimple_operand_bsi (bsi,
- build2 (PLUS_EXPR, addr_type,
- parts.base, tmp),
- true, NULL_TREE);
+ {
+ if (parts.index)
+ parts.base = force_gimple_operand_bsi (bsi,
+ build2 (PLUS_EXPR, addr_type,
+ parts.base, tmp),
+ true, NULL_TREE);
+ else
+ {
+ parts.index = parts.base;
+ parts.base = tmp;
+ }
+ }
else
parts.base = tmp;
parts.symbol = NULL_TREE;