-
jgruber authored
The isolate can be efficiently loaded through other means: either as a root-relative load (if embedded builtins are enabled), or as an embedded external reference (i.e. the absolute pointer is included in the instruction stream) otherwise. The generated code should be at least as fast as previously. On x64 (with embedded builtins): Before: // Register moves in prologue: 0x7f47a6b4860a a 488955e0 REX.W movq [rbp-0x20],rdx // And the load from a stack slot at each use-site. 0x7f47a6b486f2 f2 488b7de0 REX.W movq rdi,[rbp-0x20] After: // Each use-site just loads a root-relative offset. 0x7f1645fcc6ce ee 498dbd38ffffff REX.W leaq rdi,[r13-0xc8] On ia32 (no embedded builtins), before: 0x5c608930 10 8955f0 mov [ebp-0x10],edx 0x5c6089fb db 891424 mov [esp],edx After: 0x41d0898d 8d b80033b156 mov eax,0x56b13300 Removal reduces register pressure, and frees up ebx as the root register on ia32. Note that the set of allocatable registers was only reduced on ia32 to exclude the root register. Bug: v8:6666 Change-Id: I14e401e2823c82042c76acae10c3c935b9982993 Reviewed-on: https://chromium-review.googlesource.com/1201586 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#55587}
62766423