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

Side by Side Diff: src/mips64/macro-assembler-mips64.cc

Issue 2163603003: Revert of [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/mips/macro-assembler-mips.cc ('k') | src/x64/macro-assembler-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 6070 matching lines...) Expand 10 before | Expand all | Expand 10 after
6081 RecordComment("Abort message: "); 6081 RecordComment("Abort message: ");
6082 RecordComment(msg); 6082 RecordComment(msg);
6083 } 6083 }
6084 6084
6085 if (FLAG_trap_on_abort) { 6085 if (FLAG_trap_on_abort) {
6086 stop(msg); 6086 stop(msg);
6087 return; 6087 return;
6088 } 6088 }
6089 #endif 6089 #endif
6090 6090
6091 // Check if Abort() has already been initialized. 6091 li(a0, Operand(Smi::FromInt(reason)));
6092 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); 6092 push(a0);
6093
6094 Move(a0, Smi::FromInt(static_cast<int>(reason)));
6095
6096 // Disable stub call restrictions to always allow calls to abort. 6093 // Disable stub call restrictions to always allow calls to abort.
6097 if (!has_frame_) { 6094 if (!has_frame_) {
6098 // We don't actually want to generate a pile of code for this, so just 6095 // We don't actually want to generate a pile of code for this, so just
6099 // claim there is a stack frame, without generating one. 6096 // claim there is a stack frame, without generating one.
6100 FrameScope scope(this, StackFrame::NONE); 6097 FrameScope scope(this, StackFrame::NONE);
6101 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 6098 CallRuntime(Runtime::kAbort);
6102 } else { 6099 } else {
6103 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 6100 CallRuntime(Runtime::kAbort);
6104 } 6101 }
6105 // Will not return here. 6102 // Will not return here.
6106 if (is_trampoline_pool_blocked()) { 6103 if (is_trampoline_pool_blocked()) {
6107 // If the calling code cares about the exact number of 6104 // If the calling code cares about the exact number of
6108 // instructions generated, we insert padding here to keep the size 6105 // instructions generated, we insert padding here to keep the size
6109 // of the Abort macro constant. 6106 // of the Abort macro constant.
6110 // Currently in debug mode with debug_code enabled the number of 6107 // Currently in debug mode with debug_code enabled the number of
6111 // generated instructions is 10, so we use this as a maximum value. 6108 // generated instructions is 10, so we use this as a maximum value.
6112 static const int kExpectedAbortInstructions = 10; 6109 static const int kExpectedAbortInstructions = 10;
6113 int abort_instructions = InstructionsGeneratedSince(&abort_start); 6110 int abort_instructions = InstructionsGeneratedSince(&abort_start);
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
7337 if (mag.shift > 0) sra(result, result, mag.shift); 7334 if (mag.shift > 0) sra(result, result, mag.shift);
7338 srl(at, dividend, 31); 7335 srl(at, dividend, 31);
7339 Addu(result, result, Operand(at)); 7336 Addu(result, result, Operand(at));
7340 } 7337 }
7341 7338
7342 7339
7343 } // namespace internal 7340 } // namespace internal
7344 } // namespace v8 7341 } // namespace v8
7345 7342
7346 #endif // V8_TARGET_ARCH_MIPS64 7343 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698