Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 8cdfa5d9efe6e03a1f9c9a504d50bbf12ce646cd..59b2e249672376b2b3e8bca48fc6fc47fdbb43f0 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1796,6 +1796,7 @@ static const int kRegisterPassedArguments = 8; |
void MacroAssembler::CallCFunction(Register function, |
int num_of_reg_args, |
int num_of_double_args) { |
+ DCHECK_LE(num_of_reg_args + num_of_double_args, kMaxCParameters); |
DCHECK(has_frame()); |
// If we're passing doubles, we're limited to the following prototypes |