diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-27 01:09:54 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-27 01:09:54 +0000 |
commit | 10df0fa73e396bbc93a8940e8b53827390c54d10 (patch) | |
tree | b0cd0ac5c51a8492799f9e9c5a0869fb28e4b9e2 /utils/TableGen/FastISelEmitter.cpp | |
parent | 96c5ea878c96ce123c2c84bafcfb70032b56c9ab (diff) |
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/TableGen/FastISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/FastISelEmitter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp index 219b8f3973..290676ae7a 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(); |