Commit 507c29c9 authored by jgruber's avatar jgruber Committed by Commit Bot

[csa] Load the stack limit from smi roots

Loading a root generates a kRootRegister-relative load on all
architectures but ia32 (where we currently don't have a root
register).

This is preferable to loading an external reference, which will
usually embed an absolute pointer into the generated code, or add an
indirection when within an embedded builtin.

Bug: v8:6666
Change-Id: I1a93b1325b375bfcf3547977760e1d9ada1d0ee4
Reviewed-on: https://chromium-review.googlesource.com/1095260
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53656}
parent 74657398
......@@ -11902,9 +11902,7 @@ void CodeStubAssembler::PerformStackCheck(Node* context) {
Label ok(this), stack_check_interrupt(this, Label::kDeferred);
Node* sp = LoadStackPointer();
Node* stack_limit = Load(
MachineType::Pointer(),
ExternalConstant(ExternalReference::address_of_stack_limit(isolate())));
Node* stack_limit = BitcastTaggedToWord(LoadRoot(Heap::kStackLimitRootIndex));
Node* interrupt = UintPtrLessThan(sp, stack_limit);
Branch(interrupt, &stack_check_interrupt, &ok);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment