mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[Mips][msa] Added initial MSA support.
* msa SubtargetFeature * registers * ld.[bhwd], and st.[bhwd] instructions Does not correctly prohibit use of both 32-bit FPU registers and MSA together. Patch by Daniel Sanders git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188313 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -77,6 +77,23 @@ MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM)
|
||||
if (Subtarget->hasDSPR2())
|
||||
setOperationAction(ISD::MUL, MVT::v2i16, Legal);
|
||||
|
||||
if (Subtarget->hasMSA()) {
|
||||
MVT::SimpleValueType VecTys[4] = {MVT::v16i8, MVT::v8i16,
|
||||
MVT::v4i32, MVT::v2i64};
|
||||
|
||||
for (unsigned i = 0; i < array_lengthof(VecTys); ++i) {
|
||||
addRegisterClass(VecTys[i], &Mips::MSA128RegClass);
|
||||
|
||||
// Expand all builtin opcodes.
|
||||
for (unsigned Opc = 0; Opc < ISD::BUILTIN_OP_END; ++Opc)
|
||||
setOperationAction(Opc, VecTys[i], Expand);
|
||||
|
||||
setOperationAction(ISD::LOAD, VecTys[i], Legal);
|
||||
setOperationAction(ISD::STORE, VecTys[i], Legal);
|
||||
setOperationAction(ISD::BITCAST, VecTys[i], Legal);
|
||||
}
|
||||
}
|
||||
|
||||
if (!TM.Options.UseSoftFloat) {
|
||||
addRegisterClass(MVT::f32, &Mips::FGR32RegClass);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user