diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-10-11 19:14:21 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-10-11 19:14:21 +0000 |
commit | 9cbe2bc74aff10a95b2ee6ed6fb4a47dffee4751 (patch) | |
tree | 6a313acbd9fa4fd37c4cb842d71b6c086507722f /lib | |
parent | 0c425acb0ed7cbc27602e7b7faa1e6ff755e37b5 (diff) | |
download | external_llvm-9cbe2bc74aff10a95b2ee6ed6fb4a47dffee4751.zip external_llvm-9cbe2bc74aff10a95b2ee6ed6fb4a47dffee4751.tar.gz external_llvm-9cbe2bc74aff10a95b2ee6ed6fb4a47dffee4751.tar.bz2 |
Implement 'm' memory operand properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp index 25287e9..a603e07 100644 --- a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp +++ b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp @@ -52,6 +52,10 @@ namespace { return "MSP430 DAG->DAG Pattern Instruction Selection"; } + virtual bool + SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, + std::vector<SDValue> &OutOps); + // Include the pieces autogenerated from the target description. #include "MSP430GenDAGISel.inc" @@ -122,6 +126,22 @@ bool MSP430DAGToDAGISel::SelectAddr(SDValue Op, SDValue Addr, } +bool MSP430DAGToDAGISel:: +SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, + std::vector<SDValue> &OutOps) { + SDValue Op0, Op1; + switch (ConstraintCode) { + default: return true; + case 'm': // memory + if (!SelectAddr(Op, Op, Op0, Op1)) + return true; + break; + } + + OutOps.push_back(Op0); + OutOps.push_back(Op1); + return false; +} /// InstructionSelect - This callback is invoked by /// SelectionDAGISel when it has created a SelectionDAG for us to codegen. |