mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Re-commit: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
Summary: But still handle them the same way since I don't know how they differ on this target. No functional change intended. Reviewers: kparzysz, adasgupt Reviewed By: kparzysz, adasgupt Subscribers: colinl, llvm-commits Differential Revision: http://reviews.llvm.org/D8204 Like for the PowerPC target, I've had to add 'i' to the constraint mappings in order to pass 2007-12-17-InvokeAsm.ll. It's not clear why 'i' has historically been treated as a memory constraint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232480 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
99739705ac
commit
42c951a74c
@ -243,7 +243,7 @@ public:
|
|||||||
Constraint_i,
|
Constraint_i,
|
||||||
Constraint_m,
|
Constraint_m,
|
||||||
Constraint_o,
|
Constraint_o,
|
||||||
Constraint_v, // Unused at the moment since Constraint_m is always used.
|
Constraint_v,
|
||||||
Constraint_Q,
|
Constraint_Q,
|
||||||
Constraint_Z,
|
Constraint_Z,
|
||||||
Constraint_Zy,
|
Constraint_Zy,
|
||||||
|
@ -1108,10 +1108,11 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID,
|
|||||||
SDValue Inp = Op, Res;
|
SDValue Inp = Op, Res;
|
||||||
|
|
||||||
switch (ConstraintID) {
|
switch (ConstraintID) {
|
||||||
case InlineAsm::Constraint_o: // Offsetable.
|
|
||||||
case InlineAsm::Constraint_v: // Not offsetable.
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
|
case InlineAsm::Constraint_i:
|
||||||
|
case InlineAsm::Constraint_o: // Offsetable.
|
||||||
|
case InlineAsm::Constraint_v: // Not offsetable.
|
||||||
case InlineAsm::Constraint_m: // Memory.
|
case InlineAsm::Constraint_m: // Memory.
|
||||||
if (SelectAddrFI(Inp, Res))
|
if (SelectAddrFI(Inp, Res))
|
||||||
OutOps.push_back(Res);
|
OutOps.push_back(Res);
|
||||||
|
@ -185,8 +185,11 @@ bool isPositiveHalfWord(SDNode *N);
|
|||||||
|
|
||||||
unsigned getInlineAsmMemConstraint(
|
unsigned getInlineAsmMemConstraint(
|
||||||
const std::string &ConstraintCode) const override {
|
const std::string &ConstraintCode) const override {
|
||||||
// FIXME: Map different constraints differently.
|
if (ConstraintCode == "o")
|
||||||
return InlineAsm::Constraint_m;
|
return InlineAsm::Constraint_o;
|
||||||
|
else if (ConstraintCode == "v")
|
||||||
|
return InlineAsm::Constraint_v;
|
||||||
|
return TargetLowering::getInlineAsmMemConstraint(ConstraintCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intrinsics
|
// Intrinsics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user