mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[mips] Fix definitions of multiply, multiply-add/sub and divide instructions.
The new instructions have explicit register output operands and use table-gen patterns instead of C++ code to do instruction selection. Mips16's instructions are unaffected by this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -450,6 +450,19 @@ std::pair<bool, SDNode*> MipsSEDAGToDAGISel::selectNode(SDNode *Node) {
|
||||
ReplaceUses(SDValue(Node, 0), ResNode);
|
||||
return std::make_pair(true, ResNode.getNode());
|
||||
}
|
||||
|
||||
case MipsISD::InsertLOHI: {
|
||||
unsigned RCID = Subtarget.hasDSP() ? Mips::ACRegsDSPRegClassID :
|
||||
Mips::ACRegsRegClassID;
|
||||
SDValue RegClass = CurDAG->getTargetConstant(RCID, MVT::i32);
|
||||
SDValue LoIdx = CurDAG->getTargetConstant(Mips::sub_lo, MVT::i32);
|
||||
SDValue HiIdx = CurDAG->getTargetConstant(Mips::sub_hi, MVT::i32);
|
||||
const SDValue Ops[] = { RegClass, Node->getOperand(0), LoIdx,
|
||||
Node->getOperand(1), HiIdx };
|
||||
SDNode *Res = CurDAG->getMachineNode(TargetOpcode::REG_SEQUENCE, DL,
|
||||
MVT::Untyped, Ops, 5);
|
||||
return std::make_pair(true, Res);
|
||||
}
|
||||
}
|
||||
|
||||
return std::make_pair(false, (SDNode*)NULL);
|
||||
|
||||
Reference in New Issue
Block a user