diff options
| author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-24 20:44:04 +0000 |
|---|---|---|
| committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-24 20:44:04 +0000 |
| commit | fd9da8dcd88f550ae58485a8253cda867e4a1be0 (patch) | |
| tree | b1d5ad722d9a2c82f1db05497d001f22f2723bc6 | |
| parent | e90f4ee997688ac8a14362ef74deee9b05231873 (diff) | |
| download | ppe42-gcc-fd9da8dcd88f550ae58485a8253cda867e4a1be0.tar.gz ppe42-gcc-fd9da8dcd88f550ae58485a8253cda867e4a1be0.zip | |
Fix bfd/archive.c miscompilation.
* config/ia64/ia64.md (movdi): Don't call gen_movdi_symbolic if
we have a SYMBOL_REF with SYMBOL_REF_FLAG set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35955 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/config/ia64/ia64.md | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29a0c03de9c..3a3ed67503f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-08-24 Jim Wilson <wilson@cygnus.com> + + * config/ia64/ia64.md (movdi): Don't call gen_movdi_symbolic if + we have a SYMBOL_REF with SYMBOL_REF_FLAG set. + 2000-08-24 Jason Merrill <jason@redhat.com> * dwarf2out.c (AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 3afddeac929..5057ba08da1 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -358,7 +358,15 @@ type of PIC address load. If this function gets deferred, we may acquire information that changes the value of the sdata_symbolic_operand predicate. */ - if (rtx_equal_function_value_matters) + /* But don't delay for function pointers. Loading a function address + actually loads the address of the descriptor not the function. + If we represent these as SYMBOL_REFs, then they get cse'd with + calls, and we end up with calls to the descriptor address instead of + calls to the function address. Functions are not candidates for + sdata anyways. */ + if (rtx_equal_function_value_matters + && ! (GET_CODE (operands[1]) == SYMBOL_REF + && SYMBOL_REF_FLAG (operands[1]))) emit_insn (gen_movdi_symbolic (operands[0], operands[1])); else ia64_expand_load_address (operands[0], operands[1]); |

