diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-09-30 00:50:06 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-09-30 00:50:06 +0000 |
commit | 4ebbf7b8a8e80532bd2ddf7209e62689c1698a96 (patch) | |
tree | 1b7c3005ec494642a9964ef10e834fe3f412ba5d /lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | 203e0b17dd6049d64cb4ed7c4da09747204e6463 (diff) |
ARM fix encoding of VMOV.f32 and VMOV.f64 immediates.
Encode the immediate into its 8-bit form as part of isel rather than later,
which simplifies things for mapping the encoding bits, allows the removal
of the custom disassembler decoding hook, makes the operand printer trivial,
and prepares things more cleanly for handling these in the asm parser.
rdar://10211428
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r-- | lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index c8d1321351..3d33ce2c2c 100644 --- a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -204,8 +204,6 @@ static DecodeStatus DecodeShiftRight64Imm(llvm::MCInst &Inst, unsigned Val, uint64_t Address, const void *Decoder); static DecodeStatus DecodeTBLInstruction(llvm::MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); -static DecodeStatus DecodeVFPfpImm(llvm::MCInst &Inst, unsigned Val, - uint64_t Address, const void *Decoder); static DecodeStatus DecodePostIdxReg(llvm::MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); static DecodeStatus DecodeCoprocessor(llvm::MCInst &Inst, unsigned Insn, @@ -2524,31 +2522,6 @@ static DecodeStatus DecodeTBLInstruction(llvm::MCInst &Inst, unsigned Insn, return S; } -static DecodeStatus DecodeVFPfpImm(llvm::MCInst &Inst, unsigned Val, - uint64_t Address, const void *Decoder) { - // The immediate needs to be a fully instantiated float. However, the - // auto-generated decoder is only able to fill in some of the bits - // necessary. For instance, the 'b' bit is replicated multiple times, - // and is even present in inverted form in one bit. We do a little - // binary parsing here to fill in those missing bits, and then - // reinterpret it all as a float. - union { - uint32_t integer; - float fp; - } fp_conv; - - fp_conv.integer = Val; - uint32_t b = fieldFromInstruction32(Val, 25, 1); - fp_conv.integer |= b << 26; - fp_conv.integer |= b << 27; - fp_conv.integer |= b << 28; - fp_conv.integer |= b << 29; - fp_conv.integer |= (~b & 0x1) << 30; - - Inst.addOperand(MCOperand::CreateFPImm(fp_conv.fp)); - return MCDisassembler::Success; -} - static DecodeStatus DecodeThumbAddSpecialReg(llvm::MCInst &Inst, uint16_t Insn, uint64_t Address, const void *Decoder) { DecodeStatus S = MCDisassembler::Success; |