[llvm] r232470 - Fix r232466 by adding 'i' to the mappings for inline assembly memory constraints.
Daniel Sanders
daniel.sanders at imgtec.com
Tue Mar 17 05:00:04 PDT 2015
Author: dsanders
Date: Tue Mar 17 07:00:04 2015
New Revision: 232470
URL: http://llvm.org/viewvc/llvm-project?rev=232470&view=rev
Log:
Fix r232466 by adding 'i' to the mappings for inline assembly memory constraints.
It's not completely clear why 'i' has historically been treated as a memory
constraint. According to the documentation, it represents a constant immediate.
Modified:
llvm/trunk/include/llvm/IR/InlineAsm.h
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
Modified: llvm/trunk/include/llvm/IR/InlineAsm.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/InlineAsm.h?rev=232470&r1=232469&r2=232470&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/InlineAsm.h (original)
+++ llvm/trunk/include/llvm/IR/InlineAsm.h Tue Mar 17 07:00:04 2015
@@ -240,6 +240,7 @@ public:
// constraint codes for all targets.
Constraint_Unknown = 0,
Constraint_es,
+ Constraint_i,
Constraint_m,
Constraint_o,
Constraint_v, // Unused at the moment since Constraint_m is always used.
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=232470&r1=232469&r2=232470&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Mar 17 07:00:04 2015
@@ -2627,7 +2627,9 @@ public:
virtual unsigned
getInlineAsmMemConstraint(const std::string &ConstraintCode) const {
- if (ConstraintCode == "m")
+ if (ConstraintCode == "i")
+ return InlineAsm::Constraint_i;
+ else if (ConstraintCode == "m")
return InlineAsm::Constraint_m;
return InlineAsm::Constraint_Unknown;
}
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=232470&r1=232469&r2=232470&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Tue Mar 17 07:00:04 2015
@@ -194,6 +194,7 @@ namespace {
errs() << "ConstraintID: " << ConstraintID << "\n";
llvm_unreachable("Unexpected asm memory constraint");
case InlineAsm::Constraint_es:
+ case InlineAsm::Constraint_i:
case InlineAsm::Constraint_m:
case InlineAsm::Constraint_o:
case InlineAsm::Constraint_Q:
More information about the llvm-commits
mailing list