diff options
author | Steven Bosscher <stevenb.gcc@gmail.com> | 2008-05-30 18:21:31 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2008-05-30 14:21:31 -0400 |
commit | 0cdc04e8d5b61d4de770b4474a6aa0351ed5b74a (patch) | |
tree | 84f15d801604f31632fd4cdd31558c46ab3d302c /gcc | |
parent | 3f6383d38bc996a01dfa086a42b83c452386fa00 (diff) | |
download | gcc-0cdc04e8d5b61d4de770b4474a6aa0351ed5b74a.zip gcc-0cdc04e8d5b61d4de770b4474a6aa0351ed5b74a.tar.gz gcc-0cdc04e8d5b61d4de770b4474a6aa0351ed5b74a.tar.bz2 |
rs6000.c (rs6000_legitimize_address, [...]): Make sure an rtx is a SYMBOL_REF before calling get_pool_constant.
2008-05-30 Steven Bosscher <stevenb.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_legitimize_address,
rs6000_legitimize_reload_address, rs6000_emit_move): Make sure an
rtx is a SYMBOL_REF before calling get_pool_constant.
From-SVN: r136216
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82d2478..1a76fd3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-05-30 Steven Bosscher <stevenb.gcc@gmail.com> + + * config/rs6000/rs6000.c (rs6000_legitimize_address, + rs6000_legitimize_reload_address, rs6000_emit_move): Make sure an + rtx is a SYMBOL_REF before calling get_pool_constant. + 2008-05-30 Eric Botcazou <ebotcazou@adacore.com> * fold-const.c (fold_unary) <CASE_CONVERT>: Add ??? comment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 1eafc99..f91225f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3746,6 +3746,7 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, return gen_rtx_LO_SUM (Pmode, reg, x); } else if (TARGET_TOC + && GET_CODE (x) == SYMBOL_REF && constant_pool_expr_p (x) && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (x), Pmode)) { @@ -4191,6 +4192,7 @@ rs6000_legitimize_reload_address (rtx x, enum machine_mode mode, } if (TARGET_TOC + && GET_CODE (x) == SYMBOL_REF && constant_pool_expr_p (x) && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (x), mode)) { @@ -5041,6 +5043,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode) operands[1] = force_const_mem (mode, operands[1]); if (TARGET_TOC + && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF && constant_pool_expr_p (XEXP (operands[1], 0)) && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P ( get_pool_constant (XEXP (operands[1], 0)), @@ -12359,6 +12362,7 @@ print_operand_address (FILE *file, rtx x) minus = XEXP (contains_minus, 0); symref = XEXP (minus, 0); + gcc_assert (GET_CODE (XEXP (minus, 1)) == SYMBOL_REF); XEXP (contains_minus, 0) = symref; if (TARGET_ELF) { |