[llvm] r229136 - R600/SI: Remove handling of fpimm
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Feb 13 11:05:07 PST 2015
Author: arsenm
Date: Fri Feb 13 13:05:07 2015
New Revision: 229136
URL: http://llvm.org/viewvc/llvm-project?rev=229136&view=rev
Log:
R600/SI: Remove handling of fpimm
Modified:
llvm/trunk/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp?rev=229136&r1=229135&r2=229136&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp Fri Feb 13 13:05:07 2015
@@ -31,12 +31,6 @@ using namespace llvm;
namespace {
-/// \brief Helper type used in encoding
-typedef union {
- int64_t I;
- double F;
-} IntFloatUnion;
-
class SIMCCodeEmitter : public AMDGPUMCCodeEmitter {
SIMCCodeEmitter(const SIMCCodeEmitter &) LLVM_DELETED_FUNCTION;
void operator=(const SIMCCodeEmitter &) LLVM_DELETED_FUNCTION;
@@ -217,19 +211,15 @@ void SIMCCodeEmitter::EncodeInstruction(
continue;
// Yes! Encode it
- IntFloatUnion Imm;
+ int64_t Imm = 0;
+
if (Op.isImm())
- Imm.I = Op.getImm();
- else if (Op.isFPImm())
- Imm.F = Op.getFPImm();
- else {
- assert(Op.isExpr());
- // This will be replaced with a fixup value.
- Imm.I = 0;
- }
+ Imm = Op.getImm();
+ else if (!Op.isExpr()) // Exprs will be replaced with a fixup value.
+ llvm_unreachable("Must be immediate or expr");
for (unsigned j = 0; j < 4; j++) {
- OS.write((uint8_t) ((Imm.I >> (8 * j)) & 0xff));
+ OS.write((uint8_t) ((Imm >> (8 * j)) & 0xff));
}
// Only one literal value allowed
More information about the llvm-commits
mailing list