Index: src/arm64/assembler-arm64.cc |
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc |
index 240dc9c3572a2dfd4d84cdc6dd6ecb9b8f79bcfc..68bc67934e42bcd8c8e0b6f51331e4412a2d7737 100644 |
--- a/src/arm64/assembler-arm64.cc |
+++ b/src/arm64/assembler-arm64.cc |
@@ -227,7 +227,7 @@ bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, |
const CPURegister regs[] = {reg1, reg2, reg3, reg4, reg5, reg6, reg7, reg8}; |
- for (unsigned i = 0; i < sizeof(regs) / sizeof(regs[0]); i++) { |
+ for (unsigned i = 0; i < ARRAY_SIZE(regs); i++) { |
if (regs[i].IsRegister()) { |
number_of_valid_regs++; |
unique_regs |= regs[i].Bit(); |
@@ -2658,8 +2658,7 @@ bool Assembler::IsImmLogical(uint64_t value, |
int multiplier_idx = CountLeadingZeros(d, kXRegSizeInBits) - 57; |
// Ensure that the index to the multipliers array is within bounds. |
ASSERT((multiplier_idx >= 0) && |
- (static_cast<size_t>(multiplier_idx) < |
- (sizeof(multipliers) / sizeof(multipliers[0])))); |
+ (static_cast<size_t>(multiplier_idx) < ARRAY_SIZE(multipliers))); |
uint64_t multiplier = multipliers[multiplier_idx]; |
uint64_t candidate = (b - a) * multiplier; |