diff options
author | Eric Christopher <echristo@apple.com> | 2011-06-02 23:16:42 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-06-02 23:16:42 +0000 |
commit | de9399bf7656346d25ebbfad7bcbddc8ec1f378e (patch) | |
tree | 629ab3e178efe7ecb9d8f31080091bf7e7763454 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp | |
parent | 60cdf8e72712b5e9c48cd7e48d4e42cc5d3e8c9d (diff) | |
download | bcm5719-llvm-de9399bf7656346d25ebbfad7bcbddc8ec1f378e.tar.gz bcm5719-llvm-de9399bf7656346d25ebbfad7bcbddc8ec1f378e.zip |
Have LowerOperandForConstraint handle multiple character constraints.
Part of rdar://9119939
llvm-svn: 132510
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index a5a3b013fb4..5031a79cd9f 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -5439,10 +5439,16 @@ PPCTargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint, /// LowerAsmOperandForConstraint - Lower the specified operand into the Ops /// vector. If it is invalid, don't add anything to Ops. -void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op, char Letter, +void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op, + std::string &Constraint, std::vector<SDValue>&Ops, SelectionDAG &DAG) const { SDValue Result(0,0); + + // Only support length 1 constraints. + if (Constraint.length() > 1) return; + + char Letter = Constraint[0]; switch (Letter) { default: break; case 'I': @@ -5498,7 +5504,7 @@ void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op, char Letter, } // Handle standard constraint letters. - TargetLowering::LowerAsmOperandForConstraint(Op, Letter, Ops, DAG); + TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG); } // isLegalAddressingMode - Return true if the addressing mode represented |