summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-09 16:31:57 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-09 16:31:57 +0000
commitb9cdeecf2548f080fc3afbc983d3d018b9780c77 (patch)
tree2ffcc75e981a0c96d0ba09dcb9f8af2c07a5fe56 /lib/Target/SystemZ
parent60d2d2eec0a95d11f019012ca8f66adee7dc40f8 (diff)
[SystemZ] Add support for the "o" inline asm constraint
We don't really need any special handling of "offsettable" memory addresses, but since some existing code uses inline asm statements with the "o" constraint, add support for this constraint for compatibility purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r--lib/Target/SystemZ/SystemZISelDAGToDAG.cpp3
-rw-r--r--lib/Target/SystemZ/SystemZISelLowering.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index cd2f708458b..6ad8932caaa 100644
--- a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
@@ -1379,8 +1379,11 @@ SelectInlineAsmMemoryOperand(const SDValue &Op,
break;
case InlineAsm::Constraint_T:
case InlineAsm::Constraint_m:
+ case InlineAsm::Constraint_o:
// Accept an address with a long displacement and an index.
// m works the same as T, as this is the most general case.
+ // We don't really have any special handling of "offsettable"
+ // memory addresses, so just treat o the same as m.
Form = SystemZAddressingMode::FormBDXNormal;
DispRange = SystemZAddressingMode::Disp20Only;
break;
diff --git a/lib/Target/SystemZ/SystemZISelLowering.h b/lib/Target/SystemZ/SystemZISelLowering.h
index e2e27d9598d..099b4426cd1 100644
--- a/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/lib/Target/SystemZ/SystemZISelLowering.h
@@ -426,6 +426,8 @@ public:
switch(ConstraintCode[0]) {
default:
break;
+ case 'o':
+ return InlineAsm::Constraint_o;
case 'Q':
return InlineAsm::Constraint_Q;
case 'R':