Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
X87: Revert of [builtins] Introduce a builtin for Abort(). (patchset #5
Browse files Browse the repository at this point in the history
… id:80001 of https://codereview.chromium.org/2156923002/ ).

  port 3e8f49a (r37883)

  original commit message:
  Reason for revert:
  Blocks roll: https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/1622

  Original issue's description:
  > [builtins] Introduce a builtin for Abort().
  >
  > Calling Runtime::kAbort through a builtin instead of the c-entry stub
  > will allow to generate the call in a background thread, because a
  > builtin provides its own handle, whereas a code stub does not.
  >
  > @v8-mips-ports: Could you take a special look at the padding that is
  > done in MacroAssembler::Abort()?
  >
  > R=bmeurer@chromium.org, titzer@chromium.org, mstarzinger@chromium.org, v8-mips-ports@googlegroups.com, v8-arm-ports@googlegroups.com
  >
  > Committed: https://crrev.com/9be015a254cfff871c56cd129523a729637e9158
  > Cr-Commit-Position: refs/heads/master@{#37854}

BUG=

Review-Url: https://codereview.chromium.org/2168573002
Cr-Commit-Position: refs/heads/master@{#37888}
  • Loading branch information
lizhengxing authored and Commit bot committed Jul 20, 2016
1 parent e8e09ca commit 870fac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
13 changes: 0 additions & 13 deletions src/builtins/x87/builtins-x87.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2722,19 +2722,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
}

// static
void Builtins::Generate_Abort(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- edx : message_id as Smi
// -- esp[0] : return address
// -----------------------------------
__ PopReturnAddressTo(ecx);
__ Push(edx);
__ PushReturnAddressFrom(ecx);
__ Move(esi, Smi::FromInt(0));
__ TailCallRuntime(Runtime::kAbort);
}

// static
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
// The StringToNumber stub takes one argument in eax.
Expand Down
10 changes: 3 additions & 7 deletions src/x87/macro-assembler-x87.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2810,19 +2810,15 @@ void MacroAssembler::Abort(BailoutReason reason) {
}
#endif

// Check if Abort() has already been initialized.
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());

Move(edx, Smi::FromInt(static_cast<int>(reason)));

push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason))));
// Disable stub call restrictions to always allow calls to abort.
if (!has_frame_) {
// We don't actually want to generate a pile of code for this, so just
// claim there is a stack frame, without generating one.
FrameScope scope(this, StackFrame::NONE);
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
CallRuntime(Runtime::kAbort);
} else {
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
CallRuntime(Runtime::kAbort);
}
// will not return here
int3();
Expand Down

0 comments on commit 870fac0

Please sign in to comment.