summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-02-13 19:05:07 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-02-13 19:05:07 +0000
commit774e20b42a2b4cde1cd669869b3c954d967f4ba4 (patch)
tree3d569f9ad5c34d15bc5ea74ea565e228a5245bb0 /llvm
parent11a4d6774b7c98c55f225a02f982a91c781768d1 (diff)
downloadbcm5719-llvm-774e20b42a2b4cde1cd669869b3c954d967f4ba4.tar.gz
bcm5719-llvm-774e20b42a2b4cde1cd669869b3c954d967f4ba4.zip
R600/SI: Remove handling of fpimm
llvm-svn: 229136
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp b/llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
index 12aaaa7c7aa..428248706bd 100644
--- a/llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
+++ b/llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
@@ -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(const MCInst &MI, raw_ostream &OS,
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
OpenPOWER on IntegriCloud