aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-27 01:09:54 +0000
committerDan Gohman <gohman@apple.com>2008-08-27 01:09:54 +0000
commit9f28bc56ecd6c87bf4875a6c3ded509ef08b9231 (patch)
treeb0cd0ac5c51a8492799f9e9c5a0869fb28e4b9e2 /utils
parent32e6eeefeacc64395e8a616e876d25a8a4dc1060 (diff)
downloadexternal_llvm-9f28bc56ecd6c87bf4875a6c3ded509ef08b9231.zip
external_llvm-9f28bc56ecd6c87bf4875a6c3ded509ef08b9231.tar.gz
external_llvm-9f28bc56ecd6c87bf4875a6c3ded509ef08b9231.tar.bz2
Basic FastISel support for floating-point constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/FastISelEmitter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp
index 219b8f3..290676a 100644
--- a/utils/TableGen/FastISelEmitter.cpp
+++ b/utils/TableGen/FastISelEmitter.cpp
@@ -68,6 +68,11 @@ struct OperandsSignature {
Operands.push_back("i");
return true;
}
+ if (!InstPatNode->isLeaf() &&
+ InstPatNode->getOperator()->getName() == "fpimm") {
+ Operands.push_back("f");
+ return true;
+ }
const CodeGenRegisterClass *DstRC = 0;
@@ -87,6 +92,10 @@ struct OperandsSignature {
Operands.push_back("i");
return true;
}
+ if (Op->getOperator()->getName() == "fpimm") {
+ Operands.push_back("f");
+ return true;
+ }
// For now, ignore fpimm and other non-leaf nodes.
return false;
}
@@ -122,6 +131,8 @@ struct OperandsSignature {
OS << "unsigned Op" << i;
} else if (Operands[i] == "i") {
OS << "uint64_t imm" << i;
+ } else if (Operands[i] == "f") {
+ OS << "ConstantFP *f" << i;
} else {
assert("Unknown operand kind!");
abort();
@@ -137,6 +148,8 @@ struct OperandsSignature {
OS << "Op" << i;
} else if (Operands[i] == "i") {
OS << "imm" << i;
+ } else if (Operands[i] == "f") {
+ OS << "f" << i;
} else {
assert("Unknown operand kind!");
abort();