Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/Mips/MipsSEISelLowering.cpp
Show All 32 Lines | static cl::opt<bool> NoDPLoadStore("mno-ldc1-sdc1", cl::init(false), | ||||
"stores to their single precision " | "stores to their single precision " | ||||
"counterparts")); | "counterparts")); | ||||
MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM) | MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM) | ||||
: MipsTargetLowering(TM) { | : MipsTargetLowering(TM) { | ||||
// Set up the register classes | // Set up the register classes | ||||
addRegisterClass(MVT::i32, &Mips::GPR32RegClass); | addRegisterClass(MVT::i32, &Mips::GPR32RegClass); | ||||
if (HasMips64) | if (IsGP64bit) | ||||
addRegisterClass(MVT::i64, &Mips::GPR64RegClass); | addRegisterClass(MVT::i64, &Mips::GPR64RegClass); | ||||
if (Subtarget->hasDSP() || Subtarget->hasMSA()) { | if (Subtarget->hasDSP() || Subtarget->hasMSA()) { | ||||
// Expand all truncating stores and extending loads. | // Expand all truncating stores and extending loads. | ||||
unsigned FirstVT = (unsigned)MVT::FIRST_VECTOR_VALUETYPE; | unsigned FirstVT = (unsigned)MVT::FIRST_VECTOR_VALUETYPE; | ||||
unsigned LastVT = (unsigned)MVT::LAST_VECTOR_VALUETYPE; | unsigned LastVT = (unsigned)MVT::LAST_VECTOR_VALUETYPE; | ||||
for (unsigned VT0 = FirstVT; VT0 <= LastVT; ++VT0) { | for (unsigned VT0 = FirstVT; VT0 <= LastVT; ++VT0) { | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | if (!Subtarget->mipsSEUsesSoftFloat()) { | ||||
} | } | ||||
} | } | ||||
setOperationAction(ISD::SMUL_LOHI, MVT::i32, Custom); | setOperationAction(ISD::SMUL_LOHI, MVT::i32, Custom); | ||||
setOperationAction(ISD::UMUL_LOHI, MVT::i32, Custom); | setOperationAction(ISD::UMUL_LOHI, MVT::i32, Custom); | ||||
setOperationAction(ISD::MULHS, MVT::i32, Custom); | setOperationAction(ISD::MULHS, MVT::i32, Custom); | ||||
setOperationAction(ISD::MULHU, MVT::i32, Custom); | setOperationAction(ISD::MULHU, MVT::i32, Custom); | ||||
if (HasMips64) { | if (IsGP64bit) { | ||||
setOperationAction(ISD::MULHS, MVT::i64, Custom); | setOperationAction(ISD::MULHS, MVT::i64, Custom); | ||||
setOperationAction(ISD::MULHU, MVT::i64, Custom); | setOperationAction(ISD::MULHU, MVT::i64, Custom); | ||||
setOperationAction(ISD::MUL, MVT::i64, Custom); | setOperationAction(ISD::MUL, MVT::i64, Custom); | ||||
} | } | ||||
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i64, Custom); | setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i64, Custom); | ||||
setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i64, Custom); | setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::i64, Custom); | ||||
▲ Show 20 Lines • Show All 2,840 Lines • Show Last 20 Lines |