summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-06-02 23:16:42 +0000
committerEric Christopher <echristo@apple.com>2011-06-02 23:16:42 +0000
commitde9399bf7656346d25ebbfad7bcbddc8ec1f378e (patch)
tree629ab3e178efe7ecb9d8f31080091bf7e7763454 /llvm/lib/Target/X86/X86ISelLowering.cpp
parent60cdf8e72712b5e9c48cd7e48d4e42cc5d3e8c9d (diff)
downloadbcm5719-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/X86/X86ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 78205096790..a39e453dd2f 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -12594,12 +12594,16 @@ LowerXConstraint(EVT ConstraintVT) const {
/// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
/// vector. If it is invalid, don't add anything to Ops.
void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
- char Constraint,
+ std::string &Constraint,
std::vector<SDValue>&Ops,
SelectionDAG &DAG) const {
SDValue Result(0, 0);
- switch (Constraint) {
+ // Only support length 1 constraints for now.
+ if (Constraint.length() > 1) return;
+
+ char ConstraintLetter = Constraint[0];
+ switch (ConstraintLetter) {
default: break;
case 'I':
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
OpenPOWER on IntegriCloud