diff options
author | Simon Atanasyan <simon.atanasyan@imgtec.com> | 2017-09-12 12:51:40 +0000 |
---|---|---|
committer | Matthew Fortune <mpf@gcc.gnu.org> | 2017-09-12 12:51:40 +0000 |
commit | 8101ec8538ba93c76250d160f30015913c1f9a15 (patch) | |
tree | 1f689d56f38dc672a24c4b6635c49d2b7dac2fc0 /gcc/doc | |
parent | 45e3a33db7e23a4328974d19a5843d5053461eec (diff) | |
download | gcc-8101ec8538ba93c76250d160f30015913c1f9a15.zip gcc-8101ec8538ba93c76250d160f30015913c1f9a15.tar.gz gcc-8101ec8538ba93c76250d160f30015913c1f9a15.tar.bz2 |
Add short_call function attribute for MIPS
gcc/
* config/mips/mips.c (mips_attribute_table): Add 'short_call'
attribute.
(mips_near_type_p): Add 'short_call' attribute as a synonym
for 'near'.
* doc/extend.texi (short_call): Document new function attribute.
gcc/testsuite
* gcc.target/mips/near-far-1.c: Add check for 'short_call'
attribute.
* gcc.target/mips/near-far-2.c: Likewise.
* gcc.target/mips/near-far-3.c: Likewise.
* gcc.target/mips/near-far-4.c: Likewise.
From-SVN: r252006
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 649be01..cd5733e 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -4528,10 +4528,12 @@ void __attribute__ ((interrupt("vector=hw3"))) v9 (); @end smallexample @item long_call +@itemx short_call @itemx near @itemx far @cindex indirect calls, MIPS @cindex @code{long_call} function attribute, MIPS +@cindex @code{short_call} function attribute, MIPS @cindex @code{near} function attribute, MIPS @cindex @code{far} function attribute, MIPS These attributes specify how a particular function is called on MIPS@. @@ -4539,8 +4541,9 @@ The attributes override the @option{-mlong-calls} (@pxref{MIPS Options}) command-line switch. The @code{long_call} and @code{far} attributes are synonyms, and cause the compiler to always call the function by first loading its address into a register, and then using -the contents of that register. The @code{near} attribute has the opposite -effect; it specifies that non-PIC calls should be made using the more +the contents of that register. The @code{short_call} and @code{near} +attributes are synonyms, and have the opposite +effect; they specify that non-PIC calls should be made using the more efficient @code{jal} instruction. @item mips16 |