aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-12-27 19:05:16 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-12-27 19:05:16 +0000
commit93d416f060108c01f4f8af7ba2202c78577ef02b (patch)
tree34892edd1713113f3c63c187df72f84711dcc032
parentda12bdcf22788e8aecb3d96d96ed78d2bc67f0ba (diff)
Add a note about registering the backend so it's available in LLC and LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19168 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/WritingAnLLVMBackend.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/WritingAnLLVMBackend.html b/docs/WritingAnLLVMBackend.html
index 4066eec1df..dcea204e47 100644
--- a/docs/WritingAnLLVMBackend.html
+++ b/docs/WritingAnLLVMBackend.html
@@ -91,6 +91,18 @@ implement the following:</p>
href="CodeGenerator.html#targetmachine">TargetMachine</a></tt>, which
configures <tt><a href="CodeGenerator.html#targetdata">TargetData</a></tt>
correctly</li>
+ <li>Register your new target using the <tt>RegisterTarget</tt>
+ template:<br><br>
+<div class="doc_code"><pre>
+RegisterTarget&lt;<em>MyTargetMachine</em>&gt; M("short_name", " Target name");
+</pre></div>
+ <br>Here, <em>MyTargetMachine</em> is the name of your implemented
+ subclass of <tt><a
+ href="CodeGenerator.html#targetmachine">TargetMachine</a></tt>,
+ <em>short_name</em> is the option that will be active following
+ <tt>-march=</tt> to select a target in llc and lli, and the last string
+ is the description of your target to appear in <tt>-help</tt>
+ listing.</li>
</ul></li>
<li>Implement the assembly printer for the architecture. Usually, if you have
described the instruction set with the assembly printer generator in mind, that