summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Basic/Attr.td4
-rw-r--r--clang/include/clang/Basic/AttrDocs.td23
2 files changed, 24 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td
index 21f6abeb11c..5fd6b55e439 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -1191,13 +1191,13 @@ def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> {
def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetMips> {
let Spellings = [GCC<"long_call">, GCC<"far">];
let Subjects = SubjectList<[Function]>;
- let Documentation = [MipsCallStyleDocs];
+ let Documentation = [MipsLongCallStyleDocs];
}
def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetMips> {
let Spellings = [GCC<"near">];
let Subjects = SubjectList<[Function]>;
- let Documentation = [MipsCallStyleDocs];
+ let Documentation = [MipsShortCallStyleDocs];
}
def Mode : Attr {
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index f88366f2fa6..5c05f2cccb0 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -1323,7 +1323,28 @@ on the command line.
}];
}
-def MipsCallStyleDocs : Documentation {
+def MipsLongCallStyleDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "long_call (gnu::long_call, gnu::far)";
+ let Content = [{
+Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``,
+and ``__attribute__((near))`` attributes on MIPS targets. These attributes may
+only be added to function declarations and change the code generated
+by the compiler when directly calling the function. The ``near`` attribute
+allows calls to the function to be made using the ``jal`` instruction, which
+requires the function to be located in the same naturally aligned 256MB
+segment as the caller. The ``long_call`` and ``far`` attributes are synonyms
+and require the use of a different call sequence that works regardless
+of the distance between the functions.
+
+These attributes have no effect for position-independent code.
+
+These attributes take priority over command line switches such
+as ``-mlong-calls`` and ``-mno-long-calls``.
+ }];
+}
+
+def MipsShortCallStyleDocs : Documentation {
let Category = DocCatFunction;
let Content = [{
Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``,
OpenPOWER on IntegriCloud