mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
[mips] Distinguish 'R', 'ZC', and 'm' inline assembly memory constraint.
Summary: Previous behaviour of 'R' and 'm' has been preserved for now. They will be improved in subsequent commits. The offset permitted by ZC varies according to the subtarget since it is intended to match the restrictions of the pref, ll, and sc instructions. The restrictions on these instructions are: * For microMIPS: 12-bit signed offset. * For Mips32r6/Mips64r6: 9-bit signed offset. * Otherwise: 16-bit signed offset. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8414 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -232,8 +232,16 @@ SDNode* MipsDAGToDAGISel::Select(SDNode *Node) {
|
||||
bool MipsDAGToDAGISel::
|
||||
SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID,
|
||||
std::vector<SDValue> &OutOps) {
|
||||
assert(ConstraintID == InlineAsm::Constraint_m &&
|
||||
"unexpected asm memory constraint");
|
||||
OutOps.push_back(Op);
|
||||
return false;
|
||||
// All memory constraints can at least accept raw pointers.
|
||||
switch(ConstraintID) {
|
||||
default:
|
||||
llvm_unreachable("Unexpected asm memory constraint");
|
||||
case InlineAsm::Constraint_i:
|
||||
case InlineAsm::Constraint_m:
|
||||
case InlineAsm::Constraint_R:
|
||||
case InlineAsm::Constraint_ZC:
|
||||
OutOps.push_back(Op);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user