store MC FP immediates as a double instead of as an APFloat, thus avoiding an

unnecessary dtor for MCOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2010-09-16 03:45:21 +00:00
parent f969868271
commit a8e47b3319
4 changed files with 12 additions and 11 deletions

View File

@@ -1973,7 +1973,10 @@ static bool DisassembleVFPMiscFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
// The asm syntax specifies the floating point value, not the 8-bit literal.
APInt immRaw = VFPExpandImm(slice(insn,19,16) << 4 | slice(insn, 3, 0),
Opcode == ARM::FCONSTD ? 64 : 32);
MI.addOperand(MCOperand::CreateFPImm(APFloat(immRaw, true)));
APFloat immFP = APFloat(immRaw, true);
double imm = Opcode == ARM::FCONSTD ? immFP.convertToDouble() :
immFP.convertToFloat();
MI.addOperand(MCOperand::CreateFPImm(imm));
++OpIdx;
}