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/ppc/macro-assembler-ppc.cc

Issue 2166553002: PPC/s390: [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/s390/builtins-s390.cc ('k') | src/s390/macro-assembler-s390.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 RecordComment("Abort message: "); 2889 RecordComment("Abort message: ");
2890 RecordComment(msg); 2890 RecordComment(msg);
2891 } 2891 }
2892 2892
2893 if (FLAG_trap_on_abort) { 2893 if (FLAG_trap_on_abort) {
2894 stop(msg); 2894 stop(msg);
2895 return; 2895 return;
2896 } 2896 }
2897 #endif 2897 #endif
2898 2898
2899 LoadSmiLiteral(r0, Smi::FromInt(reason)); 2899 // Check if Abort() has already been initialized.
2900 push(r0); 2900 DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
2901
2902 LoadSmiLiteral(r4, Smi::FromInt(static_cast<int>(reason)));
2903
2901 // Disable stub call restrictions to always allow calls to abort. 2904 // Disable stub call restrictions to always allow calls to abort.
2902 if (!has_frame_) { 2905 if (!has_frame_) {
2903 // We don't actually want to generate a pile of code for this, so just 2906 // We don't actually want to generate a pile of code for this, so just
2904 // claim there is a stack frame, without generating one. 2907 // claim there is a stack frame, without generating one.
2905 FrameScope scope(this, StackFrame::NONE); 2908 FrameScope scope(this, StackFrame::NONE);
2906 CallRuntime(Runtime::kAbort); 2909 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2907 } else { 2910 } else {
2908 CallRuntime(Runtime::kAbort); 2911 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2909 } 2912 }
2910 // will not return here 2913 // will not return here
2911 } 2914 }
2912 2915
2913 2916
2914 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { 2917 void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
2915 if (context_chain_length > 0) { 2918 if (context_chain_length > 0) {
2916 // Move up the chain of contexts to the context containing the slot. 2919 // Move up the chain of contexts to the context containing the slot.
2917 LoadP(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2920 LoadP(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2918 for (int i = 1; i < context_chain_length; i++) { 2921 for (int i = 1; i < context_chain_length; i++) {
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
4915 } 4918 }
4916 if (mag.shift > 0) srawi(result, result, mag.shift); 4919 if (mag.shift > 0) srawi(result, result, mag.shift);
4917 ExtractBit(r0, dividend, 31); 4920 ExtractBit(r0, dividend, 31);
4918 add(result, result, r0); 4921 add(result, result, r0);
4919 } 4922 }
4920 4923
4921 } // namespace internal 4924 } // namespace internal
4922 } // namespace v8 4925 } // namespace v8
4923 4926
4924 #endif // V8_TARGET_ARCH_PPC 4927 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/s390/macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698