Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index bdc7e1bf9edef5ea0509c1fa4fc427f82a739204..e66256747313b1bd73747c13effedad9f36ee6e4 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1669,6 +1669,17 @@ void MacroAssembler::AssertString(Register object) { |
} |
+void MacroAssembler::AssertPositiveOrZero(Register value) { |
+ if (emit_debug_code()) { |
+ Label done; |
+ int sign_bit = value.Is64Bits() ? kXSignBit : kWSignBit; |
+ Tbz(value, sign_bit, &done); |
+ Abort(kUnexpectedNegativeValue); |
+ Bind(&done); |
+ } |
+} |
+ |
+ |
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { |
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |
Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); |