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 3ce4855b8a1b004065acc93553fa33f42ef1291b..4a93053811688a362a741d529e0b93c052ae295a 100644 |
--- a/src/arm64/macro-assembler-arm64-inl.h |
+++ b/src/arm64/macro-assembler-arm64-inl.h |
@@ -1308,6 +1308,8 @@ void MacroAssembler::InitializeRootRegister() { |
void MacroAssembler::SmiTag(Register dst, Register src) { |
+ STATIC_ASSERT(kXRegSizeInBits == |
+ static_cast<unsigned>(kSmiShift + kSmiValueSize)); |
ASSERT(dst.Is64Bits() && src.Is64Bits()); |
Lsl(dst, src, kSmiShift); |
} |
@@ -1317,6 +1319,8 @@ void MacroAssembler::SmiTag(Register smi) { SmiTag(smi, smi); } |
void MacroAssembler::SmiUntag(Register dst, Register src) { |
+ STATIC_ASSERT(kXRegSizeInBits == |
+ static_cast<unsigned>(kSmiShift + kSmiValueSize)); |
ASSERT(dst.Is64Bits() && src.Is64Bits()); |
if (FLAG_enable_slow_asserts) { |
AssertSmi(src); |
@@ -1351,13 +1355,17 @@ void MacroAssembler::SmiUntagToFloat(FPRegister dst, |
void MacroAssembler::SmiTagAndPush(Register src) { |
- STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0)); |
+ STATIC_ASSERT((static_cast<unsigned>(kSmiShift) == kWRegSizeInBits) && |
+ (static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits) && |
+ (kSmiTag == 0)); |
Push(src.W(), wzr); |
} |
void MacroAssembler::SmiTagAndPush(Register src1, Register src2) { |
- STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0)); |
+ STATIC_ASSERT((static_cast<unsigned>(kSmiShift) == kWRegSizeInBits) && |
+ (static_cast<unsigned>(kSmiValueSize) == kWRegSizeInBits) && |
+ (kSmiTag == 0)); |
Push(src1.W(), wzr, src2.W(), wzr); |
} |