summaryrefslogtreecommitdiff
path: root/gcc/config/mips/predicates.md
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2007-05-25 22:02:37 -0400
committerSandra Loosemore <sandra@gcc.gnu.org>2007-05-25 22:02:37 -0400
commitcd3a59b38ed5414f55606720817999b869e02762 (patch)
tree93fc294792273907df1fb67c31af6acf379bd425 /gcc/config/mips/predicates.md
parent8536ebb582cb5f4a7d78342ac9e8bd0f7f065503 (diff)
downloadgcc-cd3a59b38ed5414f55606720817999b869e02762.tar.gz
mips.c (mips_attribute_table): Add "near" and "far" function attributes, "far" being an alias for "long_call".
2007-05-25 Sandra Loosemore <sandra@codesourcery.com> Nigel Stephens <nigel@mips.com> gcc/ * config/mips/mips.c (mips_attribute_table): Add "near" and "far" function attributes, "far" being an alias for "long_call". (TARGET_COMP_TYPE_ATTRIBUTES): Define as mips_comp_type_attributes. (mips_near_type_p, mips_far_type_p): New. (mips_comp_type_attributes): New function to check that attributes attached to a function type are compatible. (mips_output_mi_thunk): Test SYMBOL_REF_LONG_CALL_P() rather than TARGET_LONG_CALLS when deciding whether we can do a direct sibcall to the target function of the thunk. (mips_encode_section_info): Check for "near" and "far" function attributes, and always set the SYMBOL_FLAG_LONG_CALL bit explicitly. * config/mips/predicates.md (const_call_insn_operand): Test only SYMBOL_REF_LONG_CALL_P() and not TARGET_LONG_CALLS. * doc/extend.texi (Function Attributes): Document MIPS "near" and "far" attributes. * testsuite/gcc.target/mips/near-far-1.c: New test case. * testsuite/gcc.target/mips/near-far-2.c: New test case. * testsuite/gcc.target/mips/near-far-3.c: New test case. * testsuite/gcc.target/mips/near-far-4.c: New test case. Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r125086
Diffstat (limited to 'gcc/config/mips/predicates.md')
-rw-r--r--gcc/config/mips/predicates.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/mips/predicates.md b/gcc/config/mips/predicates.md
index 16035c8cb2b..fbe3ab44bed 100644
--- a/gcc/config/mips/predicates.md
+++ b/gcc/config/mips/predicates.md
@@ -113,10 +113,10 @@
&& !DECL_EXTERNAL (SYMBOL_REF_DECL (op))))
return false;
- /* If -mlong-calls, force all calls to use register addressing. Also,
- if this function has the long_call attribute, we must use register
- addressing. */
- return !TARGET_LONG_CALLS && !SYMBOL_REF_LONG_CALL_P (op);
+ /* If -mlong-calls or if this function has an explicit long_call
+ attribute, we must use register addressing. The
+ SYMBOL_FLAG_LONG_CALL bit is set by mips_encode_section_info. */
+ return !SYMBOL_REF_LONG_CALL_P (op);
case SYMBOL_GOT_DISP:
/* Without explicit relocs, there is no special syntax for