Index: src/PNaClTranslator.cpp |
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp |
index 482844f56412748855ad9f4ca8a7d08765fffe37..9258f67f3cd3b7234429d9f8dbea3db34c79b3cd 100644 |
--- a/src/PNaClTranslator.cpp |
+++ b/src/PNaClTranslator.cpp |
@@ -1174,11 +1174,11 @@ private: |
} |
// Extracts the corresponding Alignment to use, given the AlignPower |
- // (i.e. 2**AlignPower, or 0 if AlignPower == 0). InstName is the |
+ // (i.e. 2**(AlignPower-1), or 0 if AlignPower == 0). InstName is the |
// name of the instruction the alignment appears in. |
void extractAlignment(const char *InstName, uint32_t AlignPower, |
uint32_t &Alignment) { |
- if (AlignPower <= AlignPowerLimit) { |
+ if (AlignPower <= AlignPowerLimit + 1) { |
Alignment = (1 << AlignPower) >> 1; |
return; |
} |