mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Move XCore from getRegClassForInlineAsmConstraint to
getRegForInlineAsmConstraint. Part of rdar://9643582 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d176af8cf3
commit
ca42299619
@ -1591,21 +1591,18 @@ XCoreTargetLowering::isLegalAddressingMode(const AddrMode &AM,
|
|||||||
// XCore Inline Assembly Support
|
// XCore Inline Assembly Support
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
std::vector<unsigned> XCoreTargetLowering::
|
std::pair<unsigned, const TargetRegisterClass*>
|
||||||
getRegClassForInlineAsmConstraint(const std::string &Constraint,
|
XCoreTargetLowering::
|
||||||
EVT VT) const
|
getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||||
{
|
EVT VT) const {
|
||||||
if (Constraint.size() != 1)
|
if (Constraint.size() == 1) {
|
||||||
return std::vector<unsigned>();
|
|
||||||
|
|
||||||
switch (Constraint[0]) {
|
switch (Constraint[0]) {
|
||||||
default : break;
|
default : break;
|
||||||
case 'r':
|
case 'r':
|
||||||
return make_vector<unsigned>(XCore::R0, XCore::R1, XCore::R2,
|
return std::make_pair(0U, XCore::GRRegsRegisterClass);
|
||||||
XCore::R3, XCore::R4, XCore::R5,
|
|
||||||
XCore::R6, XCore::R7, XCore::R8,
|
|
||||||
XCore::R9, XCore::R10, XCore::R11, 0);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return std::vector<unsigned>();
|
}
|
||||||
|
// Use the default implementation in TargetLowering to convert the register
|
||||||
|
// constraint into a member of a register class.
|
||||||
|
return TargetLowering::getRegForInlineAsmConstraint(Constraint, VT);
|
||||||
}
|
}
|
||||||
|
@ -148,8 +148,8 @@ namespace llvm {
|
|||||||
SDValue LowerTRAMPOLINE(SDValue Op, SelectionDAG &DAG) const;
|
SDValue LowerTRAMPOLINE(SDValue Op, SelectionDAG &DAG) const;
|
||||||
|
|
||||||
// Inline asm support
|
// Inline asm support
|
||||||
std::vector<unsigned>
|
std::pair<unsigned, const TargetRegisterClass*>
|
||||||
getRegClassForInlineAsmConstraint(const std::string &Constraint,
|
getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||||
EVT VT) const;
|
EVT VT) const;
|
||||||
|
|
||||||
// Expand specifics
|
// Expand specifics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user