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/config | |
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/config')
-rw-r--r-- | gcc/config/mips/mips.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index bb94405..5c9094b 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -598,6 +598,7 @@ static const struct attribute_spec mips_attribute_table[] = { /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, om_diagnostic } */ { "long_call", 0, 0, false, true, true, NULL, false }, + { "short_call", 0, 0, false, true, true, NULL, false }, { "far", 0, 0, false, true, true, NULL, false }, { "near", 0, 0, false, true, true, NULL, false }, /* We would really like to treat "mips16" and "nomips16" as type @@ -1171,13 +1172,14 @@ mflip_mips16_use_mips16_p (tree decl) return *slot; } -/* Predicates to test for presence of "near" and "far"/"long_call" +/* Predicates to test for presence of "near"/"short_call" and "far"/"long_call" attributes on the given TYPE. */ static bool mips_near_type_p (const_tree type) { - return lookup_attribute ("near", TYPE_ATTRIBUTES (type)) != NULL; + return (lookup_attribute ("short_call", TYPE_ATTRIBUTES (type)) != NULL + || lookup_attribute ("near", TYPE_ATTRIBUTES (type)) != NULL); } static bool |