Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: src/builtins/x64/builtins-x64.cc

Issue 2156923002: [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x64/builtins-x64.cc
diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc
index c015405c6028e5a40cdcdfc25dce855102184c58..1fb26bf8dd480c0dfda7707d19d983b63ff9a968 100644
--- a/src/builtins/x64/builtins-x64.cc
+++ b/src/builtins/x64/builtins-x64.cc
@@ -2115,6 +2115,19 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
}
+// static
+void Builtins::Generate_Abort(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rdx : message_id as Smi
+ // -- rsp[0] : return address
+ // -----------------------------------
+ __ PopReturnAddressTo(rcx);
+ __ Push(rdx);
+ __ PushReturnAddressFrom(rcx);
+ __ Move(rsi, Smi::FromInt(0));
+ __ TailCallRuntime(Runtime::kAbort);
+}
+
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
// The StringToNumber stub takes one argument in rax.
__ AssertString(rax);
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698