]> git.ipfire.org Git - thirdparty/gcc.git/commit
mips.c (mips_attribute_table): Add "near" and "far" function attributes, "far" being...
authorSandra Loosemore <sandra@codesourcery.com>
Sat, 26 May 2007 02:02:37 +0000 (22:02 -0400)
committerSandra Loosemore <sandra@gcc.gnu.org>
Sat, 26 May 2007 02:02:37 +0000 (22:02 -0400)
commitcd3a59b38ed5414f55606720817999b869e02762
tree93fc294792273907df1fb67c31af6acf379bd425
parent8536ebb582cb5f4a7d78342ac9e8bd0f7f065503
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
gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/predicates.md
gcc/doc/extend.texi
gcc/testsuite/gcc.target/mips/near-far-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/near-far-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/near-far-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/near-far-4.c [new file with mode: 0644]