aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.opt
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2009-09-19 20:23:55 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2009-09-19 20:23:55 +0000
commitb53da24424c79a824fa74ec3160efe0bbe9627eb (patch)
treeb83b530090d1d703cf6e9697e8b8bb94870ed94a /gcc/config/mips/mips.opt
parent4172245c93c6b19cf73fec9c119af87a9df63656 (diff)
downloadgcc-b53da24424c79a824fa74ec3160efe0bbe9627eb.zip
gcc-b53da24424c79a824fa74ec3160efe0bbe9627eb.tar.gz
gcc-b53da24424c79a824fa74ec3160efe0bbe9627eb.tar.bz2
mips.opt (mrelax-pic-calls): New option.
* 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. From-SVN: r151890
Diffstat (limited to 'gcc/config/mips/mips.opt')
-rw-r--r--gcc/config/mips/mips.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt
index 9038125..8462e46 100644
--- a/gcc/config/mips/mips.opt
+++ b/gcc/config/mips/mips.opt
@@ -244,6 +244,10 @@ mr10k-cache-barrier=
Target Joined RejectNegative
-mr10k-cache-barrier=SETTING Specify when r10k cache barriers should be inserted
+mrelax-pic-calls
+Target Report Mask(RELAX_PIC_CALLS)
+Try to allow the linker to turn PIC calls into direct calls
+
mshared
Target Report Var(TARGET_SHARED) Init(1)
When generating -mabicalls code, make the code suitable for use in shared libraries