summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-03 19:34:18 +0000
committerChris Lattner <sabre@nondot.org>2004-10-03 19:34:18 +0000
commit42c43b2cb3407ab3383429ffa5712c486450ac48 (patch)
tree7057ce0fcb8c646243b8648a7d2715995db1b9c8 /llvm/lib/Target
parent4874120154e5a8013738661f702580472f7e603d (diff)
downloadbcm5719-llvm-42c43b2cb3407ab3383429ffa5712c486450ac48.tar.gz
bcm5719-llvm-42c43b2cb3407ab3383429ffa5712c486450ac48.zip
Add initial support for variants
llvm-svn: 16635
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Target.td12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Target/Target.td b/llvm/lib/Target/Target.td
index 7219395769e..522a46cbc21 100644
--- a/llvm/lib/Target/Target.td
+++ b/llvm/lib/Target/Target.td
@@ -188,6 +188,14 @@ class AsmWriter {
// InstFormatName - AsmWriters can specify the name of the format string to
// print instructions with.
string InstFormatName = "AsmString";
+
+ // Variant - AsmWriters can be of multiple different variants. Variants are
+ // used to support targets that need to emit assembly code in ways that are
+ // mostly the same for different targets, but have minor differences in
+ // syntax. If the asmstring contains {|} characters in them, this integer
+ // will specify which alternative to use. For example "{x|y|z}" with Variant
+ // == 1, will expand to "y".
+ int Variant = 0;
}
def DefaultAsmWriter : AsmWriter;
@@ -207,8 +215,8 @@ class Target {
// InstructionSet - Instruction set description for this target.
InstrInfo InstructionSet;
- // AssemblyWriter - The AsmWriter instance to use for this target.
- AsmWriter AssemblyWriter = DefaultAsmWriter;
+ // AssemblyWriters - The AsmWriter instances available for this target.
+ list<AsmWriter> AssemblyWriters = [DefaultAsmWriter];
}
OpenPOWER on IntegriCloud