mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[ARM] Move machine operand target flags to ARMBaseInstrInfo
This makes sure the flags are available for use for thumb MIR as well. A test that requires this will be added in the next commit. llvm-svn: 340450
This commit is contained in:
parent
a83db8d2cb
commit
f934a89e05
@ -5060,3 +5060,31 @@ bool ARMBaseInstrInfo::getInsertSubregLikeInputs(
|
||||
}
|
||||
llvm_unreachable("Target dependent opcode missing");
|
||||
}
|
||||
|
||||
std::pair<unsigned, unsigned>
|
||||
ARMBaseInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const {
|
||||
const unsigned Mask = ARMII::MO_OPTION_MASK;
|
||||
return std::make_pair(TF & Mask, TF & ~Mask);
|
||||
}
|
||||
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
ARMBaseInstrInfo::getSerializableDirectMachineOperandTargetFlags() const {
|
||||
using namespace ARMII;
|
||||
|
||||
static const std::pair<unsigned, const char *> TargetFlags[] = {
|
||||
{MO_LO16, "arm-lo16"}, {MO_HI16, "arm-hi16"}};
|
||||
return makeArrayRef(TargetFlags);
|
||||
}
|
||||
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
ARMBaseInstrInfo::getSerializableBitmaskMachineOperandTargetFlags() const {
|
||||
using namespace ARMII;
|
||||
|
||||
static const std::pair<unsigned, const char *> TargetFlags[] = {
|
||||
{MO_GOT, "arm-got"},
|
||||
{MO_SBREL, "arm-sbrel"},
|
||||
{MO_DLLIMPORT, "arm-dllimport"},
|
||||
{MO_SECREL, "arm-secrel"},
|
||||
{MO_NONLAZY, "arm-nonlazy"}};
|
||||
return makeArrayRef(TargetFlags);
|
||||
}
|
||||
|
@ -331,6 +331,13 @@ public:
|
||||
/// Get the number of addresses by LDM or VLDM or zero for unknown.
|
||||
unsigned getNumLDMAddresses(const MachineInstr &MI) const;
|
||||
|
||||
std::pair<unsigned, unsigned>
|
||||
decomposeMachineOperandsTargetFlags(unsigned TF) const override;
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
getSerializableDirectMachineOperandTargetFlags() const override;
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
getSerializableBitmaskMachineOperandTargetFlags() const override;
|
||||
|
||||
private:
|
||||
unsigned getInstBundleLength(const MachineInstr &MI) const;
|
||||
|
||||
|
@ -135,31 +135,3 @@ void ARMInstrInfo::expandLoadStackGuard(MachineBasicBlock::iterator MI) const {
|
||||
.cloneMemRefs(*MI)
|
||||
.add(predOps(ARMCC::AL));
|
||||
}
|
||||
|
||||
std::pair<unsigned, unsigned>
|
||||
ARMInstrInfo::decomposeMachineOperandsTargetFlags(unsigned TF) const {
|
||||
const unsigned Mask = ARMII::MO_OPTION_MASK;
|
||||
return std::make_pair(TF & Mask, TF & ~Mask);
|
||||
}
|
||||
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
ARMInstrInfo::getSerializableDirectMachineOperandTargetFlags() const {
|
||||
using namespace ARMII;
|
||||
|
||||
static const std::pair<unsigned, const char *> TargetFlags[] = {
|
||||
{MO_LO16, "arm-lo16"}, {MO_HI16, "arm-hi16"}};
|
||||
return makeArrayRef(TargetFlags);
|
||||
}
|
||||
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
ARMInstrInfo::getSerializableBitmaskMachineOperandTargetFlags() const {
|
||||
using namespace ARMII;
|
||||
|
||||
static const std::pair<unsigned, const char *> TargetFlags[] = {
|
||||
{MO_GOT, "arm-got"},
|
||||
{MO_SBREL, "arm-sbrel"},
|
||||
{MO_DLLIMPORT, "arm-dllimport"},
|
||||
{MO_SECREL, "arm-secrel"},
|
||||
{MO_NONLAZY, "arm-nonlazy"}};
|
||||
return makeArrayRef(TargetFlags);
|
||||
}
|
||||
|
@ -38,13 +38,6 @@ public:
|
||||
///
|
||||
const ARMRegisterInfo &getRegisterInfo() const override { return RI; }
|
||||
|
||||
std::pair<unsigned, unsigned>
|
||||
decomposeMachineOperandsTargetFlags(unsigned TF) const override;
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
getSerializableDirectMachineOperandTargetFlags() const override;
|
||||
ArrayRef<std::pair<unsigned, const char *>>
|
||||
getSerializableBitmaskMachineOperandTargetFlags() const override;
|
||||
|
||||
private:
|
||||
void expandLoadStackGuard(MachineBasicBlock::iterator MI) const override;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user