X87: Revert of [builtins] Introduce a builtin for Abort(). (patchset #5 id:80001 of https://codereview.chromium.org/2156923002/ ).

port 3e8f49ab59 (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}
This commit is contained in:
zhengxing.li 2016-07-20 01:32:10 -07:00 committed by Commit bot
parent e8e09ca725
commit 870fac08c9
2 changed files with 3 additions and 20 deletions

View File

@ -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.

View File

@ -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();