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

Side by Side Diff: src/builtins/arm64/builtins-arm64.cc

Issue 2163263002: Reland of [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix the problem on arm64. 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 unified diff | Download patch
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 // -- lr : return address 2804 // -- lr : return address
2805 // ----------------------------------- 2805 // -----------------------------------
2806 __ SmiTag(x1); 2806 __ SmiTag(x1);
2807 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); 2807 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
2808 __ Push(x1, x2); 2808 __ Push(x1, x2);
2809 __ Move(cp, Smi::FromInt(0)); 2809 __ Move(cp, Smi::FromInt(0));
2810 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); 2810 __ TailCallRuntime(Runtime::kAllocateInTargetSpace);
2811 } 2811 }
2812 2812
2813 // static 2813 // static
2814 void Builtins::Generate_Abort(MacroAssembler* masm) {
2815 ASM_LOCATION("Builtins::Generate_Abort");
2816 // ----------- S t a t e -------------
2817 // -- x1 : message_id as Smi
2818 // -- lr : return address
2819 // -----------------------------------
2820 MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm);
2821 __ Push(x1);
2822 __ Move(cp, Smi::FromInt(0));
2823 __ TailCallRuntime(Runtime::kAbort);
2824 }
2825
2826 // static
2814 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { 2827 void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
2815 // The StringToNumber stub takes one argument in x0. 2828 // The StringToNumber stub takes one argument in x0.
2816 __ AssertString(x0); 2829 __ AssertString(x0);
2817 2830
2818 // Check if string has a cached array index. 2831 // Check if string has a cached array index.
2819 Label runtime; 2832 Label runtime;
2820 __ Ldr(x2, FieldMemOperand(x0, String::kHashFieldOffset)); 2833 __ Ldr(x2, FieldMemOperand(x0, String::kHashFieldOffset));
2821 __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask)); 2834 __ Tst(x2, Operand(String::kContainsCachedArrayIndexMask));
2822 __ B(ne, &runtime); 2835 __ B(ne, &runtime);
2823 __ IndexFromHash(x2, x0); 2836 __ IndexFromHash(x2, x0);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 __ Unreachable(); 3012 __ Unreachable();
3000 } 3013 }
3001 } 3014 }
3002 3015
3003 #undef __ 3016 #undef __
3004 3017
3005 } // namespace internal 3018 } // namespace internal
3006 } // namespace v8 3019 } // namespace v8
3007 3020
3008 #endif // V8_TARGET_ARCH_ARM 3021 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698