From 9f28bc56ecd6c87bf4875a6c3ded509ef08b9231 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 27 Aug 2008 01:09:54 +0000 Subject: Basic FastISel support for floating-point constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/FastISelEmitter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'utils') 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(); -- cgit v1.1