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 | 95eb470ce184e309082f24a35c19bf1de7bf10b9 (patch) | |
tree | 6a313acbd9fa4fd37c4cb842d71b6c086507722f /lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | |
parent | c4be951ddc193cd4dc550dc6b12436dcbaee4dc9 (diff) | |
download | external_llvm-95eb470ce184e309082f24a35c19bf1de7bf10b9.zip external_llvm-95eb470ce184e309082f24a35c19bf1de7bf10b9.tar.gz external_llvm-95eb470ce184e309082f24a35c19bf1de7bf10b9.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/Target/MSP430/MSP430ISelDAGToDAG.cpp')
-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. |