-//===-- MBLazeMCInstLower.cpp - Convert MBlaze MachineInstr to an MCInst---===//
+//===-- MBlazeMCInstLower.cpp - Convert MBlaze MachineInstr to an MCInst---===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#include "MBLazeMCInstLower.h"
+#include "MBlazeMCInstLower.h"
#include "MBlazeInstrInfo.h"
#include "llvm/Constants.h"
#include "llvm/CodeGen/AsmPrinter.h"
MCSymbol *MBlazeMCInstLower::
GetGlobalAddressSymbol(const MachineOperand &MO) const {
switch (MO.getTargetFlags()) {
- default:
- llvm_unreachable("Unknown target flag on GV operand");
-
- case 0: break;
+ default: llvm_unreachable("Unknown target flag on GV operand");
+ case 0: break;
}
return Printer.Mang->getSymbol(MO.getGlobal());
MCSymbol *MBlazeMCInstLower::
GetExternalSymbolSymbol(const MachineOperand &MO) const {
switch (MO.getTargetFlags()) {
- default:
- assert(0 && "Unknown target flag on GV operand");
-
- case 0: break;
+ default: llvm_unreachable("Unknown target flag on GV operand");
+ case 0: break;
}
return Printer.GetExternalSymbolSymbol(MO.getSymbolName());
raw_svector_ostream(Name) << Printer.MAI->getPrivateGlobalPrefix() << "JTI"
<< Printer.getFunctionNumber() << '_'
<< MO.getIndex();
-
switch (MO.getTargetFlags()) {
- default:
- llvm_unreachable("Unknown target flag on GV operand");
-
- case 0: break;
+ default: llvm_unreachable("Unknown target flag on GV operand");
+ case 0: break;
}
// Create a symbol for the name.
MCSymbol *MBlazeMCInstLower::
GetBlockAddressSymbol(const MachineOperand &MO) const {
switch (MO.getTargetFlags()) {
- default:
- assert(0 && "Unknown target flag on GV operand");
-
+ default: llvm_unreachable("Unknown target flag on GV operand");
case 0: break;
}
MCOperand MCOp;
switch (MO.getType()) {
- default:
- assert(0 && "unknown operand type");
+ default: llvm_unreachable("unknown operand type");
case MachineOperand::MO_Register:
// Ignore all implicit register operands.
if (MO.isImplicit()) continue;
case MachineOperand::MO_BlockAddress:
MCOp = LowerSymbolOperand(MO, GetBlockAddressSymbol(MO));
break;
- case MachineOperand::MO_FPImmediate:
+ case MachineOperand::MO_FPImmediate: {
bool ignored;
APFloat FVal = MO.getFPImm()->getValueAPF();
FVal.convert(APFloat::IEEEsingle, APFloat::rmTowardZero, &ignored);
MCOp = MCOperand::CreateImm(Val);
break;
}
+ case MachineOperand::MO_RegisterMask:
+ continue;
+ }
OutMI.addOperand(MCOp);
}