summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-07-21 04:56:48 +0000
committerRichard Trieu <rtrieu@google.com>2017-07-21 04:56:48 +0000
commit4538a5abb0a059b83183246efafc41423acc528c (patch)
tree59d942ccb4abedd2a67cdaa97e3e58626a350778
parenta81d23030f658b6e4095226f5ae3c845d8584215 (diff)
downloadbcm5719-llvm-4538a5abb0a059b83183246efafc41423acc528c.tar.gz
bcm5719-llvm-4538a5abb0a059b83183246efafc41423acc528c.zip
Fix tblgen error.
tblgen couldn't determing a unique name between "long_call" and "far", so it errored out when generating documentation. Copy the documentation, and give an explicit header for "long_call". llvm-svn: 308714
-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