summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitd39e9dca1b757b7d7da53892cf6ef7e837ca45ca (patch)
tree7c16172d63ce287a79ad1c4ac36521784b5c834b /llvm/lib
parent2471c16d3ecca060c5cb6a7cf19b3bb27512830e (diff)
downloadbcm5719-llvm-d39e9dca1b757b7d7da53892cf6ef7e837ca45ca.tar.gz
bcm5719-llvm-d39e9dca1b757b7d7da53892cf6ef7e837ca45ca.zip
[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. llvm-svn: 317807
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp3
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index cd2f708458b..6ad8932caaa 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/llvm/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/llvm/lib/Target/SystemZ/SystemZISelLowering.h b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
index e2e27d9598d..099b4426cd1 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/llvm/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':
OpenPOWER on IntegriCloud