OSDN Git Service

* config/mips/mips.opt (mrelax-pic-calls): New option.
authornemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Sep 2009 20:23:55 +0000 (20:23 +0000)
committernemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Sep 2009 20:23:55 +0000 (20:23 +0000)
commitca30e0b9103fa278d11bfea902cb9e315e40817f
treeb83b530090d1d703cf6e9697e8b8bb94870ed94a
parente3a5ec37243de9e20a70e393d78d3a36db9bbb4a
* config/mips/mips.opt (mrelax-pic-calls): New option.
* config/mips/mips.c (mips_strip_unspec_address): Move it up in
the file.
(mips_unspec_call): Change "unspec_call" expander into this.
(mips_strip_unspec_call): New function.
(mips_got_load): Call mips_unspec_call instead of
gen_unspec_call<mode>.
(mips16_build_call_stub): Fix comment for fp_code.  Adjust call to
MIPS_CALL.
(mips_cfg_in_reorg): New function.
(mips16_lay_out_constants): Use it to decide whether to call
CFG-aware insn splitting.
(r10k_insert_cache_barriers): Move CFG set-up code from here to
mips_reorg.  Move DF set-up code from here ...
(mips_df_reorg): ... to here.  Call r10k_insert_cache_barriers
from here.
(mips_reorg): Call mips_df_reorg instead of
r10k_insert_cache_barriers.  Move CFG set-up code here from
r10k_insert_cache_barriers.
(mips_call_expr_from_insn): New function.
(mips_pic_call_symbol_from_set): Likewise.
(mips_find_pic_call_symbol): Likewise.
(mips_annotate_pic_call_expr): Likewise.
(mips_get_pic_call_symbol): Likewise.
(mips_annotate_pic_calls): Likewise.
(mips_override_options): Disable -mrelax-pic-calls unless PIC
calls are used.
(mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
* config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
* config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
directive.
* config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
(unspec_call<mode>): Remove it.
(sibcall_internal, sibcall_value_internal,
sibcall_value_multiple_internal, call_internal, call_split,
call_value_internal, call_value_split,
call_value_multiple_internal, call_value_multiple_split): Pass
SIZE_OPNO to MIPS_CALL.
(call_internal_direct, call_direct_split,
call_value_internal_direct, call_value_direct_split): Pass -1 as
SIZE_OPNO to MIPS_CALL.
* configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
* configure: Regenerate.
* doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
and -mno-relax-pic-calls.
(MIPS Options): Document -mrelax-pic-calls
and -mno-relax-pic-calls.

testsuite/
* gcc.target/mips/mips.exp: Add relax-pic-calls
under -mfoo/-mno-foo options.
(mips-dg-options): Make -mrelax-pic-calls imply -mno-plt, -mabicalls
and -mexplicit-relocs.
* gcc.target/mips/call-1.c: New test.
* gcc.target/mips/call-2.c: New test.
* gcc.target/mips/call-3.c: New test.
* gcc.target/mips/lazy-binding-1.c: Add MIPS-specific dg-options.
* gcc.dg/tree-ssa/loop-1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151890 138bc75d-0d04-0410-961f-82ee72b054a4
16 files changed:
gcc/ChangeLog
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/config/mips/mips.opt
gcc/configure
gcc/configure.ac
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr27095.c
gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
gcc/testsuite/gcc.target/mips/call-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/call-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/call-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mips.exp