[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: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#53656}
This commit is contained in:
parent
7465739816
commit
507c29c940
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user