Index: src/arm64/macro-assembler-arm64-inl.h |
diff --git a/src/arm64/macro-assembler-arm64-inl.h b/src/arm64/macro-assembler-arm64-inl.h |
index fd5172bb0daca27237a59ca5dce311a365dbe91a..6071aa3d1a8afb0f5025a051343be70b93e07055 100644 |
--- a/src/arm64/macro-assembler-arm64-inl.h |
+++ b/src/arm64/macro-assembler-arm64-inl.h |
@@ -1304,6 +1304,7 @@ void MacroAssembler::InitializeRootRegister() { |
void MacroAssembler::SmiTag(Register dst, Register src) { |
+ STATIC_ASSERT(kSmiValueSize + kSmiShift == kXRegSizeInBits); |
ASSERT(dst.Is64Bits() && src.Is64Bits()); |
Lsl(dst, src, kSmiShift); |
} |
@@ -1313,6 +1314,7 @@ void MacroAssembler::SmiTag(Register smi) { SmiTag(smi, smi); } |
void MacroAssembler::SmiUntag(Register dst, Register src) { |
+ STATIC_ASSERT(kSmiValueSize + kSmiShift == kXRegSizeInBits); |
ASSERT(dst.Is64Bits() && src.Is64Bits()); |
if (FLAG_enable_slow_asserts) { |
AssertSmi(src); |
@@ -1347,13 +1349,17 @@ void MacroAssembler::SmiUntagToFloat(FPRegister dst, |
void MacroAssembler::SmiTagAndPush(Register src) { |
- STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0)); |
+ STATIC_ASSERT((kSmiShift == kWRegSizeInBits) && |
+ (kSmiValueSize == kWRegSizeInBits) && |
+ (kSmiTag == 0)); |
Push(src.W(), wzr); |
} |
void MacroAssembler::SmiTagAndPush(Register src1, Register src2) { |
- STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0)); |
+ STATIC_ASSERT((kSmiShift == kWRegSizeInBits) && |
+ (kSmiValueSize == kWRegSizeInBits) && |
+ (kSmiTag == 0)); |
Push(src1.W(), wzr, src2.W(), wzr); |
} |