diff options
| author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 23:05:40 +0000 |
|---|---|---|
| committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-15 23:05:40 +0000 |
| commit | 1a29d5df0b337d45a43b49c26b42fd5ed8fdfe0a (patch) | |
| tree | 22efdb82145d54b42c3dbfede63ff94adb73d28c | |
| parent | 9cab63d0c603dcfa825f9f59e261de6e1263a2a0 (diff) | |
| download | ppe42-gcc-1a29d5df0b337d45a43b49c26b42fd5ed8fdfe0a.tar.gz ppe42-gcc-1a29d5df0b337d45a43b49c26b42fd5ed8fdfe0a.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116983 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/ia64/ia64.c | 24 |
2 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 74bc58dd7a9..148db8712dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * loop-doloop.c (doloop_optimize): Change type of max_cost to int. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index d38a19a1501..71953e29570 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -815,7 +815,29 @@ ia64_legitimate_constant_p (rtx x) case CONST: 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: { |

