Commit d0970db2 by James E Wilson Committed by Jim Wilson

Short term fix for PR 28490.

* config/ia64/ia64.c (ia64_legitimate_constant_p, cast CONST):
Handle symbol offsets same as they are handled in ia64_expand_move
and move_operand.

From-SVN: r116983
parent 7607bdda
2006-09-15 Jim Wilson <wilson@specifix.com>
* config/ia64/ia64.c (ia64_legitimate_constant_p, cast CONST):
Handle symbol offsets same as they are handled in ia64_expand_move
and move_operand.
2006-09-16 Andreas Tobler <a.tobler@schweiz.org> 2006-09-16 Andreas Tobler <a.tobler@schweiz.org>
* loop-doloop.c (doloop_optimize): Change type of max_cost to int. * loop-doloop.c (doloop_optimize): Change type of max_cost to int.
......
...@@ -815,7 +815,29 @@ ia64_legitimate_constant_p (rtx x) ...@@ -815,7 +815,29 @@ ia64_legitimate_constant_p (rtx x)
case CONST: case CONST:
case SYMBOL_REF: case SYMBOL_REF:
return tls_symbolic_operand_type (x) == 0; /* ??? Short term workaround for PR 28490. We must make the code here
match the code in ia64_expand_move and move_operand, even though they
are both technically wrong. */
if (tls_symbolic_operand_type (x) == 0)
{
HOST_WIDE_INT addend = 0;
rtx op = x;
if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
{
addend = INTVAL (XEXP (XEXP (op, 0), 1));
op = XEXP (XEXP (op, 0), 0);
}
if (any_offset_symbol_operand (op, GET_MODE (op)))
return true;
if (aligned_offset_symbol_operand (op, GET_MODE (op)))
return (addend & 0x3fff) == 0;
return false;
}
return false;
case CONST_VECTOR: case CONST_VECTOR:
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment