Index: src/IceTargetLoweringX8632.cpp |
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp |
index 33a5741dbf47788fdd711970dd0231958c3d53af..68289408a1290f8dc53b58e1f7142c2ed2684de0 100644 |
--- a/src/IceTargetLoweringX8632.cpp |
+++ b/src/IceTargetLoweringX8632.cpp |
@@ -24,6 +24,7 @@ |
#include "IceRegistersX8632.h" |
#include "IceTargetLoweringX8632.def" |
#include "IceTargetLoweringX8632.h" |
+#include "IceUtils.h" |
#include "llvm/ADT/DenseMap.h" |
#include "llvm/Support/MathExtras.h" |
#include "llvm/Support/CommandLine.h" |
@@ -528,6 +529,14 @@ void TargetX8632::emitVariable(const Variable *Var) const { |
Str << "]"; |
} |
+x86::Address TargetX8632::stackVarToAsmOperand(const Variable *Var) const { |
+ assert(!Var->hasReg()); |
+ int32_t Offset = Var->getStackOffset(); |
+ if (!hasFramePointer()) |
+ Offset += getStackAdjustment(); |
+ return x86::Address(RegX8632::getEncodedGPR(getFrameOrStackReg()), Offset); |
+} |
+ |
void TargetX8632::lowerArguments() { |
VarList &Args = Func->getArgs(); |
// The first four arguments of vector type, regardless of their |
@@ -3710,7 +3719,7 @@ bool matchOffsetBase(const VariablesMetadata *VMetadata, Variable *&Base, |
if (Var == NULL || Const == NULL || VMetadata->isMultiDef(Var)) |
return false; |
int32_t MoreOffset = IsAdd ? Const->getValue() : -Const->getValue(); |
- if (WouldOverflowAdd(Offset, MoreOffset)) |
+ if (Utils::WouldOverflowAdd(Offset, MoreOffset)) |
return false; |
Base = Var; |
Offset += MoreOffset; |