mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[ARM][WebAssembly] Fix incorrect MCOperand::createDFPImm after D96091
This commit is contained in:
parent
6b280ce34c
commit
e5269da979
@ -110,7 +110,7 @@ bool ARMAsmPrinter::lowerOperand(const MachineOperand &MO,
|
||||
APFloat Val = MO.getFPImm()->getValueAPF();
|
||||
bool ignored;
|
||||
Val.convert(APFloat::IEEEdouble(), APFloat::rmTowardZero, &ignored);
|
||||
MCOp = MCOperand::createDFPImm(Val.convertToDouble());
|
||||
MCOp = MCOperand::createDFPImm(bit_cast<uint64_t>(Val.convertToDouble()));
|
||||
break;
|
||||
}
|
||||
case MachineOperand::MO_RegisterMask:
|
||||
|
@ -114,7 +114,8 @@ bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes) {
|
||||
Bytes.data() + Size);
|
||||
Size += sizeof(T);
|
||||
if (std::is_floating_point<T>::value) {
|
||||
MI.addOperand(MCOperand::createDFPImm(static_cast<double>(Val)));
|
||||
MI.addOperand(
|
||||
MCOperand::createDFPImm(bit_cast<uint64_t>(static_cast<double>(Val))));
|
||||
} else {
|
||||
MI.addOperand(MCOperand::createImm(static_cast<int64_t>(Val)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user